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 56dbac9b4d97bf012a99e138add98fcc8ae453e4..cfa7da5d8067d3dcbb089ff96ce36ad52b42f734 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); } }