More avoidance of crashing due to separator changes.
This commit is contained in:
parent
8ba9aefcda
commit
ab26ba5b73
2 changed files with 7 additions and 2 deletions
|
@ -81,7 +81,7 @@ public class BlockRenderingHandler implements ISimpleBlockRenderingHandler
|
|||
Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "WindTurbine.png"));
|
||||
windTurbine.render(0.018F, 0);
|
||||
}
|
||||
else {
|
||||
else if(metadata != 2) {
|
||||
MekanismRenderer.renderItem(renderer, metadata, block);
|
||||
}
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ public class BlockRenderingHandler implements ISimpleBlockRenderingHandler
|
|||
{
|
||||
int metadata = world.getBlockMetadata(x, y, z);
|
||||
|
||||
if(!GeneratorType.getFromMetadata(metadata).hasModel)
|
||||
if(GeneratorType.getFromMetadata(metadata) == null || !GeneratorType.getFromMetadata(metadata).hasModel)
|
||||
{
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
renderer.setRenderBoundsFromBlock(block);
|
||||
|
|
|
@ -434,6 +434,11 @@ public class BlockGenerator extends BlockContainer implements ISpecialBounds
|
|||
TileEntityElectricBlock tileEntity = (TileEntityElectricBlock)world.getBlockTileEntity(x, y, z);
|
||||
ItemStack itemStack = new ItemStack(MekanismGenerators.Generator, 1, world.getBlockMetadata(x, y, z));
|
||||
|
||||
if(tileEntity == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
IEnergizedItem electricItem = (IEnergizedItem)itemStack.getItem();
|
||||
electricItem.setEnergy(itemStack, tileEntity.electricityStored);
|
||||
|
||||
|
|
Loading…
Reference in a new issue