3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-26 11:00:04 +01:00

Update CraftBukkit packaging for 1.7.9.

Dieser Commit ist enthalten in:
wizjany 2014-04-19 13:14:14 -04:00
Ursprung 33d4285f1a
Commit 30006325db
3 geänderte Dateien mit 44 neuen und 9 gelöschten Zeilen

Datei anzeigen

@ -469,7 +469,7 @@
<dependency> <dependency>
<groupId>org.bukkit</groupId> <groupId>org.bukkit</groupId>
<artifactId>craftbukkit</artifactId> <artifactId>craftbukkit</artifactId>
<version>1.7.5-R0.1-SNAPSHOT</version> <version>1.7.9-R0.1-SNAPSHOT</version>
<scope>compile</scope> <scope>compile</scope>
<type>jar</type> <type>jar</type>
<optional>true</optional> <optional>true</optional>

Datei anzeigen

@ -25,9 +25,9 @@ import com.sk89q.worldedit.blocks.BaseBlock;
import com.sk89q.worldedit.blocks.TileEntityBlock; import com.sk89q.worldedit.blocks.TileEntityBlock;
import com.sk89q.worldedit.world.DataException; import com.sk89q.worldedit.world.DataException;
import com.sk89q.worldedit.foundation.Block; 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.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.Field;
import java.lang.reflect.Method; import java.lang.reflect.Method;
@ -51,7 +51,7 @@ public class DefaultNmsBlock extends NmsBlock {
static { static {
Field field; Field field;
try { 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); 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!");
@ -239,7 +239,7 @@ public class DefaultNmsBlock extends NmsBlock {
} }
public static boolean hasTileEntity(int type) { 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) { if (nmsBlock == null) {
return false; return false;
} }
@ -251,8 +251,8 @@ public class DefaultNmsBlock extends NmsBlock {
} }
} }
public static net.minecraft.server.v1_7_R2.Block getNmsBlock(int type) { public static net.minecraft.server.v1_7_R3.Block getNmsBlock(int type) {
return net.minecraft.server.v1_7_R2.Block.e(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) { private static Tag toNative(NBTBase foreign) {
// temporary fix since mojang removed names from tags // temporary fix since mojang removed names from tags
// our nbt spec will need to be updated to theirs // 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 { 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);
} }
} }