Update upstream BD/B/CB/S
Note to other developers: This commit may require you to wipe your workspace as a result of the changes to BD. --- work/BuildData Submodule work/BuildData f527a8ff..d56672db: > Mappings Update --- work/Bukkit Submodule work/Bukkit 0c1d258bb..db06c80d7: > Add list of entities to EntityTransformEvent > SPIGOT-4347: Add API to allow storing arbitrary values on ItemStacks ---work/CraftBukkit Submodule work/CraftBukkit 6a398ac44..068dab5be: > Enable optional source JAR shading via profile shadeSourcesJar > Use ImmutableList rather than AbstractList for CraftMetaBook > Fix setRecipes(List) not setting Knowledge Book recipes. > Mappings Update > Add list of entities to EntityTransformEvent & move die calls > SPIGOT-4347: Add API to allow storing arbitrary values on ItemStacks > Add Vanilla help to default permissions --- work/Spigot Submodule work/Spigot a1f2566f6..e769fe4d9: > Mappings Update > Rebuild patches
This commit is contained in:
@@ -4,32 +4,20 @@ Date: Mon, 10 Sep 2018 23:56:36 -0400
|
||||
Subject: [PATCH] Prevent Mob AI Rules from Loading Chunks
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 4e8eb137a..479a84a25 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess {
|
||||
}
|
||||
}
|
||||
|
||||
+ public Fluid getFluid(BlockPosition blockposition) { return b(blockposition); } // Paper - OBFHELPER
|
||||
public Fluid b(BlockPosition blockposition) {
|
||||
return this.b(blockposition.getX(), blockposition.getY(), blockposition.getZ());
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalRemoveBlock.java b/src/main/java/net/minecraft/server/PathfinderGoalRemoveBlock.java
|
||||
index 9c72848f1..d007d0387 100644
|
||||
index 2b15aa6c9..3ca32123b 100644
|
||||
--- a/src/main/java/net/minecraft/server/PathfinderGoalRemoveBlock.java
|
||||
+++ b/src/main/java/net/minecraft/server/PathfinderGoalRemoveBlock.java
|
||||
@@ -0,0 +0,0 @@ public class PathfinderGoalRemoveBlock extends PathfinderGoalGotoTarget {
|
||||
private final Block f;
|
||||
private final EntityInsentient g;
|
||||
private final EntityInsentient entity;
|
||||
private int h;
|
||||
+ private World world; // Paper
|
||||
|
||||
public PathfinderGoalRemoveBlock(Block block, EntityCreature entitycreature, double d0, int i) {
|
||||
super(entitycreature, d0, 24, i);
|
||||
this.f = block;
|
||||
this.g = entitycreature;
|
||||
this.entity = entitycreature;
|
||||
+ this.world = entitycreature.world; // Paper
|
||||
}
|
||||
|
||||
@@ -65,7 +53,7 @@ index 9c72848f1..d007d0387 100644
|
||||
return block == this.f && iworldreader.getType(blockposition.up()).isAir() && iworldreader.getType(blockposition.up(2)).isAir();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/RandomPositionGenerator.java b/src/main/java/net/minecraft/server/RandomPositionGenerator.java
|
||||
index 800e0046a..bfa6c2eef 100644
|
||||
index f252ef243..bfa6c2eef 100644
|
||||
--- a/src/main/java/net/minecraft/server/RandomPositionGenerator.java
|
||||
+++ b/src/main/java/net/minecraft/server/RandomPositionGenerator.java
|
||||
@@ -0,0 +0,0 @@ public class RandomPositionGenerator {
|
||||
@@ -80,32 +68,31 @@ index 800e0046a..bfa6c2eef 100644
|
||||
}
|
||||
|
||||
private static boolean b(BlockPosition blockposition, EntityCreature entitycreature) {
|
||||
- return entitycreature.world.b(blockposition).a(TagsFluid.WATER);
|
||||
- return entitycreature.world.getFluid(blockposition).a(TagsFluid.WATER);
|
||||
+ Fluid fluid = entitycreature.world.getFluidIfLoaded(blockposition); // Paper
|
||||
+ return fluid != null && fluid.a(TagsFluid.WATER); // Paper
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index a5c655155..016d50d3c 100644
|
||||
index 5fe4734e3..eabf50e24 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||
return chunk.getType(blockposition);
|
||||
}
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
+ public Fluid getFluidIfLoaded(BlockPosition blockposition) {
|
||||
+ if (blockposition.isInvalidYLocation()) { // Paper
|
||||
+ return getFluid(blockposition);
|
||||
+ } else {
|
||||
+ Chunk chunk = this.getChunkIfLoaded(blockposition);
|
||||
+
|
||||
|
||||
+ return chunk != null ? chunk.getFluid(blockposition) : null;
|
||||
+ }
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ public Fluid getFluid(BlockPosition blockposition) { return b(blockposition); } // Paper - OBFHELPER
|
||||
public Fluid b(BlockPosition blockposition) {
|
||||
public Fluid getFluid(BlockPosition blockposition) {
|
||||
if (blockposition.isInvalidYLocation()) { // Paper
|
||||
return FluidTypes.a.i();
|
||||
--
|
||||
Reference in New Issue
Block a user