mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 07:20:24 +01:00
Don't use ender chests or stone as hiding materials
This commit is contained in:
parent
41c3037566
commit
c79ce8ec88
1 changed files with 8 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
||||||
From 5357ce98746067c6d3ebcb4267b5722d5098a419 Mon Sep 17 00:00:00 2001
|
From 3143a832c4b33f687ff42159c04e70b1d1e4ddc9 Mon Sep 17 00:00:00 2001
|
||||||
From: lishid <lishid@gmail.com>
|
From: lishid <lishid@gmail.com>
|
||||||
Date: Sat, 16 Feb 2013 10:05:25 +1100
|
Date: Sat, 16 Feb 2013 10:05:25 +1100
|
||||||
Subject: [PATCH] Add oreobfuscator for Spigot.
|
Subject: [PATCH] Add oreobfuscator for Spigot.
|
||||||
|
@ -10,10 +10,10 @@ Subject: [PATCH] Add oreobfuscator for Spigot.
|
||||||
.../minecraft/server/PlayerInteractManager.java | 5 +
|
.../minecraft/server/PlayerInteractManager.java | 5 +
|
||||||
.../java/org/bukkit/craftbukkit/CraftServer.java | 6 +
|
.../java/org/bukkit/craftbukkit/CraftServer.java | 6 +
|
||||||
.../java/org/bukkit/craftbukkit/CraftWorld.java | 4 +
|
.../java/org/bukkit/craftbukkit/CraftWorld.java | 4 +
|
||||||
.../bukkit/craftbukkit/OrebfuscatorManager.java | 128 +++++++++++++++++++++
|
.../bukkit/craftbukkit/OrebfuscatorManager.java | 130 +++++++++++++++++++++
|
||||||
src/main/java/org/bukkit/craftbukkit/Spigot.java | 8 ++
|
src/main/java/org/bukkit/craftbukkit/Spigot.java | 8 ++
|
||||||
src/main/resources/configurations/bukkit.yml | 6 +
|
src/main/resources/configurations/bukkit.yml | 6 +
|
||||||
9 files changed, 179 insertions(+), 1 deletion(-)
|
9 files changed, 181 insertions(+), 1 deletion(-)
|
||||||
create mode 100644 src/main/java/org/bukkit/craftbukkit/OrebfuscatorManager.java
|
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
|
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
|
||||||
|
@ -157,10 +157,10 @@ index 94e07fe..21bd64a 100644
|
||||||
public int cactusGrowthModifier = 100;
|
public int cactusGrowthModifier = 100;
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/OrebfuscatorManager.java b/src/main/java/org/bukkit/craftbukkit/OrebfuscatorManager.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/OrebfuscatorManager.java b/src/main/java/org/bukkit/craftbukkit/OrebfuscatorManager.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000..5bb743f
|
index 0000000..a93b054
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/OrebfuscatorManager.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/OrebfuscatorManager.java
|
||||||
@@ -0,0 +1,128 @@
|
@@ -0,0 +1,130 @@
|
||||||
+package org.bukkit.craftbukkit;
|
+package org.bukkit.craftbukkit;
|
||||||
+
|
+
|
||||||
+import java.util.ArrayList;
|
+import java.util.ArrayList;
|
||||||
|
@ -195,9 +195,11 @@ index 0000000..5bb743f
|
||||||
+ List<Byte> blocks = new ArrayList<Byte>();
|
+ List<Byte> blocks = new ArrayList<Byte>();
|
||||||
+ for (int i = 0; i < obfuscateBlocks.length; i++) {
|
+ for (int i = 0; i < obfuscateBlocks.length; i++) {
|
||||||
+ if (obfuscateBlocks[i]) {
|
+ if (obfuscateBlocks[i]) {
|
||||||
|
+ if (i != Block.STONE.id && i != Block.ENDER_CHEST.id) {
|
||||||
+ blocks.add((byte) i);
|
+ blocks.add((byte) i);
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
|
+ }
|
||||||
+ ores = blocks.toArray(new Byte[blocks.size()]);
|
+ ores = blocks.toArray(new Byte[blocks.size()]);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
|
Loading…
Reference in a new issue