Yatopia/patches/server/0052-Smol-entity-optimisations.patch
2021-06-02 22:37:38 -04:00

28 lines
1.3 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ivan Pekov <ivan@mrivanplays.com>
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 b3acd9518791488a2206f28182a6401c8e3db722..9baa0cca1dc2a39cc38772e596c0ca0c54883bb0 100644
--- a/src/main/java/net/minecraft/world/entity/ambient/EntityBat.java
+++ b/src/main/java/net/minecraft/world/entity/ambient/EntityBat.java
@@ -234,7 +234,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()) {
@@ -243,6 +243,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);
}
}