From df0b27401452e8354cf644023259c3f76a681e52 Mon Sep 17 00:00:00 2001 From: sk89q Date: Sat, 29 Jan 2011 12:08:16 -0800 Subject: [PATCH] Added better support for cake, added some more block/item aliases. --- src/com/sk89q/worldedit/blocks/BlockType.java | 19 ++++++++++--------- src/com/sk89q/worldedit/blocks/ItemType.java | 14 +++++++------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/src/com/sk89q/worldedit/blocks/BlockType.java b/src/com/sk89q/worldedit/blocks/BlockType.java index cc008b648..4e716300d 100644 --- a/src/com/sk89q/worldedit/blocks/BlockType.java +++ b/src/com/sk89q/worldedit/blocks/BlockType.java @@ -37,10 +37,10 @@ public enum BlockType { WOOD(5, "Wood", "wood"), SAPLING(6, "Sapling", "sapling"), BEDROCK(7, "Bedrock", new String[]{"adminium", "bedrock"}), - WATER(8, "Water", "watermoving"), - STATIONARY_WATER(9, "Water (stationary)", "water"), - LAVA(10, "Lava", "lavamoving"), - STATIONARY_LAVA(11, "Lava (stationary)", "lava"), + WATER(8, "Water", new String[]{"watermoving", "movingwater"}), + STATIONARY_WATER(9, "Water (stationary)", new String[]{"water", "waterstationary", "stationarywater"}), + LAVA(10, "Lava", new String[]{"lavamoving", "movinglava"}), + STATIONARY_LAVA(11, "Lava (stationary)", new String[]{"lava", "lavastationary", "stationarylava"}), SAND(12, "Sand", "sand"), GRAVEL(13, "Gravel", "gravel"), GOLD_ORE(14, "Gold ore", "goldore"), @@ -56,8 +56,8 @@ public enum BlockType { SANDSTONE(24, "Sandstone", "sandstone"), NOTE_BLOCK(25, "Note block", new String[]{"musicblock", "noteblock", "note", "music", "instrument"}), CLOTH(35, "Cloth", new String[]{"cloth", "wool"}), - YELLOW_FLOWER(37, "Yellow flower", "yellowflower"), - RED_FLOWER(38, "Red rose", new String[]{"redflower", "redrose"}), + YELLOW_FLOWER(37, "Yellow flower", new String[]{"yellowflower", "flower"}), + RED_FLOWER(38, "Red rose", new String[]{"redflower", "redrose", "rose"}), BROWN_MUSHROOM(39, "Brown mushroom", new String[]{"brownmushroom", "mushroom"}), RED_MUSHROOM(40, "Red mushroom", "redmushroom"), GOLD_BLOCK(41, "Gold block", new String[]{"gold", "goldblock"}), @@ -108,11 +108,11 @@ public enum BlockType { FENCE(85, "Fence", "fence"), PUMPKIN(86, "Pumpkin", "pumpkin"), NETHERRACK(87, "Netherrack", new String[]{"redmossycobblestone", "redcobblestone", "redmosstone", "redcobble", "netherstone", "netherrack", "nether"}), - SOUL_SAND(88, "Soul sand", new String[]{"slowmud", "mud", "soulsand"}), + SOUL_SAND(88, "Soul sand", new String[]{"slowmud", "slowsand", "mud", "soulsand"}), GLOWSTONE(89, "Glowstone", new String[]{"brittlegold", "glowstone", "lightstone"}), PORTAL(90, "Portal", "portal"), JACK_O_LANTERN(91, "Pumpkin (on)", new String[]{"pumpkinlighted", "pumpkinon", "litpumpkin"}), - CAKE(92, "Cake", "Cake"); + CAKE(92, "Cake", "cake"); /** * Stores a list of dropped blocks for blocks. @@ -397,7 +397,8 @@ public enum BlockType { || id == 77 // Stone button || id == 81 // Cactus || id == 86 // Pumpkin - || id == 91; // Jack-o-lantern + || id == 91 // Jack-o-lantern + || id == 92; // Cake } /** diff --git a/src/com/sk89q/worldedit/blocks/ItemType.java b/src/com/sk89q/worldedit/blocks/ItemType.java index ba3fb646c..683838858 100644 --- a/src/com/sk89q/worldedit/blocks/ItemType.java +++ b/src/com/sk89q/worldedit/blocks/ItemType.java @@ -37,10 +37,10 @@ public enum ItemType { WOOD(5, "Wood", "wood"), SAPLING(6, "Sapling", "sapling"), BEDROCK(7, "Bedrock", new String[]{"adminium", "bedrock"}), - WATER(8, "Water", "watermoving"), - STATIONARY_WATER(9, "Water (stationary)", "water"), - LAVA(10, "Lava", "lavamoving"), - STATIONARY_LAVA(11, "Lava (stationary)", "lava"), + WATER(8, "Water", new String[]{"watermoving", "movingwater"}), + STATIONARY_WATER(9, "Water (stationary)", new String[]{"water", "waterstationary", "stationarywater"}), + LAVA(10, "Lava", new String[]{"lavamoving", "movinglava"}), + STATIONARY_LAVA(11, "Lava (stationary)", new String[]{"lava", "lavastationary", "stationarylava"}), SAND(12, "Sand", "sand"), GRAVEL(13, "Gravel", "gravel"), GOLD_ORE(14, "Gold ore", "goldore"), @@ -56,8 +56,8 @@ public enum ItemType { SANDSTONE(24, "Sandstone", "sandstone"), NOTE_BLOCK(25, "Note block", new String[]{"musicblock", "noteblock", "note", "music", "instrument"}), CLOTH(35, "Cloth", "cloth"), - YELLOW_FLOWER(37, "Yellow flower", "yellowflower"), - RED_FLOWER(38, "Red rose", new String[]{"redflower", "redrose"}), + YELLOW_FLOWER(37, "Yellow flower", new String[]{"yellowflower", "flower"}), + RED_FLOWER(38, "Red rose", new String[]{"redflower", "redrose", "rose"}), BROWN_MUSHROOM(39, "Brown mushroom", new String[]{"brownmushroom", "mushroom"}), RED_MUSHROOM(40, "Red mushroom", "redmushroom"), GOLD_BLOCK(41, "Gold block", new String[]{"gold", "goldblock"}), @@ -112,7 +112,7 @@ public enum ItemType { GLOWSTONE(89, "Glowstone", new String[]{"brittlegold", "glowstone", "lightstone"}), PORTAL(90, "Portal", "portal"), JACK_O_LANTERN(91, "Pumpkin (on)", new String[]{"pumpkinlighted", "pumpkinon", "litpumpkin"}), - CAKE(92, "Cake", "Cake"), + CAKE(92, "Cake", "cake"), IRON_SHOVEL(256, "Iron shovel", "ironshovel"), IRON_PICK(257, "Iron pick", "ironpick"), IRON_AXE(258, "Iron axe", "ironaxe"),