Fix cable covers getting used up in creative.

This commit is contained in:
modmuss50 2021-11-26 21:08:18 +00:00
parent 8b24b8439a
commit 4a839ae74f

View file

@ -154,7 +154,7 @@ public class CableBlock extends BlockWithEntity implements Waterloggable {
&& stack.getItem() == TRContent.Plates.WOOD.asItem()) {
worldIn.setBlockState(pos, state.with(COVERED, true));
worldIn.playSound(playerIn, pos, SoundEvents.BLOCK_WOOD_PLACE, SoundCategory.BLOCKS, 0.6F, 1.0F);
if (!worldIn.isClient) {
if (!worldIn.isClient && !playerIn.isCreative()) {
stack.decrement(1);
}
return ActionResult.SUCCESS;