geforkt von Mirrors/FastAsyncWorldEdit
Use CraftBukkit version 1.4.6
Dieser Commit ist enthalten in:
Ursprung
090052df5a
Commit
e75b0ab34c
2
pom.xml
2
pom.xml
@ -90,7 +90,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.bukkit</groupId>
|
<groupId>org.bukkit</groupId>
|
||||||
<artifactId>craftbukkit</artifactId>
|
<artifactId>craftbukkit</artifactId>
|
||||||
<version>1.3.1-R2.0</version>
|
<version>1.4.6-R0.1</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public License along with
|
* You should have received a copy of the GNU Lesser General Public License along with
|
||||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.sk89q.worldedit.bukkit;
|
package com.sk89q.worldedit.bukkit;
|
||||||
|
|
||||||
@ -26,23 +26,23 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import net.minecraft.server.NBTBase;
|
import net.minecraft.server.v1_4_6.NBTBase;
|
||||||
import net.minecraft.server.NBTTagByte;
|
import net.minecraft.server.v1_4_6.NBTTagByte;
|
||||||
import net.minecraft.server.NBTTagByteArray;
|
import net.minecraft.server.v1_4_6.NBTTagByteArray;
|
||||||
import net.minecraft.server.NBTTagCompound;
|
import net.minecraft.server.v1_4_6.NBTTagCompound;
|
||||||
import net.minecraft.server.NBTTagDouble;
|
import net.minecraft.server.v1_4_6.NBTTagDouble;
|
||||||
import net.minecraft.server.NBTTagEnd;
|
import net.minecraft.server.v1_4_6.NBTTagEnd;
|
||||||
import net.minecraft.server.NBTTagFloat;
|
import net.minecraft.server.v1_4_6.NBTTagFloat;
|
||||||
import net.minecraft.server.NBTTagInt;
|
import net.minecraft.server.v1_4_6.NBTTagInt;
|
||||||
import net.minecraft.server.NBTTagIntArray;
|
import net.minecraft.server.v1_4_6.NBTTagIntArray;
|
||||||
import net.minecraft.server.NBTTagList;
|
import net.minecraft.server.v1_4_6.NBTTagList;
|
||||||
import net.minecraft.server.NBTTagLong;
|
import net.minecraft.server.v1_4_6.NBTTagLong;
|
||||||
import net.minecraft.server.NBTTagShort;
|
import net.minecraft.server.v1_4_6.NBTTagShort;
|
||||||
import net.minecraft.server.NBTTagString;
|
import net.minecraft.server.v1_4_6.NBTTagString;
|
||||||
import net.minecraft.server.TileEntity;
|
import net.minecraft.server.v1_4_6.TileEntity;
|
||||||
|
|
||||||
import org.bukkit.World;
|
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.ByteArrayTag;
|
||||||
import com.sk89q.jnbt.ByteTag;
|
import com.sk89q.jnbt.ByteTag;
|
||||||
@ -81,7 +81,7 @@ class NmsBlock extends BaseBlock implements TileEntityBlock {
|
|||||||
static {
|
static {
|
||||||
Field field;
|
Field field;
|
||||||
try {
|
try {
|
||||||
field = net.minecraft.server.Block.class.getDeclaredField("isTileEntity");
|
field = net.minecraft.server.v1_4_6.Block.class.getDeclaredField("isTileEntity");
|
||||||
field.setAccessible(true);
|
field.setAccessible(true);
|
||||||
} catch (NoSuchFieldException e) {
|
} catch (NoSuchFieldException e) {
|
||||||
logger.severe("Could not find NMS block tile entity field!");
|
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) {
|
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) {
|
if (nmsBlock == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -278,11 +278,11 @@ class NmsBlock extends BaseBlock implements TileEntityBlock {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static net.minecraft.server.Block getNmsBlock(int type) {
|
public static net.minecraft.server.v1_4_6.Block getNmsBlock(int type) {
|
||||||
if (type < 0 || type >= net.minecraft.server.Block.byId.length) {
|
if (type < 0 || type >= net.minecraft.server.v1_4_6.Block.byId.length) {
|
||||||
return null;
|
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) {
|
} catch (Throwable t) {
|
||||||
try {
|
try {
|
||||||
logger.warning("WorldEdit: Couldn't get NBTTagCompound.c(), " +
|
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) {
|
if (compoundMapField == null) {
|
||||||
compoundMapField = NBTTagCompound.class.getDeclaredField("map");
|
compoundMapField = NBTTagCompound.class.getDeclaredField("map");
|
||||||
@ -436,7 +436,7 @@ class NmsBlock extends BaseBlock implements TileEntityBlock {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isValidBlockType(int type) throws NoClassDefFoundError {
|
public static boolean isValidBlockType(int type) throws NoClassDefFoundError {
|
||||||
return type == 0 || (type >= 1 && type < net.minecraft.server.Block.byId.length
|
return type == 0 || (type >= 1 && type < net.minecraft.server.v1_4_6.Block.byId.length
|
||||||
&& net.minecraft.server.Block.byId[type] != null);
|
&& net.minecraft.server.v1_4_6.Block.byId[type] != null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren