From e75b0ab34c3c326ab079b52f6efd48709ffb9a79 Mon Sep 17 00:00:00 2001 From: Wizjany Date: Sat, 12 Jan 2013 00:47:10 -0500 Subject: [PATCH] Use CraftBukkit version 1.4.6 --- pom.xml | 2 +- .../com/sk89q/worldedit/bukkit/NmsBlock.java | 48 +++++++++---------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pom.xml b/pom.xml index cac0c7d7b..de8bc439b 100644 --- a/pom.xml +++ b/pom.xml @@ -90,7 +90,7 @@ org.bukkit craftbukkit - 1.3.1-R2.0 + 1.4.6-R0.1 compile true diff --git a/src/main/java/com/sk89q/worldedit/bukkit/NmsBlock.java b/src/main/java/com/sk89q/worldedit/bukkit/NmsBlock.java index 1bec84d96..b95543182 100644 --- a/src/main/java/com/sk89q/worldedit/bukkit/NmsBlock.java +++ b/src/main/java/com/sk89q/worldedit/bukkit/NmsBlock.java @@ -14,7 +14,7 @@ * * You should have received a copy of the GNU Lesser General Public License along with * this program. If not, see . -*/ + */ package com.sk89q.worldedit.bukkit; @@ -26,23 +26,23 @@ import java.util.List; import java.util.Map; import java.util.logging.Logger; -import net.minecraft.server.NBTBase; -import net.minecraft.server.NBTTagByte; -import net.minecraft.server.NBTTagByteArray; -import net.minecraft.server.NBTTagCompound; -import net.minecraft.server.NBTTagDouble; -import net.minecraft.server.NBTTagEnd; -import net.minecraft.server.NBTTagFloat; -import net.minecraft.server.NBTTagInt; -import net.minecraft.server.NBTTagIntArray; -import net.minecraft.server.NBTTagList; -import net.minecraft.server.NBTTagLong; -import net.minecraft.server.NBTTagShort; -import net.minecraft.server.NBTTagString; -import net.minecraft.server.TileEntity; +import net.minecraft.server.v1_4_6.NBTBase; +import net.minecraft.server.v1_4_6.NBTTagByte; +import net.minecraft.server.v1_4_6.NBTTagByteArray; +import net.minecraft.server.v1_4_6.NBTTagCompound; +import net.minecraft.server.v1_4_6.NBTTagDouble; +import net.minecraft.server.v1_4_6.NBTTagEnd; +import net.minecraft.server.v1_4_6.NBTTagFloat; +import net.minecraft.server.v1_4_6.NBTTagInt; +import net.minecraft.server.v1_4_6.NBTTagIntArray; +import net.minecraft.server.v1_4_6.NBTTagList; +import net.minecraft.server.v1_4_6.NBTTagLong; +import net.minecraft.server.v1_4_6.NBTTagShort; +import net.minecraft.server.v1_4_6.NBTTagString; +import net.minecraft.server.v1_4_6.TileEntity; import org.bukkit.World; -import org.bukkit.craftbukkit.CraftWorld; +import org.bukkit.craftbukkit.v1_4_6.CraftWorld; import com.sk89q.jnbt.ByteArrayTag; import com.sk89q.jnbt.ByteTag; @@ -81,7 +81,7 @@ class NmsBlock extends BaseBlock implements TileEntityBlock { static { Field field; try { - field = net.minecraft.server.Block.class.getDeclaredField("isTileEntity"); + field = net.minecraft.server.v1_4_6.Block.class.getDeclaredField("isTileEntity"); field.setAccessible(true); } catch (NoSuchFieldException e) { logger.severe("Could not find NMS block tile entity field!"); @@ -266,7 +266,7 @@ class NmsBlock extends BaseBlock implements TileEntityBlock { } public static boolean hasTileEntity(int type) { - net.minecraft.server.Block nmsBlock = getNmsBlock(type); + net.minecraft.server.v1_4_6.Block nmsBlock = getNmsBlock(type); if (nmsBlock == null) { return false; } @@ -278,11 +278,11 @@ class NmsBlock extends BaseBlock implements TileEntityBlock { } } - public static net.minecraft.server.Block getNmsBlock(int type) { - if (type < 0 || type >= net.minecraft.server.Block.byId.length) { + public static net.minecraft.server.v1_4_6.Block getNmsBlock(int type) { + if (type < 0 || type >= net.minecraft.server.v1_4_6.Block.byId.length) { return null; } - return net.minecraft.server.Block.byId[type]; + return net.minecraft.server.v1_4_6.Block.byId[type]; } /** @@ -308,7 +308,7 @@ class NmsBlock extends BaseBlock implements TileEntityBlock { } catch (Throwable t) { try { logger.warning("WorldEdit: Couldn't get NBTTagCompound.c(), " + - "so we're going to try to get at the 'map' field directly from now on"); + "so we're going to try to get at the 'map' field directly from now on"); if (compoundMapField == null) { compoundMapField = NBTTagCompound.class.getDeclaredField("map"); @@ -436,7 +436,7 @@ class NmsBlock extends BaseBlock implements TileEntityBlock { } public static boolean isValidBlockType(int type) throws NoClassDefFoundError { - return type == 0 || (type >= 1 && type < net.minecraft.server.Block.byId.length - && net.minecraft.server.Block.byId[type] != null); + return type == 0 || (type >= 1 && type < net.minecraft.server.v1_4_6.Block.byId.length + && net.minecraft.server.v1_4_6.Block.byId[type] != null); } }