Check the block water mobs spawn in, not the block under
Dieser Commit ist enthalten in:
Ursprung
77cdcc281b
Commit
8672653871
@ -1,11 +1,11 @@
|
|||||||
From d4985b594d55ee94ef5b68677eda3496d6cd8149 Mon Sep 17 00:00:00 2001
|
From 3144b183fd16deaacce4e8dd932ba58849b03aa9 Mon Sep 17 00:00:00 2001
|
||||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||||
Date: Thu, 14 Apr 2016 17:48:56 -0500
|
Date: Thu, 14 Apr 2016 17:48:56 -0500
|
||||||
Subject: [PATCH] Water mobs should only spawn in the water
|
Subject: [PATCH] Water mobs should only spawn in the water
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityWaterAnimal.java b/src/main/java/net/minecraft/server/EntityWaterAnimal.java
|
diff --git a/src/main/java/net/minecraft/server/EntityWaterAnimal.java b/src/main/java/net/minecraft/server/EntityWaterAnimal.java
|
||||||
index f4764da..2aa0391 100644
|
index f4764da..9cd85f1 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityWaterAnimal.java
|
--- a/src/main/java/net/minecraft/server/EntityWaterAnimal.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityWaterAnimal.java
|
+++ b/src/main/java/net/minecraft/server/EntityWaterAnimal.java
|
||||||
@@ -11,7 +11,15 @@ public abstract class EntityWaterAnimal extends EntityInsentient implements IAni
|
@@ -11,7 +11,15 @@ public abstract class EntityWaterAnimal extends EntityInsentient implements IAni
|
||||||
@ -18,9 +18,9 @@ index f4764da..2aa0391 100644
|
|||||||
+ int i = MathHelper.floor(this.locX);
|
+ int i = MathHelper.floor(this.locX);
|
||||||
+ int j = MathHelper.floor(this.getBoundingBox().b); // minY of bounding box
|
+ int j = MathHelper.floor(this.getBoundingBox().b); // minY of bounding box
|
||||||
+ int k = MathHelper.floor(this.locZ);
|
+ int k = MathHelper.floor(this.locZ);
|
||||||
+ Block below = this.world.getType(new BlockPosition(i, j, k).down()).getBlock();
|
+ Block block = this.world.getType(new BlockPosition(i, j, k)).getBlock();
|
||||||
+
|
+
|
||||||
+ return below == Blocks.WATER || below == Blocks.FLOWING_WATER;
|
+ return block == Blocks.WATER || block == Blocks.FLOWING_WATER;
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren