Fixed tooltip issue. Closes #865
This commit is contained in:
parent
30ee947c22
commit
e26d7e3a0c
2 changed files with 4 additions and 5 deletions
|
@ -80,7 +80,7 @@ public class BlockPlayerDetector extends BlockMachineBase {
|
|||
|
||||
@Override
|
||||
public ItemStack getPickBlock(IBlockState state, RayTraceResult target, World world, BlockPos pos, EntityPlayer player) {
|
||||
return new ItemStack(ModBlocks.PLAYER_DETECTOR, typeNamesList.indexOf(state.getValue(TYPE)));
|
||||
return new ItemStack(ModBlocks.PLAYER_DETECTOR, 1, typeNamesList.indexOf(state.getValue(TYPE)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -77,13 +77,13 @@ public class TilePlayerDectector extends TilePowerAcceptor {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
super.updateEntity();
|
||||
public void update() {
|
||||
super.update();
|
||||
if (!world.isRemote && world.getWorldTime() % 20 == 0) {
|
||||
boolean lastRedstone = redstone;
|
||||
redstone = false;
|
||||
if (canUseEnergy(10)) {
|
||||
Iterator tIterator = super.world.playerEntities.iterator();
|
||||
Iterator<EntityPlayer> tIterator = super.world.playerEntities.iterator();
|
||||
while (tIterator.hasNext()) {
|
||||
EntityPlayer player = (EntityPlayer) tIterator.next();
|
||||
if (player.getDistanceSq((double) super.getPos().getX() + 0.5D,
|
||||
|
@ -101,7 +101,6 @@ public class TilePlayerDectector extends TilePowerAcceptor {
|
|||
redstone = true;
|
||||
}
|
||||
}
|
||||
redstone = true;
|
||||
}
|
||||
}
|
||||
useEnergy(10);
|
||||
|
|
Loading…
Reference in a new issue