Fix spawner spawned slimes working for narslimmus

This commit is contained in:
Hubry committed 2020-02-06 01:25:47 +01:00
1 parent e2f0220dd4
commit e96550208b
1 file changed
+2
@@ -10,6 +10,7 @@
*/
package vazkii.botania.common.block.subtile.generating;
import net.minecraft.entity.SpawnReason;
import net.minecraft.entity.monster.SlimeEntity;
import net.minecraft.particles.ParticleTypes;
import net.minecraft.tileentity.TileEntityType;
@@ -94,6 +95,7 @@ public class SubTileNarslimmus extends TileEntityGeneratingFlower {
@SubscribeEvent
public static void onSpawn(LivingSpawnEvent.CheckSpawn event) {
if(event.getEntityLiving() instanceof SlimeEntity
&& event.getSpawnReason() == SpawnReason.NATURAL
&& event.getResult() != Event.Result.DENY
&& isSlimeChunk(event.getEntityLiving().world, event.getX(), event.getZ()))
event.getEntityLiving().getPersistentData().putBoolean(TAG_WORLD_SPAWNED, true);