diff --git a/nms-patches/TileEntityBeacon.patch b/nms-patches/TileEntityBeacon.patch index 6a881eb86f..0bee0bf3f4 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 }