mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-11-26 04:25:39 +01:00
074471c3de
Potential fix of #331 Whether or not cursors are present on a map - the game forces the server to track players if the map is rendered. This change wasn't liked by the maps, so - revert it for now. I'll probably find a way to optimise this later...
28 lines
1.2 KiB
Diff
28 lines
1.2 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/server/EntityBat.java b/src/main/java/net/minecraft/server/EntityBat.java
|
|
index bdcbdc21f986852277dcc41a2b0f385f8caeb9f7..dff2dc82c2a6b26c6e41b3949953abcaf379b20a 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityBat.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityBat.java
|
|
@@ -208,7 +208,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()) {
|
|
@@ -217,6 +217,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);
|
|
}
|
|
}
|