mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
Notify all adjacent blocks, thanks Aikar
By: md_5 <md_5@live.com.au>
This commit is contained in:
parent
fff6e2d3fd
commit
d14bfbaa67
1 changed files with 14 additions and 13 deletions
|
@ -1,4 +1,4 @@
|
|||
From c78d4989be8b714b9e28ec16ff4569f165824da4 Mon Sep 17 00:00:00 2001
|
||||
From e54edb89cff47a39424a7c2407dd5b401457bef6 Mon Sep 17 00:00:00 2001
|
||||
From: lishid <lishid@gmail.com>
|
||||
Date: Mon, 21 Jan 2013 16:59:04 +1100
|
||||
Subject: [PATCH] Add oreobfuscator for Spigot.
|
||||
|
@ -10,9 +10,9 @@ Subject: [PATCH] Add oreobfuscator for Spigot.
|
|||
.../minecraft/server/PlayerInteractManager.java | 5 ++
|
||||
.../java/org/bukkit/craftbukkit/CraftServer.java | 9 +++
|
||||
.../java/org/bukkit/craftbukkit/CraftWorld.java | 4 +
|
||||
.../bukkit/craftbukkit/OrebfuscatorManager.java | 91 ++++++++++++++++++++++
|
||||
.../bukkit/craftbukkit/OrebfuscatorManager.java | 92 ++++++++++++++++++++++
|
||||
src/main/resources/configurations/bukkit.yml | 5 ++
|
||||
8 files changed, 136 insertions(+), 1 deletion(-)
|
||||
8 files changed, 137 insertions(+), 1 deletion(-)
|
||||
create mode 100644 src/main/java/org/bukkit/craftbukkit/OrebfuscatorManager.java
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
|
||||
|
@ -166,10 +166,10 @@ index 856307f..4861609 100644
|
|||
public int cactusGrowthModifier = 100;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/OrebfuscatorManager.java b/src/main/java/org/bukkit/craftbukkit/OrebfuscatorManager.java
|
||||
new file mode 100644
|
||||
index 0000000..175d04f
|
||||
index 0000000..8d4d4d3
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/OrebfuscatorManager.java
|
||||
@@ -0,0 +1,91 @@
|
||||
@@ -0,0 +1,92 @@
|
||||
+package org.bukkit.craftbukkit;
|
||||
+
|
||||
+import net.minecraft.server.Block;
|
||||
|
@ -237,15 +237,16 @@ index 0000000..175d04f
|
|||
+ if (obfuscateBlocks[id]) {
|
||||
+ // Send the update
|
||||
+ world.notify(x, y, z);
|
||||
+ }
|
||||
+
|
||||
+ if (radius != 0) {
|
||||
+ updateNearbyBlocks(world, x + 1, y, z, radius - 1);
|
||||
+ updateNearbyBlocks(world, x - 1, y, z, radius - 1);
|
||||
+ updateNearbyBlocks(world, x, y + 1, z, radius - 1);
|
||||
+ updateNearbyBlocks(world, x, y - 1, z, radius - 1);
|
||||
+ updateNearbyBlocks(world, x, y, z + 1, radius - 1);
|
||||
+ updateNearbyBlocks(world, x, y, z - 1, radius - 1);
|
||||
+ }
|
||||
+ // Check other blocks for updates
|
||||
+ if (radius != 0) {
|
||||
+ updateNearbyBlocks(world, x + 1, y, z, radius - 1);
|
||||
+ updateNearbyBlocks(world, x - 1, y, z, radius - 1);
|
||||
+ updateNearbyBlocks(world, x, y + 1, z, radius - 1);
|
||||
+ updateNearbyBlocks(world, x, y - 1, z, radius - 1);
|
||||
+ updateNearbyBlocks(world, x, y, z + 1, radius - 1);
|
||||
+ updateNearbyBlocks(world, x, y, z - 1, radius - 1);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
|
|
Loading…
Reference in a new issue