Updated for new 1.2 blocks

This commit is contained in:
zml2008 2012-03-01 20:28:09 -08:00
parent 4afd2944db
commit a62cf3a059
4 changed files with 23 additions and 8 deletions

View File

@ -21,7 +21,7 @@ package com.sk89q.worldedit.blocks;
/**
* List of block IDs.
*
*
* @author sk89q
*/
public final class BlockID {
@ -149,4 +149,6 @@ public final class BlockID {
public static final int END_PORTAL_FRAME = 120;
public static final int END_STONE = 121;
public static final int DRAGON_EGG = 122;
public static final int REDSTONE_LAMP_OFF = 123;
public static final int REDSTONE_LAMP_ON = 124;
}

View File

@ -157,7 +157,9 @@ public enum BlockType {
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"),
DRAGON_EGG(BlockID.DRAGON_EGG, "Dragon Egg", "dragonegg", "dragons");
DRAGON_EGG(BlockID.DRAGON_EGG, "Dragon Egg", "dragonegg", "dragons"),
REDSTONE_LAMP_OFF(BlockID.REDSTONE_LAMP_OFF, "Redstone lamp (off)", "redstonelamp", "redstonelampoff", "rslamp", "rslampoff", "rsglow", "rsglowoff"),
REDSTONE_LAMP_ON(BlockID.REDSTONE_LAMP_ON, "Redstone lamp (on)", "redstonelampon", "rslampon", "rsglowon");
/**
* Stores a map of the IDs for fast access.
@ -746,6 +748,7 @@ public enum BlockType {
emitsLight.add(BlockID.BROWN_MUSHROOM_CAP);
emitsLight.add(BlockID.RED_MUSHROOM_CAP);
emitsLight.add(BlockID.END_PORTAL);
emitsLight.add(BlockID.REDSTONE_LAMP_ON);
}
/**
@ -848,7 +851,7 @@ public enum BlockType {
static {
/*
* rules:
*
*
* 1. block yields itself => addIdentity
* 2. block is part of a 2-block object => drop an appropriate item for one of the 2 blocks
* 3. block can be placed by right-clicking an obtainable item on the ground => use that item
@ -981,6 +984,9 @@ public enum BlockType {
nonDataBlockBagItems.put(BlockID.END_PORTAL, doNotDestroy);
nonDataBlockBagItems.put(BlockID.END_PORTAL_FRAME, doNotDestroy);
addIdentity(BlockID.END_STONE);
addIdentity(BlockID.REDSTONE_LAMP_OFF);
nonDataBlockBagItems.put(BlockID.REDSTONE_LAMP_ON, new BaseItem(BlockID.REDSTONE_LAMP_OFF));
}
/**
@ -1278,7 +1284,7 @@ public enum BlockType {
/**
* Returns the direction to the block(B) this block(A) is attached to.
* Attached means that if block B is destroyed, block A will pop off.
* Attached means that if block B is destroyed, block A will pop off.
*
* @param type The block id of block A
* @param data The data value of block A

View File

@ -21,7 +21,7 @@ package com.sk89q.worldedit.blocks;
/**
* List of item IDs.
*
*
* @author sk89q
*/
public final class ItemID {
@ -153,6 +153,8 @@ public final class ItemID {
public static final int EYE_OF_ENDER = 381;
public static final int GLISTERING_MELON = 382;
public static final int SPAWN_EGG = 383;
public static final int BOTTLE_O_ENCHANTING = 384;
public static final int FIRE_CHARGE = 385;
@Deprecated public static final int GOLD_RECORD = 2256; // deprecated, but leave it there
@Deprecated public static final int GREEN_RECORD = 2257; // deprecated, but leave it there
public static final int DISC_13 = 2256;

View File

@ -158,6 +158,8 @@ public enum ItemType {
END_PORTAL_FRAME(BlockID.END_PORTAL_FRAME, "End Portal Frame", "endportalframe", "airportalframe", "crystalblock"),
END_STONE(BlockID.END_STONE, "End Stone", "endstone", "enderstone", "endersand"),
DRAGON_EGG(BlockID.DRAGON_EGG, "Dragon Egg", "dragonegg", "dragons"),
REDSTONE_LAMP_OFF(BlockID.REDSTONE_LAMP_OFF, "Redstone lamp (off)", "redstonelamp", "redstonelampoff", "rslamp", "rslampoff", "rsglow", "rsglowoff"),
REDSTONE_LAMP_ON(BlockID.REDSTONE_LAMP_ON, "Redstone lamp (on)", "redstonelampon", "rslampon", "rsglowon"),
// Items
IRON_SHOVEL(ItemID.IRON_SHOVEL, "Iron shovel", "ironshovel"),
@ -287,6 +289,8 @@ public enum ItemType {
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"),
BOTTLE_O_ENCHANTING(ItemID.BOTTLE_O_ENCHANTING, "Bottle o' Enchanting", "expbottle", "bottleoenchanting", "experiencebottle", "exppotion", "experiencepotion"),
FIRE_CHARGE(ItemID.FIRE_CHARGE, "Fire Charge", "firecharge", "firestarter", "firerock"),
SPAWN_EGG(ItemID.SPAWN_EGG, "Spawn Egg", "spawnegg", "spawn", "mobspawnegg"),
DISC_13(ItemID.DISC_13, "Music Disc - 13", "disc_13"),
DISC_CAT(ItemID.DISC_CAT, "Music Disc - Cat", "disc_cat"),
@ -439,7 +443,7 @@ public enum ItemType {
/**
* Get a list of aliases.
*
*
* @return
*/
public String[] getAliases() {
@ -528,7 +532,7 @@ public enum ItemType {
/**
* Returns true if an item should not be stacked.
*
*
* @param id
* @return
*/
@ -609,12 +613,13 @@ public enum ItemType {
usesDamageValue.add(ItemID.POTION);
usesDamageValue.add(ItemID.GLASS_BOTTLE);
usesDamageValue.add(ItemID.SPAWN_EGG);
usesDamageValue.add(ItemID.MAP);
}
/**
* Returns true if an item uses its damage value for something
* other than damage.
*
*
* @param id
* @return
*/