From 58a7a2ed4f60bf2d427c5945cdabf62b6f6c157c Mon Sep 17 00:00:00 2001 From: wizjany Date: Wed, 20 Mar 2013 00:11:27 -0400 Subject: [PATCH] Prepare for MC 1.5.1 (specifically, Bukkit renames). --- pom.xml | 10 +--- .../worldedit/bukkit/DefaultNmsBlock.java | 44 +++++++++--------- .../resources/nmsblocks/CBXNmsBlock_15.class | Bin 0 -> 12533 bytes 3 files changed, 24 insertions(+), 30 deletions(-) create mode 100644 src/main/resources/nmsblocks/CBXNmsBlock_15.class diff --git a/pom.xml b/pom.xml index dea947474..a4bfe0e46 100644 --- a/pom.xml +++ b/pom.xml @@ -125,7 +125,7 @@ org.bukkit craftbukkit - 1.5-R0.1-SNAPSHOT + 1.5.1-R0.1-SNAPSHOT compile jar true @@ -138,13 +138,7 @@ test jar - - - javax.servlet - servlet-api - 2.4 - provided - + diff --git a/src/main/java/com/sk89q/worldedit/bukkit/DefaultNmsBlock.java b/src/main/java/com/sk89q/worldedit/bukkit/DefaultNmsBlock.java index dee9a7ee0..d064b7af6 100644 --- a/src/main/java/com/sk89q/worldedit/bukkit/DefaultNmsBlock.java +++ b/src/main/java/com/sk89q/worldedit/bukkit/DefaultNmsBlock.java @@ -25,23 +25,23 @@ import java.util.List; import java.util.Map; import java.util.logging.Logger; -import net.minecraft.server.v1_5_R1.NBTBase; -import net.minecraft.server.v1_5_R1.NBTTagByte; -import net.minecraft.server.v1_5_R1.NBTTagByteArray; -import net.minecraft.server.v1_5_R1.NBTTagCompound; -import net.minecraft.server.v1_5_R1.NBTTagDouble; -import net.minecraft.server.v1_5_R1.NBTTagEnd; -import net.minecraft.server.v1_5_R1.NBTTagFloat; -import net.minecraft.server.v1_5_R1.NBTTagInt; -import net.minecraft.server.v1_5_R1.NBTTagIntArray; -import net.minecraft.server.v1_5_R1.NBTTagList; -import net.minecraft.server.v1_5_R1.NBTTagLong; -import net.minecraft.server.v1_5_R1.NBTTagShort; -import net.minecraft.server.v1_5_R1.NBTTagString; -import net.minecraft.server.v1_5_R1.TileEntity; +import net.minecraft.server.v1_5_R2.NBTBase; +import net.minecraft.server.v1_5_R2.NBTTagByte; +import net.minecraft.server.v1_5_R2.NBTTagByteArray; +import net.minecraft.server.v1_5_R2.NBTTagCompound; +import net.minecraft.server.v1_5_R2.NBTTagDouble; +import net.minecraft.server.v1_5_R2.NBTTagEnd; +import net.minecraft.server.v1_5_R2.NBTTagFloat; +import net.minecraft.server.v1_5_R2.NBTTagInt; +import net.minecraft.server.v1_5_R2.NBTTagIntArray; +import net.minecraft.server.v1_5_R2.NBTTagList; +import net.minecraft.server.v1_5_R2.NBTTagLong; +import net.minecraft.server.v1_5_R2.NBTTagShort; +import net.minecraft.server.v1_5_R2.NBTTagString; +import net.minecraft.server.v1_5_R2.TileEntity; import org.bukkit.World; -import org.bukkit.craftbukkit.v1_5_R1.CraftWorld; +import org.bukkit.craftbukkit.v1_5_R2.CraftWorld; import com.sk89q.jnbt.ByteArrayTag; import com.sk89q.jnbt.ByteTag; @@ -81,7 +81,7 @@ public class DefaultNmsBlock extends NmsBlock { static { Field field; try { - field = net.minecraft.server.v1_5_R1.Block.class.getDeclaredField("isTileEntity"); + field = net.minecraft.server.v1_5_R2.Block.class.getDeclaredField("isTileEntity"); field.setAccessible(true); } catch (NoSuchFieldException e) { // logger.severe("Could not find NMS block tile entity field!"); @@ -269,7 +269,7 @@ public class DefaultNmsBlock extends NmsBlock { } public static boolean hasTileEntity(int type) { - net.minecraft.server.v1_5_R1.Block nmsBlock = getNmsBlock(type); + net.minecraft.server.v1_5_R2.Block nmsBlock = getNmsBlock(type); if (nmsBlock == null) { return false; } @@ -281,11 +281,11 @@ public class DefaultNmsBlock extends NmsBlock { } } - public static net.minecraft.server.v1_5_R1.Block getNmsBlock(int type) { - if (type < 0 || type >= net.minecraft.server.v1_5_R1.Block.byId.length) { + public static net.minecraft.server.v1_5_R2.Block getNmsBlock(int type) { + if (type < 0 || type >= net.minecraft.server.v1_5_R2.Block.byId.length) { return null; } - return net.minecraft.server.v1_5_R1.Block.byId[type]; + return net.minecraft.server.v1_5_R2.Block.byId[type]; } /** @@ -439,7 +439,7 @@ public class DefaultNmsBlock extends NmsBlock { } public static boolean isValidBlockType(int type) throws NoClassDefFoundError { - return type == 0 || (type >= 1 && type < net.minecraft.server.v1_5_R1.Block.byId.length - && net.minecraft.server.v1_5_R1.Block.byId[type] != null); + return type == 0 || (type >= 1 && type < net.minecraft.server.v1_5_R2.Block.byId.length + && net.minecraft.server.v1_5_R2.Block.byId[type] != null); } } diff --git a/src/main/resources/nmsblocks/CBXNmsBlock_15.class b/src/main/resources/nmsblocks/CBXNmsBlock_15.class new file mode 100644 index 0000000000000000000000000000000000000000..68781e1986ca2916ed225b82d2009601278f46b9 GIT binary patch literal 12533 zcmb7K33yc16+Y+9WZulnW61_21QKP-1`#Za0V5_tm9)ZEdww`k(vWWZr}^#C%`ga?ibIyJx#+ z-m`B%`4kZ?&^mln!t)I}$P47@+-#b`?=kSSQ0GNndRgbi1~1|B4Dxb~K^|V}rB`HR znU`Lb`}tn3_3{M*TCVd7Sz4!ay+H-sU{D^fl#xccT&VLZgNnGx;EQ;*ENC#enOk&j z74XH`yoT4x(>k5o465XIxvZCw4Ki_~!JBxq!CL?ThOIhplaWhgWW9`BDwpkYxl9)M z4esDhox6PWFb71s9YVBQ=biEr^ztr)cXP=1)2ocNXe%_PK zdwHK+26Vo{pp|@OHebc>)%j|jukq0;zSf{7zE0=sb$*|Zn)wEUTKGntZ_@ewK3c;c zFla5`tn)28-|C}w{-8nY`8J(z_d&5AGH4Um=zNFHclu~6-(}D?zFX%H>--UeE)zv= z=a0(eo@~CC2Ze$C2H(dY)A@dby7}Wee?sR^`Y6Z`7_^HY)cGNuKjoty{+>Svw+;Rdf7gJ( z4~l@_Gx+=bf&qCyBl5jyK+?|{)Gspqz{fx2pw2(?@{e`?iOw%Ec|wuy?m(2OsCk!v zkH5M<77SI(STNjO-K=0snI?8ddU_-M;jR{cZ(}eJ>S8Li=7;>47Y*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