From afd40e5d12a3e99ba5051970133d98d50cb91686 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 19 Mar 2016 10:45:28 -0400 Subject: [PATCH] fix light level check on monsters --- .../0094-Optimized-Light-Level-Comparisons.patch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Spigot-Server-Patches/0094-Optimized-Light-Level-Comparisons.patch b/Spigot-Server-Patches/0094-Optimized-Light-Level-Comparisons.patch index 0fa222b09c..0e5da61ca5 100644 --- a/Spigot-Server-Patches/0094-Optimized-Light-Level-Comparisons.patch +++ b/Spigot-Server-Patches/0094-Optimized-Light-Level-Comparisons.patch @@ -1,4 +1,4 @@ -From d2745c17b2cd8c0c9edf0d6cc7adeee17cdd4432 Mon Sep 17 00:00:00 2001 +From d18a0f9f4674037220125a5074a84138353227ee Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 18 Mar 2016 21:22:56 -0400 Subject: [PATCH] Optimized Light Level Comparisons @@ -91,7 +91,7 @@ index 097d11e..d0fa4ae 100644 if (random.nextInt((int) ((100 / (this == Blocks.PUMPKIN_STEM ? world.spigotConfig.pumpkinModifier : world.spigotConfig.melonModifier)) * (25.0F / f)) + 1) == 0) { // Spigot diff --git a/src/main/java/net/minecraft/server/EntityMonster.java b/src/main/java/net/minecraft/server/EntityMonster.java -index 64f4754..6dc21fb 100644 +index 64f4754..7aea23a 100644 --- a/src/main/java/net/minecraft/server/EntityMonster.java +++ b/src/main/java/net/minecraft/server/EntityMonster.java @@ -118,17 +118,17 @@ public abstract class EntityMonster extends EntityCreature implements IMonster { @@ -107,10 +107,10 @@ index 64f4754..6dc21fb 100644 this.world.c(10); - i = this.world.getLightLevel(blockposition); -+ passes = world.isLightLevel(blockposition, this.random.nextInt(8)); // Paper ++ passes = !world.isLightLevel(blockposition, this.random.nextInt(8)); // Paper this.world.c(j); - } -+ } else { passes = world.isLightLevel(blockposition, this.random.nextInt(8)); } // Paper ++ } else { passes = !world.isLightLevel(blockposition, this.random.nextInt(8)); } // Paper - return i <= this.random.nextInt(8); + return passes; // Paper