From 30006325db48d569d58a5579ce351f9f5eaff7e8 Mon Sep 17 00:00:00 2001 From: wizjany Date: Sat, 19 Apr 2014 13:14:14 -0400 Subject: [PATCH] Update CraftBukkit packaging for 1.7.9. --- pom.xml | 2 +- .../worldedit/bukkit/DefaultNmsBlock.java | 51 +++++++++++++++--- .../resources/nmsblocks/CBXNmsBlock_175.class | Bin 13883 -> 13808 bytes 3 files changed, 44 insertions(+), 9 deletions(-) diff --git a/pom.xml b/pom.xml index ffd217f31..b6b154888 100644 --- a/pom.xml +++ b/pom.xml @@ -469,7 +469,7 @@ org.bukkit craftbukkit - 1.7.5-R0.1-SNAPSHOT + 1.7.9-R0.1-SNAPSHOT compile jar true diff --git a/src/bukkit/java/com/sk89q/worldedit/bukkit/DefaultNmsBlock.java b/src/bukkit/java/com/sk89q/worldedit/bukkit/DefaultNmsBlock.java index 6f85b39dc..23d5e64e8 100644 --- a/src/bukkit/java/com/sk89q/worldedit/bukkit/DefaultNmsBlock.java +++ b/src/bukkit/java/com/sk89q/worldedit/bukkit/DefaultNmsBlock.java @@ -25,9 +25,9 @@ import com.sk89q.worldedit.blocks.BaseBlock; import com.sk89q.worldedit.blocks.TileEntityBlock; import com.sk89q.worldedit.world.DataException; import com.sk89q.worldedit.foundation.Block; -import net.minecraft.server.v1_7_R2.*; +import net.minecraft.server.v1_7_R3.*; import org.bukkit.World; -import org.bukkit.craftbukkit.v1_7_R2.CraftWorld; +import org.bukkit.craftbukkit.v1_7_R3.CraftWorld; import java.lang.reflect.Field; import java.lang.reflect.Method; @@ -51,7 +51,7 @@ public class DefaultNmsBlock extends NmsBlock { static { Field field; try { - field = net.minecraft.server.v1_7_R2.Block.class.getDeclaredField("isTileEntity"); + field = net.minecraft.server.v1_7_R3.Block.class.getDeclaredField("isTileEntity"); field.setAccessible(true); } catch (NoSuchFieldException e) { // logger.severe("Could not find NMS block tile entity field!"); @@ -239,7 +239,7 @@ public class DefaultNmsBlock extends NmsBlock { } public static boolean hasTileEntity(int type) { - net.minecraft.server.v1_7_R2.Block nmsBlock = getNmsBlock(type); + net.minecraft.server.v1_7_R3.Block nmsBlock = getNmsBlock(type); if (nmsBlock == null) { return false; } @@ -251,8 +251,8 @@ public class DefaultNmsBlock extends NmsBlock { } } - public static net.minecraft.server.v1_7_R2.Block getNmsBlock(int type) { - return net.minecraft.server.v1_7_R2.Block.e(type); + public static net.minecraft.server.v1_7_R3.Block getNmsBlock(int type) { + return net.minecraft.server.v1_7_R3.Block.e(type); } /** @@ -265,7 +265,42 @@ public class DefaultNmsBlock extends NmsBlock { private static Tag toNative(NBTBase foreign) { // temporary fix since mojang removed names from tags // our nbt spec will need to be updated to theirs - return toNative(NBTBase.getTagName(foreign.getTypeId()), foreign); + return toNative(getTagName(foreign.getTypeId()), foreign); + } + + // seriously these two methods are hacky - our jnbt spec needs updating + // copied from NMS 1.7.5- code, since it was removed in 1.7.8 + private static String getTagName(int i) { + switch (i) { + case 0: + return "TAG_End"; + case 1: + return "TAG_Byte"; + case 2: + return "TAG_Short"; + case 3: + return "TAG_Int"; + case 4: + return "TAG_Long"; + case 5: + return "TAG_Float"; + case 6: + return "TAG_Double"; + case 7: + return "TAG_Byte_Array"; + case 8: + return "TAG_String"; + case 9: + return "TAG_List"; + case 10: + return "TAG_Compound"; + case 11: + return "TAG_Int_Array"; + case 99: + return "Any Numeric Tag"; + default: + return "UNKNOWN"; + } } /** @@ -431,7 +466,7 @@ public class DefaultNmsBlock extends NmsBlock { } public static boolean isValidBlockType(int type) throws NoClassDefFoundError { - return type == 0 || (type >= 1 && net.minecraft.server.v1_7_R2.Block.e(type) != null); + return type == 0 || (type >= 1 && net.minecraft.server.v1_7_R3.Block.e(type) != null); } } diff --git a/src/bukkit/resources/nmsblocks/CBXNmsBlock_175.class b/src/bukkit/resources/nmsblocks/CBXNmsBlock_175.class index b8eff9075f3c9f2c6d5f6e8ada50eb9efb7d08ff..6afbcdcc592164ebf507fe5ad50442b4af8fa7e2 100644 GIT binary patch delta 3166 zcmZ9O33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