Implemented crank TESR.

Fixed crash bug in model rotator if state wasn't set.
This commit is contained in:
Sebastian Hartte
2016-08-27 13:05:41 +02:00
parent f0ee7939a2
commit 77dff3ab32
8 changed files with 187 additions and 4 deletions
@@ -28,6 +28,7 @@ import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumBlockRenderType;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos;
@@ -127,6 +128,12 @@ public class BlockCrank extends AEBaseTileBlock
return te instanceof ICrankable && ( (ICrankable) te ).canCrankAttach( offset.getOpposite() );
}
@Override
public EnumBlockRenderType getRenderType( IBlockState state )
{
return EnumBlockRenderType.ENTITYBLOCK_ANIMATED;
}
@Override
public void neighborChanged( final IBlockState state, final World world, final BlockPos pos, final Block neighborBlock )
{
@@ -150,4 +157,11 @@ public class BlockCrank extends AEBaseTileBlock
{
return this.findCrankable( world, pos ) != null;
}
@Override
public boolean isFullCube( IBlockState state )
{
return false;
}
}