Implemented crank TESR.
Fixed crash bug in model rotator if state wasn't set.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package appeng.block.grindstone;
|
||||
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import appeng.bootstrap.BlockRenderingCustomizer;
|
||||
import appeng.bootstrap.IBlockRendering;
|
||||
import appeng.bootstrap.IItemRendering;
|
||||
import appeng.client.render.tesr.CrankTESR;
|
||||
|
||||
|
||||
public class CrankRendering extends BlockRenderingCustomizer
|
||||
{
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public void customize( IBlockRendering rendering, IItemRendering itemRendering )
|
||||
{
|
||||
rendering.tesr( new CrankTESR() );
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user