summaryrefslogtreecommitdiffstats
path: root/nms-patches/TileEntityBeacon.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/TileEntityBeacon.patch')
-rw-r--r--nms-patches/TileEntityBeacon.patch55
1 files changed, 3 insertions, 52 deletions
diff --git a/nms-patches/TileEntityBeacon.patch b/nms-patches/TileEntityBeacon.patch
index c5a6e3dc..d82cb1be 100644
--- a/nms-patches/TileEntityBeacon.patch
+++ b/nms-patches/TileEntityBeacon.patch
@@ -1,5 +1,5 @@
---- /home/matt/mc-dev-private//net/minecraft/server/TileEntityBeacon.java 2015-02-26 22:40:23.119608134 +0000
-+++ src/main/java/net/minecraft/server/TileEntityBeacon.java 2015-02-26 22:40:23.119608134 +0000
+--- /home/matt/mc-dev-private//net/minecraft/server/TileEntityBeacon.java 2015-05-22 14:12:45.051214351 +0100
++++ src/main/java/net/minecraft/server/TileEntityBeacon.java 2015-05-22 14:12:45.051214351 +0100
@@ -5,6 +5,11 @@
import java.util.Iterator;
import java.util.List;
@@ -43,18 +43,7 @@
public TileEntityBeacon() {}
-@@ -169,8 +198,8 @@
-
- public void a(NBTTagCompound nbttagcompound) {
- super.a(nbttagcompound);
-- this.k = nbttagcompound.getInt("Primary");
-- this.l = nbttagcompound.getInt("Secondary");
-+ this.k = validateEffect(nbttagcompound.getInt("Primary")); // CraftBukkit
-+ this.l = validateEffect(nbttagcompound.getInt("Secondary")); // CraftBukkit
- this.j = nbttagcompound.getInt("Levels");
- }
-
-@@ -236,7 +265,7 @@
+@@ -246,7 +275,7 @@
}
public int getMaxStackSize() {
@@ -63,41 +52,3 @@
}
public boolean a(EntityHuman entityhuman) {
-@@ -282,11 +311,11 @@
- break;
-
- case 1:
-- this.k = j;
-+ this.k = validateEffect(j);
- break;
-
- case 2:
-- this.l = j;
-+ this.l = validateEffect(j);
- }
-
- }
-@@ -326,4 +355,23 @@
- return this.a;
- }
- }
-+
-+ // CraftBukkit start
-+ public int validateEffect(int 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:
-+ i = 0;
-+ break;
-+ }
-+ return i;
-+ }
-+ // CraftBukkit end
- }