From 6f06daa2a5341cc3f9bd284c993b8fb6b2423a04 Mon Sep 17 00:00:00 2001 From: LAX1DUDE Date: Mon, 24 Jan 2022 22:39:23 -0800 Subject: [PATCH] fix invalid mob spawner nullpointerexception --- .../java/net/minecraft/src/TileEntityMobSpawnerRenderer.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/minecraft/src/TileEntityMobSpawnerRenderer.java b/src/main/java/net/minecraft/src/TileEntityMobSpawnerRenderer.java index bdaa85b..7264857 100644 --- a/src/main/java/net/minecraft/src/TileEntityMobSpawnerRenderer.java +++ b/src/main/java/net/minecraft/src/TileEntityMobSpawnerRenderer.java @@ -9,7 +9,9 @@ public class TileEntityMobSpawnerRenderer extends TileEntitySpecialRenderer { TileEntityMobSpawner spawner = (TileEntityMobSpawner) var1; if(spawner.mobObject == null) { spawner.mobObject = EntityList.createEntityByName(spawner.mobID, spawner.worldObj); - spawner.mobObject.setWorld(spawner.worldObj); + if(spawner.mobObject != null) { + spawner.mobObject.setWorld(spawner.worldObj); + } } if(spawner.mobObject != null) { EaglerAdapter.glPushMatrix();