From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Ivan Pekov Date: Mon, 4 Jan 2021 20:32:06 +0200 Subject: [PATCH] Smol entity optimisations diff --git a/src/main/java/net/minecraft/world/entity/ambient/EntityBat.java b/src/main/java/net/minecraft/world/entity/ambient/EntityBat.java index b8ff1af80e87d0715d71d62256f78f1646d82e01..75879558a4e3a209aed7dc006c6ffbe35323fe91 100644 --- a/src/main/java/net/minecraft/world/entity/ambient/EntityBat.java +++ b/src/main/java/net/minecraft/world/entity/ambient/EntityBat.java @@ -293,7 +293,7 @@ public class EntityBat extends EntityAmbient { if (blockposition.getY() >= generatoraccess.getSeaLevel()) { return false; } else { - int i = generatoraccess.getLightLevel(blockposition); + //int i = generatoraccess.getLightLevel(blockposition); // Yatopia - moved down byte b0 = 4; if (eJ()) { @@ -302,6 +302,7 @@ public class EntityBat extends EntityAmbient { return false; } + int i = generatoraccess.getLightLevel(blockposition); // Yatopia - moved from above return i > random.nextInt(b0) ? false : a(entitytypes, generatoraccess, enummobspawn, blockposition, random); } }