Fix placing platforms against platforms not playing the place sound

This commit is contained in:
Vincent Lee committed 2019-09-27 10:49:33 -05:00
1 parent a3b7f1c4b0
commit 8553a4d5df
1 file changed
+4 -6
@@ -113,10 +113,6 @@ public class BlockPlatform extends BlockMod implements ILexiconable, IWandable,
@Override
public boolean onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
TileEntity tile = world.getTileEntity(pos);
if(world.isRemote)
return true;
ItemStack currentStack = player.getHeldItem(hand);
if(!currentStack.isEmpty()
&& Block.getBlockFromItem(currentStack.getItem()) != Blocks.AIR
@@ -126,8 +122,10 @@ public class BlockPlatform extends BlockMod implements ILexiconable, IWandable,
BlockState changeState = Block.getBlockFromItem(currentStack.getItem()).getStateForPlacement(ctx);
if(isValidBlock(changeState, world, pos) && !(changeState.getBlock() instanceof BlockPlatform) && changeState.getMaterial() != Material.AIR) {
camo.camoState = changeState;
world.notifyBlockUpdate(pos, state, state, 3);
if (!world.isRemote) {
camo.camoState = changeState;
world.notifyBlockUpdate(pos, state, state, 3);
}
return true;
}