Fix #2013
This commit is contained in:
parent
a06afa1a4a
commit
015d81ad24
1 changed files with 10 additions and 2 deletions
|
@ -25,7 +25,14 @@
|
|||
package techreborn.blocks.misc;
|
||||
|
||||
import net.fabricmc.fabric.api.block.FabricBlockSettings;
|
||||
import net.minecraft.block.*;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.block.FireBlock;
|
||||
import net.minecraft.block.LogBlock;
|
||||
import net.minecraft.block.Material;
|
||||
import net.minecraft.block.MaterialColor;
|
||||
import net.minecraft.block.PillarBlock;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.AxeItem;
|
||||
|
@ -53,6 +60,7 @@ import techreborn.events.TRRecipeHandler;
|
|||
import techreborn.init.ModSounds;
|
||||
import techreborn.init.TRContent;
|
||||
import techreborn.items.tool.TreeTapItem;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
/**
|
||||
|
@ -135,7 +143,7 @@ public class BlockRubberLog extends LogBlock {
|
|||
return ActionResult.SUCCESS;
|
||||
}
|
||||
|
||||
if ((Energy.valid(stack) && Energy.of(stack).getEnergy() > 20) || stack.getItem() instanceof TreeTapItem) {
|
||||
if ((Energy.valid(stack) && Energy.of(stack).getEnergy() > 20) && stack.getItem() instanceof TreeTapItem) {
|
||||
if (state.get(HAS_SAP) && state.get(SAP_SIDE) == hitResult.getSide()) {
|
||||
worldIn.setBlockState(pos, state.with(HAS_SAP, false).with(SAP_SIDE, Direction.fromHorizontal(0)));
|
||||
worldIn.playSound(playerIn, pos, ModSounds.SAP_EXTRACT, SoundCategory.BLOCKS, 0.6F, 1F);
|
||||
|
|
Loading…
Reference in a new issue