Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-25 02:20:07 +01:00
Bukkit package naming changes for 1.6.1.
Dieser Commit ist enthalten in:
Ursprung
6f3fbdc963
Commit
48bff509dd
2
pom.xml
2
pom.xml
@ -125,7 +125,7 @@
|
|||||||
<dependency> <!-- NMS blocks -->
|
<dependency> <!-- NMS blocks -->
|
||||||
<groupId>org.bukkit</groupId>
|
<groupId>org.bukkit</groupId>
|
||||||
<artifactId>craftbukkit</artifactId>
|
<artifactId>craftbukkit</artifactId>
|
||||||
<version>1.5.2-R0.1-SNAPSHOT</version>
|
<version>1.6-R0.1-SNAPSHOT</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
<type>jar</type>
|
<type>jar</type>
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
|
@ -25,23 +25,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.v1_5_R3.NBTBase;
|
import net.minecraft.server.v1_6_R1.NBTBase;
|
||||||
import net.minecraft.server.v1_5_R3.NBTTagByte;
|
import net.minecraft.server.v1_6_R1.NBTTagByte;
|
||||||
import net.minecraft.server.v1_5_R3.NBTTagByteArray;
|
import net.minecraft.server.v1_6_R1.NBTTagByteArray;
|
||||||
import net.minecraft.server.v1_5_R3.NBTTagCompound;
|
import net.minecraft.server.v1_6_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_5_R3.NBTTagDouble;
|
import net.minecraft.server.v1_6_R1.NBTTagDouble;
|
||||||
import net.minecraft.server.v1_5_R3.NBTTagEnd;
|
import net.minecraft.server.v1_6_R1.NBTTagEnd;
|
||||||
import net.minecraft.server.v1_5_R3.NBTTagFloat;
|
import net.minecraft.server.v1_6_R1.NBTTagFloat;
|
||||||
import net.minecraft.server.v1_5_R3.NBTTagInt;
|
import net.minecraft.server.v1_6_R1.NBTTagInt;
|
||||||
import net.minecraft.server.v1_5_R3.NBTTagIntArray;
|
import net.minecraft.server.v1_6_R1.NBTTagIntArray;
|
||||||
import net.minecraft.server.v1_5_R3.NBTTagList;
|
import net.minecraft.server.v1_6_R1.NBTTagList;
|
||||||
import net.minecraft.server.v1_5_R3.NBTTagLong;
|
import net.minecraft.server.v1_6_R1.NBTTagLong;
|
||||||
import net.minecraft.server.v1_5_R3.NBTTagShort;
|
import net.minecraft.server.v1_6_R1.NBTTagShort;
|
||||||
import net.minecraft.server.v1_5_R3.NBTTagString;
|
import net.minecraft.server.v1_6_R1.NBTTagString;
|
||||||
import net.minecraft.server.v1_5_R3.TileEntity;
|
import net.minecraft.server.v1_6_R1.TileEntity;
|
||||||
|
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.craftbukkit.v1_5_R3.CraftWorld;
|
import org.bukkit.craftbukkit.v1_6_R1.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 @@ public class DefaultNmsBlock extends NmsBlock {
|
|||||||
static {
|
static {
|
||||||
Field field;
|
Field field;
|
||||||
try {
|
try {
|
||||||
field = net.minecraft.server.v1_5_R3.Block.class.getDeclaredField("isTileEntity");
|
field = net.minecraft.server.v1_6_R1.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!");
|
||||||
@ -269,7 +269,7 @@ public class DefaultNmsBlock extends NmsBlock {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static boolean hasTileEntity(int type) {
|
public static boolean hasTileEntity(int type) {
|
||||||
net.minecraft.server.v1_5_R3.Block nmsBlock = getNmsBlock(type);
|
net.minecraft.server.v1_6_R1.Block nmsBlock = getNmsBlock(type);
|
||||||
if (nmsBlock == null) {
|
if (nmsBlock == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -281,11 +281,11 @@ public class DefaultNmsBlock extends NmsBlock {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static net.minecraft.server.v1_5_R3.Block getNmsBlock(int type) {
|
public static net.minecraft.server.v1_6_R1.Block getNmsBlock(int type) {
|
||||||
if (type < 0 || type >= net.minecraft.server.v1_5_R3.Block.byId.length) {
|
if (type < 0 || type >= net.minecraft.server.v1_6_R1.Block.byId.length) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return net.minecraft.server.v1_5_R3.Block.byId[type];
|
return net.minecraft.server.v1_6_R1.Block.byId[type];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -439,7 +439,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 && type < net.minecraft.server.v1_5_R3.Block.byId.length
|
return type == 0 || (type >= 1 && type < net.minecraft.server.v1_6_R1.Block.byId.length
|
||||||
&& net.minecraft.server.v1_5_R3.Block.byId[type] != null);
|
&& net.minecraft.server.v1_6_R1.Block.byId[type] != null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
BIN
src/main/resources/nmsblocks/CBXNmsBlock_v152_2.class
Normale Datei
BIN
src/main/resources/nmsblocks/CBXNmsBlock_v152_2.class
Normale Datei
Binäre Datei nicht angezeigt.
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren