Rebuild and simplify map call

This commit is contained in:
Zach Brown 2018-08-25 22:48:24 -04:00
parent c57bfef1e9
commit 00b551913b
4 changed files with 12 additions and 14 deletions

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Add source block to BlockPhysicsEvent
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 2f85a0fa0..7b694efb6 100644 index 16d0c0d45..a4d9f0d5f 100644
--- a/src/main/java/net/minecraft/server/World.java --- a/src/main/java/net/minecraft/server/World.java
+++ b/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 GeneratorAccess, IIBlockAccess, AutoClose @@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose

View file

@ -100,7 +100,7 @@ index 000000000..1ba8477bf
+} +}
diff --git a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java diff --git a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java
new file mode 100644 new file mode 100644
index 000000000..f44eaaccc index 000000000..ed21f8515
--- /dev/null --- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java +++ b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java
@@ -0,0 +0,0 @@ @@ -0,0 +0,0 @@
@ -700,12 +700,10 @@ index 000000000..f44eaaccc
+ } + }
+ +
+ private void updateBlock(World world, BlockPosition blockPosition) { + private void updateBlock(World world, BlockPosition blockPosition) {
+ if (world.isLoaded(blockPosition)) { + IBlockData blockData = world.getTypeIfLoaded(blockPosition);
+ IBlockData blockData = world.getType(blockPosition);
+ +
+ if (obfuscateGlobal[ChunkSection.GLOBAL_PALETTE.getDataBits(blockData)]) { + if (blockData != null && obfuscateGlobal[ChunkSection.GLOBAL_PALETTE.getDataBits(blockData)]) {
+ world.notify(blockPosition, blockData, blockData, 3); + world.notify(blockPosition, blockData, blockData, 3);
+ }
+ } + }
+ } + }
+ +
@ -1114,7 +1112,7 @@ index 233cbb6d6..8c116b74c 100644
if (flag) { if (flag) {
this.skyLight = new NibbleArray(); this.skyLight = new NibbleArray();
diff --git a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java diff --git a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
index 668829c5b..7c414ed8a 100644 index ed20454d0..2b14e0051 100644
--- a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java --- a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
+++ b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java +++ b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
@@ -0,0 +0,0 @@ public class ChunkTaskScheduler extends Scheduler<ChunkCoordIntPair, ChunkStatus @@ -0,0 +0,0 @@ public class ChunkTaskScheduler extends Scheduler<ChunkCoordIntPair, ChunkStatus
@ -1515,7 +1513,7 @@ index 584a86c11..62a7d3c23 100644
if (enumskyblock == EnumSkyBlock.SKY) { if (enumskyblock == EnumSkyBlock.SKY) {
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 16d0c0d45..2f85a0fa0 100644 index a4d9f0d5f..7b694efb6 100644
--- a/src/main/java/net/minecraft/server/World.java --- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java
@@ -0,0 +0,0 @@ @@ -0,0 +0,0 @@

View file

@ -7,7 +7,7 @@ Avoids a hashmap lookup by cacheing a reference to the CraftBlockData
and cloning it when one is needed. and cloning it when one is needed.
diff --git a/src/main/java/net/minecraft/server/BlockData.java b/src/main/java/net/minecraft/server/BlockData.java diff --git a/src/main/java/net/minecraft/server/BlockData.java b/src/main/java/net/minecraft/server/BlockData.java
index 4dd6c3276..1b226a77e 100644 index 4dd6c32761..1b226a77e0 100644
--- a/src/main/java/net/minecraft/server/BlockData.java --- a/src/main/java/net/minecraft/server/BlockData.java
+++ b/src/main/java/net/minecraft/server/BlockData.java +++ b/src/main/java/net/minecraft/server/BlockData.java
@@ -0,0 +0,0 @@ @@ -0,0 +0,0 @@
@ -34,7 +34,7 @@ index 4dd6c3276..1b226a77e 100644
+ // Paper end + // Paper end
} }
diff --git a/src/main/java/net/minecraft/server/IBlockData.java b/src/main/java/net/minecraft/server/IBlockData.java diff --git a/src/main/java/net/minecraft/server/IBlockData.java b/src/main/java/net/minecraft/server/IBlockData.java
index b57f6efb3..7b1d750f3 100644 index b57f6efb3a..7b1d750f3a 100644
--- a/src/main/java/net/minecraft/server/IBlockData.java --- a/src/main/java/net/minecraft/server/IBlockData.java
+++ b/src/main/java/net/minecraft/server/IBlockData.java +++ b/src/main/java/net/minecraft/server/IBlockData.java
@@ -0,0 +0,0 @@ public interface IBlockData extends IBlockDataHolder<IBlockData> { @@ -0,0 +0,0 @@ public interface IBlockData extends IBlockDataHolder<IBlockData> {
@ -47,7 +47,7 @@ index b57f6efb3..7b1d750f3 100644
return this.getBlock().n(this); return this.getBlock().n(this);
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
index a4f3dd1b0..baaace693 100644 index a4f3dd1b03..baaace6937 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
@@ -0,0 +0,0 @@ public class CraftBlockData implements BlockData { @@ -0,0 +0,0 @@ public class CraftBlockData implements BlockData {

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Slime Pathfinder Events
diff --git a/src/main/java/net/minecraft/server/EntitySlime.java b/src/main/java/net/minecraft/server/EntitySlime.java diff --git a/src/main/java/net/minecraft/server/EntitySlime.java b/src/main/java/net/minecraft/server/EntitySlime.java
index eeaf98e82..8752c62b0 100644 index eeaf98e8..8752c62b 100644
--- a/src/main/java/net/minecraft/server/EntitySlime.java --- a/src/main/java/net/minecraft/server/EntitySlime.java
+++ b/src/main/java/net/minecraft/server/EntitySlime.java +++ b/src/main/java/net/minecraft/server/EntitySlime.java
@@ -0,0 +0,0 @@ public class EntitySlime extends EntityInsentient implements IMonster { @@ -0,0 +0,0 @@ public class EntitySlime extends EntityInsentient implements IMonster {
@ -115,7 +115,7 @@ index eeaf98e82..8752c62b0 100644
+ // Paper end + // Paper end
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSlime.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSlime.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSlime.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSlime.java
index 18e7ef80a..8403c1e01 100644 index 18e7ef80..8403c1e0 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSlime.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSlime.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSlime.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSlime.java
@@ -0,0 +0,0 @@ public class CraftSlime extends CraftMob implements Slime { @@ -0,0 +0,0 @@ public class CraftSlime extends CraftMob implements Slime {