Fix most non rendering issues

This commit is contained in:
Vincent Lee committed 2020-01-09 21:49:02 -06:00
1 parent bafd2bfa6d
commit 24e777cab5
88 files changed
+397 -454

No files matched your search

@@ -17,6 +17,7 @@ import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Direction;
import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockPos;
@@ -46,13 +47,13 @@ public class BlockAnimatedTorch extends BlockMod implements IWandable, IManaTrig
}
@Override
public boolean onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity playerIn, Hand hand, BlockRayTraceResult hit) {
public ActionResultType onUse(BlockState state, World worldIn, BlockPos pos, PlayerEntity playerIn, Hand hand, BlockRayTraceResult hit) {
if(hand == Hand.MAIN_HAND && playerIn.isSneaking() && playerIn.getHeldItem(hand).isEmpty()) {
((TileAnimatedTorch) worldIn.getTileEntity(pos)).handRotate();
return true;
return ActionResultType.SUCCESS;
}
return false;
return ActionResultType.PASS;
}
@Override
@@ -118,11 +119,6 @@ public class BlockAnimatedTorch extends BlockMod implements IWandable, IManaTrig
return SHAPE;
}
@Override
public boolean isSolid(BlockState state) {
return false;
}
@Override
public TileEntity createTileEntity(@Nonnull BlockState state, @Nonnull IBlockReader world) {
return new TileAnimatedTorch();