mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-24 05:54:27 +00:00
Added some defensive null checking
* re #2832 * It makes no sense for this to be null, but a defensive null check here is basically free.
This commit is contained in:
1 parent
47914c8820
commit
11c8b81332
1 file changed
+7
-4
@@ -6,6 +6,7 @@ import java.util.Random;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraftforge.client.model.obj.GroupObject;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
@@ -59,9 +60,11 @@ public class TelePadSpecialRenderer extends TileEntitySpecialRenderer {
|
||||
}
|
||||
|
||||
private void render(GroupObject model, TileEntity te, Tessellator tes) {
|
||||
tes.startDrawingQuads();
|
||||
TechneUtil.renderWithIcon(model, te.getBlockType().getIcon(te.getWorldObj(), te.xCoord, te.yCoord, te.zCoord, 0), null,
|
||||
Tessellator.instance, te.getWorldObj(), 0, 0, 0, null, false);
|
||||
tes.draw();
|
||||
final IIcon icon = te.getBlockType().getIcon(te.getWorldObj(), te.xCoord, te.yCoord, te.zCoord, 0);
|
||||
if (icon != null && model != null) {
|
||||
tes.startDrawingQuads();
|
||||
TechneUtil.renderWithIcon(model, icon, null, Tessellator.instance, te.getWorldObj(), 0, 0, 0, null, false);
|
||||
tes.draw();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user