Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-05 11:00:05 +01:00
Updated to 1.9
Dieser Commit ist enthalten in:
Ursprung
699807665d
Commit
2b9f0be8df
@ -17,30 +17,35 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.sk89q.worldedit.blocks;
|
||||
package com.sk89q.worldedit;
|
||||
|
||||
/**
|
||||
* Represents the possible types of mobs.
|
||||
*/
|
||||
public enum MobType {
|
||||
BLAZE("Blaze"),
|
||||
CAVE_SPIDER("CaveSpider"),
|
||||
CHICKEN("Chicken"),
|
||||
COW("Cow"),
|
||||
CREEPER("Creeper"),
|
||||
ENDERDRAGON("EnderDragon"),
|
||||
ENDERMAN("Enderman"),
|
||||
GHAST("Ghast"),
|
||||
GIANT("Giant"),
|
||||
MONSTER("Monster"),
|
||||
MAGMA_CUBE("LavaSlime"),
|
||||
MOOSHROOM("MushroomCow"),
|
||||
PIG("Pig"),
|
||||
PIG_ZOMBIE("PigZombie"),
|
||||
SHEEP("Sheep"),
|
||||
SILVERFISH("Silverfish"),
|
||||
SKELETON("Skeleton"),
|
||||
SLIME("Slime"),
|
||||
SNOWMAN("SnowMan"),
|
||||
SPIDER("Spider"),
|
||||
SQUID("Squid"),
|
||||
ZOMBIE("Zombie"),
|
||||
WOLF("Wolf");
|
||||
VILLAGER("Villager"),
|
||||
WOLF("Wolf"),
|
||||
ZOMBIE("Zombie");
|
||||
|
||||
private String name;
|
||||
|
@ -72,6 +72,7 @@ public final class BlockData {
|
||||
case BlockID.COBBLESTONE_STAIRS:
|
||||
case BlockID.BRICK_STAIRS:
|
||||
case BlockID.STONE_BRICK_STAIRS:
|
||||
case BlockID.NETHER_BRICK_STAIRS:
|
||||
switch (data) {
|
||||
case 0: return 2;
|
||||
case 1: return 3;
|
||||
@ -231,6 +232,7 @@ public final class BlockData {
|
||||
case BlockID.COBBLESTONE_STAIRS:
|
||||
case BlockID.BRICK_STAIRS:
|
||||
case BlockID.STONE_BRICK_STAIRS:
|
||||
case BlockID.NETHER_BRICK_STAIRS:
|
||||
switch (data) {
|
||||
case 2: return 0;
|
||||
case 3: return 1;
|
||||
@ -423,6 +425,7 @@ public final class BlockData {
|
||||
case BlockID.COBBLESTONE_STAIRS:
|
||||
case BlockID.BRICK_STAIRS:
|
||||
case BlockID.STONE_BRICK_STAIRS:
|
||||
case BlockID.NETHER_BRICK_STAIRS:
|
||||
switch (data) {
|
||||
case 0:
|
||||
case 1:
|
||||
@ -608,8 +611,11 @@ public final class BlockData {
|
||||
case BlockID.COBBLESTONE_STAIRS:
|
||||
case BlockID.BRICK_STAIRS:
|
||||
case BlockID.STONE_BRICK_STAIRS:
|
||||
case BlockID.NETHER_BRICK_STAIRS:
|
||||
case BlockID.PUMPKIN:
|
||||
case BlockID.JACKOLANTERN:
|
||||
case BlockID.NETHER_WART:
|
||||
case BlockID.CAULDRON:
|
||||
if (data > 3) return -1;
|
||||
return mod((data + increment), 4);
|
||||
|
||||
|
@ -136,4 +136,16 @@ public final class BlockID {
|
||||
public static final int FENCE_GATE = 107;
|
||||
public static final int BRICK_STAIRS = 108;
|
||||
public static final int STONE_BRICK_STAIRS = 109;
|
||||
public static final int MYCELIUM = 110;
|
||||
public static final int LILY_PAD = 111;
|
||||
public static final int NETHER_BRICK = 112;
|
||||
public static final int NETHER_BRICK_FENCE = 113;
|
||||
public static final int NETHER_BRICK_STAIRS = 114;
|
||||
public static final int NETHER_WART = 115;
|
||||
public static final int ENCHANTMENT_TABLE = 116;
|
||||
public static final int BREWING_STAND = 117;
|
||||
public static final int CAULDRON = 118;
|
||||
public static final int END_PORTAL = 119;
|
||||
public static final int END_PORTAL_FRAME = 120;
|
||||
public static final int END_STONE = 121;
|
||||
}
|
||||
|
@ -145,7 +145,19 @@ public enum BlockType {
|
||||
VINE(BlockID.VINE, "Vine", "vine", "vines", "creepers"),
|
||||
FENCE_GATE(BlockID.FENCE_GATE, "Fence gate", "fencegate", "gate"),
|
||||
BRICK_STAIRS(BlockID.BRICK_STAIRS, "Brick stairs", "brickstairs", "bricksteps"),
|
||||
STONE_BRICK_STAIRS(BlockID.STONE_BRICK_STAIRS, "Stone brick stairs", "stonebrickstairs", "smoothstonebrickstairs");
|
||||
STONE_BRICK_STAIRS(BlockID.STONE_BRICK_STAIRS, "Stone brick stairs", "stonebrickstairs", "smoothstonebrickstairs"),
|
||||
MYCELIUM(BlockID.MYCELIUM, "Mycelium", "fungus" ,"mycel"),
|
||||
LILY_PAD(BlockID.LILY_PAD, "Lily pad", "lilypad", "waterlily"),
|
||||
NETHER_BRICK(BlockID.NETHER_BRICK, "Nether brick", "netherbrick"),
|
||||
NETHER_BRICK_FENCE(BlockID.NETHER_BRICK_FENCE, "Nether brick fence", "netherbrickfence", "netherfence"),
|
||||
NETHER_BRICK_STAIRS(BlockID.NETHER_BRICK_STAIRS, "Nether brick stairs", "netherbrickstairs", "netherbricksteps", "netherstairs", "nethersteps"),
|
||||
NETHER_WART(BlockID.NETHER_WART, "Nether wart", "netherwart", "netherstalk"),
|
||||
ENCHANTMENT_TABLE(BlockID.ENCHANTMENT_TABLE, "Enchantment table", "enchantmenttable", "enchanttable"),
|
||||
BREWING_STAND(BlockID.BREWING_STAND, "Brewing Stand", "brewingstand"),
|
||||
CAULDRON(BlockID.CAULDRON, "Cauldron"),
|
||||
END_PORTAL(BlockID.END_PORTAL, "End Portal", "endportal", "blackstuff", "airportal", "weirdblackstuff"),
|
||||
END_PORTAL_FRAME(BlockID.END_PORTAL_FRAME, "End Portal Frame", "endportalframe", "airportalframe", "crystalblock"),
|
||||
END_STONE(BlockID.END_STONE, "End Stone", "endstone", "enderstone", "endersand");
|
||||
|
||||
/**
|
||||
* Stores a map of the IDs for fast access.
|
||||
@ -179,7 +191,7 @@ public enum BlockType {
|
||||
BlockType(int id, String name, String lookupKey) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.lookupKeys = new String[]{lookupKey};
|
||||
this.lookupKeys = new String[] { lookupKey };
|
||||
}
|
||||
|
||||
/**
|
||||
@ -312,6 +324,8 @@ public enum BlockType {
|
||||
shouldPlaceLast.add(BlockID.REDSTONE_REPEATER_ON);
|
||||
shouldPlaceLast.add(BlockID.TRAP_DOOR);
|
||||
shouldPlaceLast.add(BlockID.VINE);
|
||||
shouldPlaceLast.add(BlockID.LILY_PAD);
|
||||
shouldPlaceLast.add(BlockID.NETHER_WART);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -370,7 +384,12 @@ public enum BlockType {
|
||||
canPassThrough.add(BlockID.PORTAL);
|
||||
canPassThrough.add(BlockID.REDSTONE_REPEATER_OFF);
|
||||
canPassThrough.add(BlockID.REDSTONE_REPEATER_ON);
|
||||
canPassThrough.add(BlockID.PUMPKIN_STEM);
|
||||
canPassThrough.add(BlockID.MELON_STEM);
|
||||
canPassThrough.add(BlockID.VINE);
|
||||
canPassThrough.add(BlockID.LILY_PAD);
|
||||
canPassThrough.add(BlockID.NETHER_WART);
|
||||
canPassThrough.add(BlockID.END_PORTAL);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -381,7 +400,15 @@ public enum BlockType {
|
||||
*/
|
||||
public static boolean canPassThrough(int id) {
|
||||
return canPassThrough.contains(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether a block can be passed through.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean canPassThrough() {
|
||||
return canPassThrough.contains(id);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -449,6 +476,12 @@ public enum BlockType {
|
||||
usesData.add(BlockID.FENCE_GATE);
|
||||
usesData.add(BlockID.BRICK_STAIRS);
|
||||
usesData.add(BlockID.STONE_BRICK_STAIRS);
|
||||
usesData.add(BlockID.NETHER_BRICK_STAIRS);
|
||||
usesData.add(BlockID.NETHER_WART);
|
||||
usesData.add(BlockID.ENCHANTMENT_TABLE);
|
||||
usesData.add(BlockID.BREWING_STAND);
|
||||
usesData.add(BlockID.CAULDRON);
|
||||
usesData.add(BlockID.END_PORTAL_FRAME);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -461,6 +494,15 @@ public enum BlockType {
|
||||
return usesData.contains(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the block uses its data value.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean usesData() {
|
||||
return usesData.contains(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* HashSet for isContainerBlock.
|
||||
*/
|
||||
@ -470,6 +512,7 @@ public enum BlockType {
|
||||
isContainerBlock.add(BlockID.FURNACE);
|
||||
isContainerBlock.add(BlockID.BURNING_FURNACE);
|
||||
isContainerBlock.add(BlockID.CHEST);
|
||||
isContainerBlock.add(BlockID.BREWING_STAND);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -482,6 +525,15 @@ public enum BlockType {
|
||||
return isContainerBlock.contains(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the block is a container block.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean isContainerBlock() {
|
||||
return isContainerBlock.contains(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* HashSet for isRedstoneBlock.
|
||||
*/
|
||||
@ -517,6 +569,15 @@ public enum BlockType {
|
||||
return isRedstoneBlock.contains(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if a block uses redstone in some way.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean isRedstoneBlock() {
|
||||
return isRedstoneBlock.contains(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* HashSet for canTransferRedstone.
|
||||
*/
|
||||
@ -540,6 +601,16 @@ public enum BlockType {
|
||||
return canTransferRedstone.contains(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if a block can transfer redstone.
|
||||
* Made this since isRedstoneBlock was getting big.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean canTransferRedstone() {
|
||||
return canTransferRedstone.contains(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* HashSet for isRedstoneSource.
|
||||
*/
|
||||
@ -564,6 +635,15 @@ public enum BlockType {
|
||||
return isRedstoneSource.contains(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Yay for convenience methods.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean isRedstoneSource() {
|
||||
return isRedstoneSource.contains(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* HashSet for isRailBlock.
|
||||
*/
|
||||
@ -584,6 +664,15 @@ public enum BlockType {
|
||||
return isRailBlock.contains(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the id is that of one of the rail types
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean isRailBlock() {
|
||||
return isRailBlock.contains(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* HashSet for isNaturalBlock.
|
||||
*/
|
||||
@ -597,6 +686,7 @@ public enum BlockType {
|
||||
isNaturalTerrainBlock.add(BlockID.SAND);
|
||||
isNaturalTerrainBlock.add(BlockID.GRAVEL);
|
||||
isNaturalTerrainBlock.add(BlockID.CLAY);
|
||||
isNaturalTerrainBlock.add(BlockID.MYCELIUM);
|
||||
|
||||
// hell
|
||||
isNaturalTerrainBlock.add(BlockID.NETHERSTONE);
|
||||
@ -623,6 +713,15 @@ public enum BlockType {
|
||||
return isNaturalTerrainBlock.contains(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the block type is naturally occuring
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean isNaturalTerrainBlock() {
|
||||
return isNaturalTerrainBlock.contains(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* HashSet for emitsLight.
|
||||
*/
|
||||
@ -644,6 +743,7 @@ public enum BlockType {
|
||||
emitsLight.add(BlockID.LOCKED_CHEST);
|
||||
emitsLight.add(BlockID.BROWN_MUSHROOM_CAP);
|
||||
emitsLight.add(BlockID.RED_MUSHROOM_CAP);
|
||||
emitsLight.add(BlockID.END_PORTAL);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -657,7 +757,7 @@ public enum BlockType {
|
||||
}
|
||||
|
||||
/**
|
||||
* HashSet for emitsLight.
|
||||
* HashSet for isTranslucent.
|
||||
*/
|
||||
private static final Set<Integer> isTranslucent = new HashSet<Integer>();
|
||||
static {
|
||||
@ -716,8 +816,15 @@ public enum BlockType {
|
||||
isTranslucent.add(BlockID.MELON_STEM);
|
||||
isTranslucent.add(BlockID.VINE);
|
||||
isTranslucent.add(BlockID.FENCE_GATE);
|
||||
//isTranslucent.add(BlockID.BRICK_STAIRS);
|
||||
isTranslucent.add(BlockID.BRICK_STAIRS);
|
||||
isTranslucent.add(BlockID.STONE_BRICK_STAIRS);
|
||||
isTranslucent.add(BlockID.LILY_PAD);
|
||||
isTranslucent.add(BlockID.NETHER_BRICK_FENCE);
|
||||
isTranslucent.add(BlockID.NETHER_BRICK_STAIRS);
|
||||
isTranslucent.add(BlockID.NETHER_WART);
|
||||
isTranslucent.add(BlockID.ENCHANTMENT_TABLE);
|
||||
isTranslucent.add(BlockID.BREWING_STAND);
|
||||
isTranslucent.add(BlockID.CAULDRON);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -820,7 +927,7 @@ public enum BlockType {
|
||||
blockDrops.put(BlockID.TRAP_DOOR, BlockID.TRAP_DOOR);
|
||||
blockDrops.put(BlockID.SILVERFISH_BLOCK, -1);
|
||||
blockDrops.put(BlockID.STONE_BRICK, BlockID.STONE_BRICK);
|
||||
blockDrops.put(BlockID.BROWN_MUSHROOM_CAP, BlockID.BROWN_MUSHROOM_CAP); // the wiki has the 2 mushroom caps the other way round
|
||||
blockDrops.put(BlockID.BROWN_MUSHROOM_CAP, BlockID.BROWN_MUSHROOM_CAP);
|
||||
blockDrops.put(BlockID.RED_MUSHROOM_CAP, BlockID.RED_MUSHROOM_CAP);
|
||||
blockDrops.put(BlockID.IRON_BARS, BlockID.IRON_BARS);
|
||||
blockDrops.put(BlockID.GLASS_PANE, BlockID.GLASS_PANE);
|
||||
@ -831,6 +938,18 @@ public enum BlockType {
|
||||
blockDrops.put(BlockID.FENCE_GATE, BlockID.FENCE_GATE);
|
||||
blockDrops.put(BlockID.BRICK_STAIRS, BlockID.BRICK);
|
||||
blockDrops.put(BlockID.STONE_BRICK_STAIRS, BlockID.STONE_BRICK);
|
||||
blockDrops.put(BlockID.MYCELIUM, BlockID.DIRT);
|
||||
blockDrops.put(BlockID.LILY_PAD, BlockID.LILY_PAD);
|
||||
blockDrops.put(BlockID.NETHER_BRICK, BlockID.NETHER_BRICK);
|
||||
blockDrops.put(BlockID.NETHER_BRICK_FENCE, BlockID.NETHER_BRICK_FENCE);
|
||||
blockDrops.put(BlockID.NETHER_BRICK_STAIRS, BlockID.NETHER_BRICK);
|
||||
blockDrops.put(BlockID.NETHER_WART, ItemID.NETHER_WART_SEED);
|
||||
blockDrops.put(BlockID.ENCHANTMENT_TABLE, BlockID.ENCHANTMENT_TABLE);
|
||||
blockDrops.put(BlockID.BREWING_STAND, ItemID.BREWING_STAND);
|
||||
blockDrops.put(BlockID.CAULDRON, ItemID.CAULDRON);
|
||||
blockDrops.put(BlockID.END_PORTAL, -1);
|
||||
blockDrops.put(BlockID.END_PORTAL_FRAME, -1);
|
||||
blockDrops.put(BlockID.END_STONE, BlockID.END_STONE);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -851,8 +970,13 @@ public enum BlockType {
|
||||
return dropped;
|
||||
}
|
||||
|
||||
public BaseItemStack getBlockDrop(short data) {
|
||||
return getBlockDrop(id, data);
|
||||
}
|
||||
|
||||
private static final Random random = new Random();
|
||||
public static BaseItemStack getBlockDrop(int id, short data) {
|
||||
int store;
|
||||
switch (id) {
|
||||
case BlockID.STONE:
|
||||
return new BaseItemStack(BlockID.COBBLESTONE);
|
||||
@ -861,7 +985,7 @@ public enum BlockType {
|
||||
return new BaseItemStack(BlockID.DIRT);
|
||||
|
||||
case BlockID.GRAVEL:
|
||||
if (random.nextDouble() >= 0.9) {
|
||||
if (random.nextInt(10) == 0) {
|
||||
return new BaseItemStack(ItemID.FLINT);
|
||||
} else {
|
||||
return new BaseItemStack(BlockID.GRAVEL);
|
||||
@ -903,6 +1027,7 @@ public enum BlockType {
|
||||
return new BaseItemStack(ItemID.DIAMOND);
|
||||
|
||||
case BlockID.CROPS:
|
||||
if (data == 7) return new BaseItemStack(ItemID.WHEAT);
|
||||
return new BaseItemStack(ItemID.SEEDS);
|
||||
|
||||
case BlockID.SOIL:
|
||||
@ -946,6 +1071,26 @@ public enum BlockType {
|
||||
case BlockID.REDSTONE_REPEATER_ON:
|
||||
return new BaseItemStack(ItemID.REDSTONE_REPEATER);
|
||||
|
||||
case BlockID.BROWN_MUSHROOM_CAP:
|
||||
store = random.nextInt(10);
|
||||
if (store == 0) {
|
||||
return new BaseItemStack(BlockID.BROWN_MUSHROOM, 2);
|
||||
} else if (store == 1) {
|
||||
return new BaseItemStack(BlockID.BROWN_MUSHROOM);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
case BlockID.RED_MUSHROOM_CAP:
|
||||
store = random.nextInt(10);
|
||||
if (store == 0) {
|
||||
return new BaseItemStack(BlockID.RED_MUSHROOM, 2);
|
||||
} else if (store == 1) {
|
||||
return new BaseItemStack(BlockID.RED_MUSHROOM);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
case BlockID.MELON_BLOCK:
|
||||
return new BaseItemStack(ItemID.MELON, (random.nextInt(5) + 3));
|
||||
|
||||
@ -955,6 +1100,30 @@ public enum BlockType {
|
||||
case BlockID.MELON_STEM:
|
||||
return new BaseItemStack(ItemID.MELON_SEEDS);
|
||||
|
||||
case BlockID.BRICK_STAIRS:
|
||||
return new BaseItemStack(BlockID.BRICK);
|
||||
|
||||
case BlockID.STONE_BRICK_STAIRS:
|
||||
return new BaseItemStack(BlockID.STONE_BRICK);
|
||||
|
||||
case BlockID.MYCELIUM:
|
||||
return new BaseItemStack(BlockID.DIRT);
|
||||
|
||||
case BlockID.LILY_PAD:
|
||||
return new BaseItemStack(BlockID.LILY_PAD);
|
||||
|
||||
case BlockID.NETHER_BRICK_STAIRS:
|
||||
return new BaseItemStack(BlockID.NETHER_BRICK);
|
||||
|
||||
case BlockID.NETHER_WART:
|
||||
return new BaseItemStack(ItemID.NETHER_WART_SEED, random.nextInt(3) + 1);
|
||||
|
||||
case BlockID.BREWING_STAND:
|
||||
return new BaseItemStack(ItemID.BREWING_STAND);
|
||||
|
||||
case BlockID.CAULDRON:
|
||||
return new BaseItemStack(ItemID.CAULDRON);
|
||||
|
||||
case BlockID.BEDROCK:
|
||||
case BlockID.WATER:
|
||||
case BlockID.STATIONARY_WATER:
|
||||
@ -972,8 +1141,11 @@ public enum BlockType {
|
||||
case BlockID.LOCKED_CHEST:
|
||||
case BlockID.SILVERFISH_BLOCK:
|
||||
case BlockID.VINE:
|
||||
case BlockID.END_PORTAL:
|
||||
case BlockID.END_PORTAL_FRAME:
|
||||
return null;
|
||||
}
|
||||
|
||||
if (usesData(id)) {
|
||||
return new BaseItemStack(id, 1, data);
|
||||
} else {
|
||||
@ -1034,7 +1206,7 @@ public enum BlockType {
|
||||
// vines are complicated, but I'll list the single-attachment variants anyway
|
||||
dataAttachments.put(attachmentKey(BlockID.VINE, 0), PlayerDirection.UP);
|
||||
addCardinals(BlockID.VINE, 1, 2, 4, 8);
|
||||
//nonDataAttachments.put(BlockID.NETHER_WART, PlayerDirection.DOWN);
|
||||
nonDataAttachments.put(BlockID.NETHER_WART, PlayerDirection.DOWN);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -138,6 +138,31 @@ public final class ItemID {
|
||||
public static final int COOKED_CHICKEN = 366;
|
||||
public static final int ROTTEN_FLESH = 367;
|
||||
public static final int ENDER_PEARL = 368;
|
||||
public static final int GOLD_RECORD = 2256;
|
||||
public static final int GREEN_RECORD = 2257;
|
||||
public static final int BLAZE_ROD = 369;
|
||||
public static final int GHAST_TEAR = 370;
|
||||
public static final int GOLD_NUGGET = 371;
|
||||
public static final int NETHER_WART_SEED = 372;
|
||||
public static final int POTION = 373;
|
||||
public static final int GLASS_BOTTLE = 374;
|
||||
public static final int SPIDER_EYE = 375;
|
||||
public static final int FERMENTED_SPIDER_EYE = 376;
|
||||
public static final int BLAZE_POWDER = 377;
|
||||
public static final int MAGMA_CREAM = 378;
|
||||
public static final int BREWING_STAND = 379;
|
||||
public static final int CAULDRON = 380;
|
||||
public static final int EYE_OF_ENDER = 381;
|
||||
public static final int GLISTERING_MELON = 382;
|
||||
public static final int GOLD_RECORD = 2256; // deprecated, but leave it there
|
||||
public static final int GREEN_RECORD = 2257; // deprecated, but leave it there
|
||||
public static final int DISC_13 = 2256;
|
||||
public static final int DISC_CAT = 2257;
|
||||
public static final int DISC_BLOCKS = 2258;
|
||||
public static final int DISC_CHIRP = 2259;
|
||||
public static final int DISC_FAR = 2260;
|
||||
public static final int DISC_MALL = 2261;
|
||||
public static final int DISC_MELLOHI = 2262;
|
||||
public static final int DISC_STAL = 2263;
|
||||
public static final int DISC_STRAD = 2264;
|
||||
public static final int DISC_WARD = 2265;
|
||||
public static final int DISC_11 = 2266;
|
||||
}
|
||||
|
@ -146,6 +146,18 @@ public enum ItemType {
|
||||
FENCE_GATE(BlockID.FENCE_GATE, "Fence gate", "fencegate", "gate"),
|
||||
BRICK_STAIRS(BlockID.BRICK_STAIRS, "Brick stairs", "brickstairs", "bricksteps"),
|
||||
STONE_BRICK_STAIRS(BlockID.STONE_BRICK_STAIRS, "Stone brick stairs", "stonebrickstairs", "smoothstonebrickstairs"),
|
||||
MYCELIUM(BlockID.MYCELIUM, "Mycelium", "fungus" ,"mycel"),
|
||||
LILY_PAD(BlockID.LILY_PAD, "Lily pad", "lilypad", "waterlily"),
|
||||
NETHER_BRICK(BlockID.NETHER_BRICK, "Nether brick", "netherbrick"),
|
||||
NETHER_BRICK_FENCE(BlockID.NETHER_BRICK_FENCE, "Nether brick fence", "netherbrickfence", "netherfence"),
|
||||
NETHER_BRICK_STAIRS(BlockID.NETHER_BRICK_STAIRS, "Nether brick stairs", "netherbrickstairs", "netherbricksteps", "netherstairs", "nethersteps"),
|
||||
NETHER_WART(BlockID.NETHER_WART, "Nether wart", "netherwart", "netherstalk"),
|
||||
ENCHANTMENT_TABLE(BlockID.ENCHANTMENT_TABLE, "Enchantment table", "enchantmenttable", "enchanttable"),
|
||||
BREWING_STAND(BlockID.BREWING_STAND, "Brewing Stand", "brewingstand"),
|
||||
CAULDRON(BlockID.CAULDRON, "Cauldron"),
|
||||
END_PORTAL(BlockID.END_PORTAL, "End Portal", "endportal", "blackstuff", "airportal", "weirdblackstuff"),
|
||||
END_PORTAL_FRAME(BlockID.END_PORTAL_FRAME, "End Portal Frame", "endportalframe", "airportalframe", "crystalblock"),
|
||||
END_STONE(BlockID.END_STONE, "End Stone", "endstone", "enderstone", "endersand"),
|
||||
|
||||
// Items
|
||||
IRON_SHOVEL(ItemID.IRON_SHOVEL, "Iron shovel", "ironshovel"),
|
||||
@ -261,6 +273,33 @@ public enum ItemType {
|
||||
COOKED_CHICKEN(ItemID.COOKED_CHICKEN, "Cooked chicken", "cookedchicken", "chicken", "grilledchicken"),
|
||||
ROTTEN_FLESH(ItemID.ROTTEN_FLESH, "Rotten flesh", "rottenflesh", "zombiemeat", "flesh"),
|
||||
ENDER_PEARL(ItemID.ENDER_PEARL, "Ender pearl", "pearl", "enderpearl"),
|
||||
BLAZE_ROD(ItemID.BLAZE_ROD, "Blaze rod", "blazerod"),
|
||||
GHAST_TEAR(ItemID.GHAST_TEAR, "Ghast tear", "ghasttear"),
|
||||
GOLD_NUGGET(ItemID.GOLD_NUGGET, "Gold nuggest", "goldnugget"),
|
||||
NETHER_WART_ITEM(ItemID.NETHER_WART_SEED, "Nether wart", "netherwart", "netherwartseed"),
|
||||
POTION(ItemID.POTION, "Potion", "potion"),
|
||||
GLASS_BOTTLE(ItemID.GLASS_BOTTLE, "Glass bottle", "glassbottle"),
|
||||
SPIDER_EYE(ItemID.SPIDER_EYE, "Spider eye", "spidereye"),
|
||||
FERMENTED_SPIDER_EYE(ItemID.FERMENTED_SPIDER_EYE, "Fermented spider eye", "fermentedspidereye", "fermentedeye"),
|
||||
BLAZE_POWDER(ItemID.BLAZE_POWDER, "Blaze powder", "blazepowder"),
|
||||
MAGMA_CREAM(ItemID.MAGMA_CREAM, "Magma cream", "magmacream"),
|
||||
BREWING_STAND_ITEM(ItemID.BREWING_STAND, "Brewing stand", "brewingstand"),
|
||||
CAULDRON_ITEM(ItemID.CAULDRON, "Cauldron", "cauldron"),
|
||||
EYE_OF_ENDER(ItemID.EYE_OF_ENDER, "Eye of Ender", "eyeofender", "endereye"),
|
||||
GLISTERING_MELON(ItemID.GLISTERING_MELON, "Glistering Melon", "glisteringmelon", "goldmelon"),
|
||||
DISC_13(ItemID.DISC_13, "Music Disc - 13", "disc_13"),
|
||||
DISC_CAT(ItemID.DISC_CAT, "Music Disc - Cat", "disc_cat"),
|
||||
DISC_BLOCKS(ItemID.DISC_BLOCKS, "Music Disc - blocks", "disc_blocks"),
|
||||
DISC_CHIRP(ItemID.DISC_CHIRP, "Music Disc - chirp", "disc_chirp"),
|
||||
DISC_FAR(ItemID.DISC_FAR, "Music Disc - far", "disc_far"),
|
||||
DISC_MALL(ItemID.DISC_MALL, "Music Disc - mall", "disc_mall"),
|
||||
DISC_MELLOHI(ItemID.DISC_MELLOHI, "Music Disc - mellohi", "disc_mellohi"),
|
||||
DISC_STAL(ItemID.DISC_STAL, "Music Disc - stal", "disc_stal"),
|
||||
DISC_STRAD(ItemID.DISC_STRAD, "Music Disc - strad", "disc_strad"),
|
||||
DISC_WARD(ItemID.DISC_WARD, "Music Disc - ward", "disc_ward"),
|
||||
DISC_11(ItemID.DISC_11, "Music Disc - 11", "disc_11"),
|
||||
|
||||
// deprecated
|
||||
GOLD_RECORD(ItemID.GOLD_RECORD, "Gold Record", "goldrecord", "golddisc"),
|
||||
GREEN_RECORD(ItemID.GREEN_RECORD, "Green Record", "greenrecord", "greenddisc");
|
||||
|
||||
@ -495,8 +534,18 @@ public enum ItemType {
|
||||
shouldNotStack.add(ItemID.CAKE_ITEM);
|
||||
shouldNotStack.add(ItemID.BED_ITEM);
|
||||
shouldNotStack.add(ItemID.MAP);
|
||||
shouldNotStack.add(ItemID.GOLD_RECORD);
|
||||
shouldNotStack.add(ItemID.GREEN_RECORD);
|
||||
shouldNotStack.add(ItemID.SHEARS);
|
||||
shouldNotStack.add(ItemID.DISC_13);
|
||||
shouldNotStack.add(ItemID.DISC_CAT);
|
||||
shouldNotStack.add(ItemID.DISC_BLOCKS);
|
||||
shouldNotStack.add(ItemID.DISC_CHIRP);
|
||||
shouldNotStack.add(ItemID.DISC_FAR);
|
||||
shouldNotStack.add(ItemID.DISC_MALL);
|
||||
shouldNotStack.add(ItemID.DISC_MELLOHI);
|
||||
shouldNotStack.add(ItemID.DISC_STAL);
|
||||
shouldNotStack.add(ItemID.DISC_STRAD);
|
||||
shouldNotStack.add(ItemID.DISC_WARD);
|
||||
shouldNotStack.add(ItemID.DISC_11);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -518,7 +567,9 @@ public enum ItemType {
|
||||
*/
|
||||
public static boolean usesDamageValue(int id) {
|
||||
return id == ItemID.COAL
|
||||
|| id == ItemID.INK_SACK
|
||||
|| id == ItemID.INK_SACK
|
||||
|| id == ItemID.POTION
|
||||
|| id == ItemID.GLASS_BOTTLE
|
||||
// for material only, orientation data is not stored in inventory anyway
|
||||
|| BlockType.usesData(id);
|
||||
}
|
||||
|
@ -20,6 +20,7 @@
|
||||
package com.sk89q.worldedit.blocks;
|
||||
|
||||
import com.sk89q.jnbt.*;
|
||||
import com.sk89q.worldedit.MobType;
|
||||
import com.sk89q.worldedit.data.*;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren