diff options
author | Thinkofdeath <thinkofdeath@spigotmc.org> | 2014-12-27 14:48:38 +0000 |
---|---|---|
committer | Thinkofdeath <thinkofdeath@spigotmc.org> | 2014-12-27 14:48:38 +0000 |
commit | e1c64bf0ebd9ad7c4a396a97ad837288ca006954 (patch) | |
tree | 5069a6bdf37d3f632259bc225a98ccf9284cde11 | |
parent | c2c8dda5654977e9e94ce3dab0d2dfac2651e743 (diff) | |
download | craftbukkit-e1c64bf0ebd9ad7c4a396a97ad837288ca006954.tar craftbukkit-e1c64bf0ebd9ad7c4a396a97ad837288ca006954.tar.gz craftbukkit-e1c64bf0ebd9ad7c4a396a97ad837288ca006954.tar.lz craftbukkit-e1c64bf0ebd9ad7c4a396a97ad837288ca006954.tar.xz craftbukkit-e1c64bf0ebd9ad7c4a396a97ad837288ca006954.zip |
Make the effect filter stricter
-rw-r--r-- | nms-patches/TileEntityBeacon.patch | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/nms-patches/TileEntityBeacon.patch b/nms-patches/TileEntityBeacon.patch index 6a881eb8..0bee0bf3 100644 --- a/nms-patches/TileEntityBeacon.patch +++ b/nms-patches/TileEntityBeacon.patch @@ -1,5 +1,5 @@ ---- ../work/decompile-8eb82bde//net/minecraft/server/TileEntityBeacon.java 2014-12-27 14:03:08.349290689 +0000 -+++ src/main/java/net/minecraft/server/TileEntityBeacon.java 2014-12-27 14:03:08.349290689 +0000 +--- ../work/decompile-8eb82bde//net/minecraft/server/TileEntityBeacon.java 2014-12-27 14:48:34.677261097 +0000 ++++ src/main/java/net/minecraft/server/TileEntityBeacon.java 2014-12-27 14:48:34.677261097 +0000 @@ -5,6 +5,11 @@ import java.util.Iterator; import java.util.List; @@ -77,14 +77,28 @@ } } -@@ -307,4 +336,10 @@ +@@ -307,4 +336,24 @@ return super.c(i, j); } } + + // CraftBukkit start + public int validateEffect(int i) { -+ return i < 0 || i >= MobEffectList.byId.length || MobEffectList.byId[i] == null ? 0 : i; ++ i = i < 0 || i >= MobEffectList.byId.length || MobEffectList.byId[i] == null ? 0 : i; ++ switch (i) { ++ case 1: // MobEffectList.FASTER_MOVEMENT.id ++ case 3: // MobEffectList.FASTER_DIG.id ++ case 11: // MobEffectList.RESISTANCE.id ++ case 8: // MobEffectList.JUMP.id ++ case 5: // MobEffectList.INCREASE_DAMAGE.id ++ case 10: // MobEffectList.REGENERATION.id ++ break; ++ default: ++ System.out.println("Filtered: " + i); ++ i = 0; ++ break; ++ } ++ return i; + } + // CraftBukkit end } |