Update forge, fix spreader placement and rendering weirdness

This commit is contained in:
Vincent Lee committed 2019-04-06 15:50:34 -05:00
1 parent 7351966073
commit ace224e41e
3 files changed
+12 -5

No files matched your search

@@ -133,7 +133,7 @@ public final class HUDHandler {
if(PlayerHelper.hasAnyHeldItem(mc.player)) {
if(pos != null && PlayerHelper.hasHeldItem(mc.player, ModItems.twigWand)) {
// todo 1.13 weird AT crash renderWandModeDisplay(PlayerHelper.getFirstHeldItem(mc.player, ModItems.twigWand));
renderWandModeDisplay(PlayerHelper.getFirstHeldItem(mc.player, ModItems.twigWand));
if(block instanceof IWandHUD) {
profiler.startSection("wandItem");
@@ -30,6 +30,7 @@ import net.minecraft.util.EnumHand;
import net.minecraft.util.NonNullList;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
@@ -57,7 +58,7 @@ import java.util.List;
import java.util.Locale;
public class BlockSpreader extends BlockMod implements IWandable, IWandHUD, ILexiconable, IWireframeAABBProvider {
private static final VoxelShape RENDER_SHAPE = makeCuboidShape(1, 1, 1, 15, 15, 15);
public enum Variant {
MANA,
REDSTONE,
@@ -71,9 +72,15 @@ public class BlockSpreader extends BlockMod implements IWandable, IWandHUD, ILex
this.variant = v;
}
@Nonnull
@Override
public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack par6ItemStack) {
EnumFacing orientation = EnumFacing.getFacingDirections(placer)[0];
public VoxelShape getRenderShape(IBlockState state, @Nonnull IBlockReader world, @Nonnull BlockPos pos) {
return RENDER_SHAPE;
}
@Override
public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) {
EnumFacing orientation = EnumFacing.getFacingDirections(placer)[0].getOpposite();
TileSpreader spreader = (TileSpreader) world.getTileEntity(pos);
switch(orientation) {