Added catch to TileEntityChestRenderer for potential crash when modders do bad things -.- Closes #389
This commit is contained in:
parent
704f879320
commit
6d6405973c
1 changed files with 26 additions and 0 deletions
|
@ -0,0 +1,26 @@
|
|||
--- ../src_base/minecraft/net/minecraft/client/renderer/tileentity/TileEntityChestRenderer.java
|
||||
+++ ../src_work/minecraft/net/minecraft/client/renderer/tileentity/TileEntityChestRenderer.java
|
||||
@@ -1,5 +1,6 @@
|
||||
package net.minecraft.client.renderer.tileentity;
|
||||
|
||||
+import cpw.mods.fml.common.FMLLog;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import java.util.Calendar;
|
||||
@@ -50,7 +51,15 @@
|
||||
|
||||
if (var10 != null && var9 == 0)
|
||||
{
|
||||
- ((BlockChest)var10).unifyAdjacentChests(par1TileEntityChest.getWorldObj(), par1TileEntityChest.xCoord, par1TileEntityChest.yCoord, par1TileEntityChest.zCoord);
|
||||
+ try
|
||||
+ {
|
||||
+ ((BlockChest)var10).unifyAdjacentChests(par1TileEntityChest.getWorldObj(), par1TileEntityChest.xCoord, par1TileEntityChest.yCoord, par1TileEntityChest.zCoord);
|
||||
+ }
|
||||
+ catch (ClassCastException e)
|
||||
+ {
|
||||
+ FMLLog.severe("Attempted to render a chest at %d, %d, %d that was not a chest",
|
||||
+ par1TileEntityChest.xCoord, par1TileEntityChest.yCoord, par1TileEntityChest.zCoord);
|
||||
+ }
|
||||
var9 = par1TileEntityChest.getBlockMetadata();
|
||||
}
|
||||
|
Loading…
Reference in a new issue