fix invalid mob spawner nullpointerexception

This commit is contained in:
LAX1DUDE 2022-01-24 22:39:23 -08:00
parent 3d73f98d49
commit 6f06daa2a5

View File

@ -9,8 +9,10 @@ public class TileEntityMobSpawnerRenderer extends TileEntitySpecialRenderer {
TileEntityMobSpawner spawner = (TileEntityMobSpawner) var1;
if(spawner.mobObject == null) {
spawner.mobObject = EntityList.createEntityByName(spawner.mobID, spawner.worldObj);
if(spawner.mobObject != null) {
spawner.mobObject.setWorld(spawner.worldObj);
}
}
if(spawner.mobObject != null) {
EaglerAdapter.glPushMatrix();
EaglerAdapter.glTranslatef((float)var2 + 0.5F, (float)var4 + 0.4f, (float)var6 + 0.5F);