mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-24 10:17:39 +00:00
Updated for 1.8 blocks and items
This commit is contained in:
parent
2f390e9938
commit
6f43c6a312
@ -123,4 +123,17 @@ public final class BlockID {
|
|||||||
public static final int REDSTONE_REPEATER_ON = 94;
|
public static final int REDSTONE_REPEATER_ON = 94;
|
||||||
public static final int LOCKED_CHEST = 95;
|
public static final int LOCKED_CHEST = 95;
|
||||||
public static final int TRAP_DOOR = 96;
|
public static final int TRAP_DOOR = 96;
|
||||||
|
public static final int SILVERFISH_BLOCK = 97;
|
||||||
|
public static final int STONE_BRICK = 98;
|
||||||
|
public static final int BROWN_MUSHROOM_CAP = 99;
|
||||||
|
public static final int RED_MUSHROOM_CAP = 100;
|
||||||
|
public static final int IRON_BARS = 101;
|
||||||
|
public static final int GLASS_PANE = 102;
|
||||||
|
public static final int MELON_BLOCK = 103;
|
||||||
|
public static final int PUMPKIN_STEM = 104;
|
||||||
|
public static final int MELON_STEM = 105;
|
||||||
|
public static final int VINE = 106;
|
||||||
|
public static final int FENCE_GATE = 107;
|
||||||
|
public static final int BRICK_STAIRS = 108;
|
||||||
|
public static final int STONE_BRICK_STAIRS = 109;
|
||||||
}
|
}
|
||||||
|
@ -127,7 +127,20 @@ public enum BlockType {
|
|||||||
REDSTONE_REPEATER_OFF(BlockID.REDSTONE_REPEATER_OFF, "Redstone repeater (off)", "diodeoff", "redstonerepeater", "repeateroff", "delayeroff"),
|
REDSTONE_REPEATER_OFF(BlockID.REDSTONE_REPEATER_OFF, "Redstone repeater (off)", "diodeoff", "redstonerepeater", "repeateroff", "delayeroff"),
|
||||||
REDSTONE_REPEATER_ON(BlockID.REDSTONE_REPEATER_ON, "Redstone repeater (on)", "diodeon", "redstonerepeateron", "repeateron", "delayeron"),
|
REDSTONE_REPEATER_ON(BlockID.REDSTONE_REPEATER_ON, "Redstone repeater (on)", "diodeon", "redstonerepeateron", "repeateron", "delayeron"),
|
||||||
LOCKED_CHEST(BlockID.LOCKED_CHEST, "Locked chest", "lockedchest", "steveco", "supplycrate", "valveneedstoworkonep3nottf2kthx"),
|
LOCKED_CHEST(BlockID.LOCKED_CHEST, "Locked chest", "lockedchest", "steveco", "supplycrate", "valveneedstoworkonep3nottf2kthx"),
|
||||||
TRAP_DOOR(BlockID.TRAP_DOOR, "Trap door", "trapdoor", "hatch", "floordoor");
|
TRAP_DOOR(BlockID.TRAP_DOOR, "Trap door", "trapdoor", "hatch", "floordoor"),
|
||||||
|
SILVERFISH_BLOCK(BlockID.SILVERFISH_BLOCK, "Silverfish block", "silverfish", "silver"),
|
||||||
|
STONE_BRICK(BlockID.STONE_BRICK, "Stone brick", "stonebrick", "sbrick", "smoothstonebrick"),
|
||||||
|
RED_MUSHROOM_CAP(BlockID.RED_MUSHROOM_CAP, "Red mushroom cap", "giantmushroomred", "redgiantmushroom", "redmushroomcap"),
|
||||||
|
BROWN_MUSHROOM_CAP(BlockID.BROWN_MUSHROOM_CAP, "Brown mushroom cap", "giantmushroombrown", "browngiantmushoom", "brownmushroomcap"),
|
||||||
|
IRON_BARS(BlockID.IRON_BARS, "Iron bars", "ironbars", "ironfence"),
|
||||||
|
GLASS_PANE(BlockID.GLASS_PANE, "Glass pane", "window", "glasspane", "glasswindow"),
|
||||||
|
MELON_BLOCK(BlockID.MELON_BLOCK, "Melon (block)", "melonblock"),
|
||||||
|
PUMPKIN_STEM(BlockID.PUMPKIN_STEM, "Pumpkin stem", "pumpkinstem"),
|
||||||
|
MELON_STEM(BlockID.MELON_STEM, "Melon stem", "melonstem"),
|
||||||
|
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");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stores a list of dropped blocks for blocks.
|
* Stores a list of dropped blocks for blocks.
|
||||||
@ -221,6 +234,19 @@ public enum BlockType {
|
|||||||
blockDrops.put(94, 356);
|
blockDrops.put(94, 356);
|
||||||
blockDrops.put(95, 95);
|
blockDrops.put(95, 95);
|
||||||
blockDrops.put(96, 96);
|
blockDrops.put(96, 96);
|
||||||
|
blockDrops.put(97, -1);
|
||||||
|
blockDrops.put(98, 98);
|
||||||
|
blockDrops.put(99, 99);
|
||||||
|
blockDrops.put(100, 100);
|
||||||
|
blockDrops.put(101, 101);
|
||||||
|
blockDrops.put(102, 102);
|
||||||
|
blockDrops.put(103, 103);
|
||||||
|
blockDrops.put(104, 104);
|
||||||
|
blockDrops.put(105, 105);
|
||||||
|
blockDrops.put(106, -1);
|
||||||
|
blockDrops.put(107, 107);
|
||||||
|
blockDrops.put(108, 45);
|
||||||
|
blockDrops.put(109, 98);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -395,7 +421,10 @@ public enum BlockType {
|
|||||||
|| id == BlockID.CAKE_BLOCK
|
|| id == BlockID.CAKE_BLOCK
|
||||||
|| id == BlockID.REDSTONE_REPEATER_OFF
|
|| id == BlockID.REDSTONE_REPEATER_OFF
|
||||||
|| id == BlockID.REDSTONE_REPEATER_ON
|
|| id == BlockID.REDSTONE_REPEATER_ON
|
||||||
|| id == BlockID.TRAP_DOOR;
|
|| id == BlockID.TRAP_DOOR
|
||||||
|
|| id == BlockID.FENCE_GATE
|
||||||
|
|| id == BlockID.GLASS_PANE
|
||||||
|
|| id == BlockID.VINE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -436,7 +465,9 @@ public enum BlockType {
|
|||||||
|| id == BlockID.REED
|
|| id == BlockID.REED
|
||||||
|| id == BlockID.PORTAL
|
|| id == BlockID.PORTAL
|
||||||
|| id == BlockID.REDSTONE_REPEATER_OFF
|
|| id == BlockID.REDSTONE_REPEATER_OFF
|
||||||
|| id == BlockID.REDSTONE_REPEATER_ON;
|
|| id == BlockID.REDSTONE_REPEATER_ON
|
||||||
|
|| id == BlockID.FENCE_GATE
|
||||||
|
|| id == BlockID.VINE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -492,7 +523,14 @@ public enum BlockType {
|
|||||||
|| id == BlockID.CAKE_BLOCK
|
|| id == BlockID.CAKE_BLOCK
|
||||||
|| id == BlockID.REDSTONE_REPEATER_OFF
|
|| id == BlockID.REDSTONE_REPEATER_OFF
|
||||||
|| id == BlockID.REDSTONE_REPEATER_ON
|
|| id == BlockID.REDSTONE_REPEATER_ON
|
||||||
|| id == BlockID.TRAP_DOOR;
|
|| id == BlockID.TRAP_DOOR
|
||||||
|
|| id == BlockID.BRICK_STAIRS
|
||||||
|
|| id == BlockID.STONE_BRICK_STAIRS
|
||||||
|
|| id == BlockID.VINE
|
||||||
|
|| id == BlockID.RED_MUSHROOM_CAP
|
||||||
|
|| id == BlockID.BROWN_MUSHROOM_CAP
|
||||||
|
|| id == BlockID.PUMPKIN_STEM
|
||||||
|
|| id == BlockID.MELON_STEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -130,6 +130,19 @@ public enum ItemType {
|
|||||||
REDSTONE_REPEATER_ON(BlockID.REDSTONE_REPEATER_ON, "Redstone repeater (on)", "diodeon", "redstonerepeateron", "repeateron", "delayeron"),
|
REDSTONE_REPEATER_ON(BlockID.REDSTONE_REPEATER_ON, "Redstone repeater (on)", "diodeon", "redstonerepeateron", "repeateron", "delayeron"),
|
||||||
LOCKED_CHEST(BlockID.LOCKED_CHEST, "Locked chest", "lockedchest", "steveco", "supplycrate", "valveneedstoworkonep3nottf2kthx"),
|
LOCKED_CHEST(BlockID.LOCKED_CHEST, "Locked chest", "lockedchest", "steveco", "supplycrate", "valveneedstoworkonep3nottf2kthx"),
|
||||||
TRAP_DOOR(BlockID.TRAP_DOOR, "Trap door", "trapdoor", "hatch", "floordoor"),
|
TRAP_DOOR(BlockID.TRAP_DOOR, "Trap door", "trapdoor", "hatch", "floordoor"),
|
||||||
|
SILVERFISH_BLOCK(BlockID.SILVERFISH_BLOCK, "Silverfish block", "silverfish", "silver"),
|
||||||
|
STONE_BRICK(BlockID.STONE_BRICK, "Stone brick", "stonebrick", "sbrick", "smoothstonebrick"),
|
||||||
|
RED_MUSHROOM_CAP(BlockID.RED_MUSHROOM_CAP, "Red mushroom cap", "giantmushroomred", "redgiantmushroom", "redmushroomcap"),
|
||||||
|
BROWN_MUSHROOM_CAP(BlockID.BROWN_MUSHROOM_CAP, "Brown mushroom cap", "giantmushroombrown", "browngiantmushoom", "brownmushroomcap"),
|
||||||
|
IRON_BARS(BlockID.IRON_BARS, "Iron bars", "ironbars", "ironfence"),
|
||||||
|
GLASS_PANE(BlockID.GLASS_PANE, "Glass pane", "window", "glasspane", "glasswindow"),
|
||||||
|
MELON_BLOCK(BlockID.MELON_BLOCK, "Melon (block)", "melonblock"),
|
||||||
|
PUMPKIN_STEM(BlockID.PUMPKIN_STEM, "Pumpkin stem", "pumpkinstem"),
|
||||||
|
MELON_STEM(BlockID.MELON_STEM, "Melon stem", "melonstem"),
|
||||||
|
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"),
|
||||||
|
|
||||||
// Items
|
// Items
|
||||||
IRON_SHOVEL(256, "Iron shovel", "ironshovel"),
|
IRON_SHOVEL(256, "Iron shovel", "ironshovel"),
|
||||||
@ -236,6 +249,15 @@ public enum ItemType {
|
|||||||
COOKIE(357, "Cookie", "cookie"),
|
COOKIE(357, "Cookie", "cookie"),
|
||||||
MAP(358, "Map", "map"),
|
MAP(358, "Map", "map"),
|
||||||
SHEARS(359, "Shears", "shears", "scissors"),
|
SHEARS(359, "Shears", "shears", "scissors"),
|
||||||
|
MELON(360, "Melon Slice", "melon", "melonslice"),
|
||||||
|
PUMPKIN_SEEDS(361, "Pumpkin seeds", "pumpkinseed", "pumpkinseeds"),
|
||||||
|
MELON_SEEDS(362, "Melon seeds", "melonseed", "melonseeds"),
|
||||||
|
RAW_BEEF(363, "Raw beef", "rawbeef", "rawcow", "beef"),
|
||||||
|
COOKED_BEEF(364, "Steak", "steak", "cookedbeef", "cookedcow"),
|
||||||
|
RAW_CHICKEN(365, "Raw chicken", "rawchicken"),
|
||||||
|
COOKED_CHICKEN(366, "Cooked chicken", "cookedchicken", "chicken", "grilledchicken"),
|
||||||
|
ROTTEN_FLESH(367, "Rotten flesh", "rottenflesh", "zombiemeat", "flesh"),
|
||||||
|
ENDER_PEARL(368, "Ender pearl", "pearl", "enderpearl"),
|
||||||
GOLD_RECORD(2256, "Gold Record", "goldrecord", "golddisc"),
|
GOLD_RECORD(2256, "Gold Record", "goldrecord", "golddisc"),
|
||||||
GREEN_RECORD(2257, "Green Record", "greenrecord", "greenddisc");
|
GREEN_RECORD(2257, "Green Record", "greenrecord", "greenddisc");
|
||||||
|
|
||||||
@ -441,7 +463,6 @@ public enum ItemType {
|
|||||||
|| t == ItemType.IRON_HOE
|
|| t == ItemType.IRON_HOE
|
||||||
|| t == ItemType.DIAMOND_HOE
|
|| t == ItemType.DIAMOND_HOE
|
||||||
|| t == ItemType.GOLD_HOE
|
|| t == ItemType.GOLD_HOE
|
||||||
|| t == ItemType.BREAD
|
|
||||||
|| t == ItemType.LEATHER_HELMET
|
|| t == ItemType.LEATHER_HELMET
|
||||||
|| t == ItemType.LEATHER_CHEST
|
|| t == ItemType.LEATHER_CHEST
|
||||||
|| t == ItemType.LEATHER_PANTS
|
|| t == ItemType.LEATHER_PANTS
|
||||||
@ -462,8 +483,6 @@ public enum ItemType {
|
|||||||
|| t == ItemType.GOLD_CHEST
|
|| t == ItemType.GOLD_CHEST
|
||||||
|| t == ItemType.GOLD_PANTS
|
|| t == ItemType.GOLD_PANTS
|
||||||
|| t == ItemType.GOLD_BOOTS
|
|| t == ItemType.GOLD_BOOTS
|
||||||
|| t == ItemType.RAW_PORKCHOP
|
|
||||||
|| t == ItemType.COOKED_PORKCHOP
|
|
||||||
|| t == ItemType.SIGN
|
|| t == ItemType.SIGN
|
||||||
|| t == ItemType.WOODEN_DOOR_ITEM
|
|| t == ItemType.WOODEN_DOOR_ITEM
|
||||||
|| t == ItemType.BUCKET
|
|| t == ItemType.BUCKET
|
||||||
@ -477,8 +496,6 @@ public enum ItemType {
|
|||||||
|| t == ItemType.STORAGE_MINECART
|
|| t == ItemType.STORAGE_MINECART
|
||||||
|| t == ItemType.POWERED_MINECART
|
|| t == ItemType.POWERED_MINECART
|
||||||
|| t == ItemType.WATCH
|
|| t == ItemType.WATCH
|
||||||
|| t == ItemType.RAW_FISH
|
|
||||||
|| t == ItemType.COOKED_FISH
|
|
||||||
|| t == ItemType.CAKE_ITEM
|
|| t == ItemType.CAKE_ITEM
|
||||||
|| t == ItemType.BED_ITEM
|
|| t == ItemType.BED_ITEM
|
||||||
|| t == ItemType.MAP
|
|| t == ItemType.MAP
|
||||||
|
@ -670,7 +670,7 @@ public class BukkitWorld extends LocalWorld {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean isValidBlockType(int type) {
|
public boolean isValidBlockType(int type) {
|
||||||
return type <= 255 && Material.getMaterial(type) != null;
|
return type <= 255 && (Material.getMaterial(type) != null || BlockType.fromID(type) != null); // Bukkit isn't always updated before WorldEdit is
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -71,16 +71,19 @@ public class BlockDataCyler implements DoubleActionBlockTool {
|
|||||||
player.printError("This minecart track orientation is not supported.");
|
player.printError("This minecart track orientation is not supported.");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} else if (type == BlockID.WOODEN_STAIRS || type == BlockID.COBBLESTONE_STAIRS) {
|
} else if (type == BlockID.WOODEN_STAIRS
|
||||||
|
|| type == BlockID.COBBLESTONE_STAIRS
|
||||||
|
|| type == BlockID.BRICK_STAIRS
|
||||||
|
|| type == BlockID.STONE_BRICK_STAIRS) {
|
||||||
data = (data + increment) % 4;
|
data = (data + increment) % 4;
|
||||||
} else if (type == BlockID.SIGN_POST) {
|
} else if (type == BlockID.SIGN_POST) {
|
||||||
data = (data + increment) % 16;
|
data = (data + increment) % 16;
|
||||||
} else if (type == BlockID.WALL_SIGN) {
|
} else if (type == BlockID.WALL_SIGN) {
|
||||||
data = ((data + increment) - 2) % 4 + 2;
|
data = ((data + increment) - 2) % 4 + 2;
|
||||||
} else if (type == BlockID.STEP) {
|
} else if (type == BlockID.STEP) {
|
||||||
data = (data + increment) % 4;
|
data = (data + increment) % 6;
|
||||||
} else if (type == BlockID.DOUBLE_STEP) {
|
} else if (type == BlockID.DOUBLE_STEP) {
|
||||||
data = (data + increment) % 4;
|
data = (data + increment) % 6;
|
||||||
} else if (type == BlockID.FURNACE || type == BlockID.BURNING_FURNACE
|
} else if (type == BlockID.FURNACE || type == BlockID.BURNING_FURNACE
|
||||||
|| type == BlockID.DISPENSER) {
|
|| type == BlockID.DISPENSER) {
|
||||||
data = (data + increment) % 4 + 2;
|
data = (data + increment) % 4 + 2;
|
||||||
@ -92,6 +95,8 @@ public class BlockDataCyler implements DoubleActionBlockTool {
|
|||||||
} else {
|
} else {
|
||||||
data = prevClothColor(data);
|
data = prevClothColor(data);
|
||||||
}
|
}
|
||||||
|
} else if (type == BlockID.RED_MUSHROOM_CAP || type == BlockID.BROWN_MUSHROOM_CAP) {
|
||||||
|
data = (data + increment) % 2;
|
||||||
} else {
|
} else {
|
||||||
player.printError("That block's data cannot be cycled.");
|
player.printError("That block's data cannot be cycled.");
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user