Added blocks and items for MC 1.6

This commit is contained in:
wizjany 2013-06-21 15:38:16 -04:00
parent 48bff509dd
commit 7a757ccdb2
5 changed files with 66 additions and 4 deletions

View File

@ -212,6 +212,12 @@ public final class BlockData {
case BlockID.ANVIL: case BlockID.ANVIL:
return data ^ 0x1; return data ^ 0x1;
case BlockID.HAY_BLOCK:
if (data == 4) return 8;
else if (data == 8) return 4;
else return 0; // sanitize extraneous data values since hay blocks are weird
} }
return data; return data;
@ -404,6 +410,11 @@ public final class BlockData {
case BlockID.ANVIL: case BlockID.ANVIL:
return data ^ 0x1; return data ^ 0x1;
case BlockID.HAY_BLOCK:
if (data == 4) return 8;
else if (data == 8) return 4;
else return 0;
} }
return data; return data;
@ -767,6 +778,7 @@ public final class BlockData {
case BlockID.CAULDRON: case BlockID.CAULDRON:
case BlockID.WOODEN_STEP: case BlockID.WOODEN_STEP:
case BlockID.DOUBLE_WOODEN_STEP: case BlockID.DOUBLE_WOODEN_STEP:
case BlockID.HAY_BLOCK:
if (data > 3) return -1; if (data > 3) return -1;
return mod((data + increment), 4); return mod((data + increment), 4);
@ -841,6 +853,8 @@ public final class BlockData {
return mod(((data & 0x3) + increment), 3) | store; return mod(((data & 0x3) + increment), 3) | store;
case BlockID.CLOTH: case BlockID.CLOTH:
case BlockID.STAINED_CLAY:
case BlockID.CARPET:
if (increment == 1) { if (increment == 1) {
data = nextClothColor(data); data = nextClothColor(data);
} else if (increment == -1) { } else if (increment == -1) {

View File

@ -186,5 +186,10 @@ public final class BlockID {
public static final int QUARTZ_STAIRS = 156; public static final int QUARTZ_STAIRS = 156;
public static final int ACTIVATOR_RAIL = 157; public static final int ACTIVATOR_RAIL = 157;
public static final int DROPPER = 158; public static final int DROPPER = 158;
public static final int STAINED_CLAY = 159;
public static final int HAY_BLOCK = 170;
public static final int CARPET = 171;
public static final int HARDENED_CLAY = 172;
public static final int COAL_BLOCK = 173;
} }

View File

@ -193,7 +193,12 @@ public enum BlockType {
QUARTZ_BLOCK(BlockID.QUARTZ_BLOCK, "Block of Quartz", "quartzblock", "quartz"), QUARTZ_BLOCK(BlockID.QUARTZ_BLOCK, "Block of Quartz", "quartzblock", "quartz"),
QUARTZ_STAIRS(BlockID.QUARTZ_STAIRS, "Quartz Stairs", "quartzstairs"), QUARTZ_STAIRS(BlockID.QUARTZ_STAIRS, "Quartz Stairs", "quartzstairs"),
ACTIVATOR_RAIL(BlockID.ACTIVATOR_RAIL, "Activator Rail", "activatorrail", "tntrail", "activatortrack"), ACTIVATOR_RAIL(BlockID.ACTIVATOR_RAIL, "Activator Rail", "activatorrail", "tntrail", "activatortrack"),
DROPPER(BlockID.DROPPER, "Dropper", "dropper"); DROPPER(BlockID.DROPPER, "Dropper", "dropper"),
STAINED_CLAY(BlockID.STAINED_CLAY, "Stained clay", "stainedclay"),
HAY_BLOCK(BlockID.HAY_BLOCK, "Hay Block", "hayblock", "haybale", "wheatbale"),
CARPET(BlockID.CARPET, "Carpet", "carpet"),
HARDENED_CLAY(BlockID.HARDENED_CLAY, "Hardened Clay", "hardenedclay", "hardclay"),
COAL_BLOCK(BlockID.COAL_BLOCK, "Block of Coal", "coalblock", "blockofcoal");
/** /**
* Stores a map of the IDs for fast access. * Stores a map of the IDs for fast access.
@ -349,6 +354,7 @@ public enum BlockType {
shouldPlaceLast.add(BlockID.COMPARATOR_OFF); shouldPlaceLast.add(BlockID.COMPARATOR_OFF);
shouldPlaceLast.add(BlockID.COMPARATOR_ON); shouldPlaceLast.add(BlockID.COMPARATOR_ON);
shouldPlaceLast.add(BlockID.ACTIVATOR_RAIL); shouldPlaceLast.add(BlockID.ACTIVATOR_RAIL);
shouldPlaceLast.add(BlockID.CARPET);
} }
/** /**
@ -452,6 +458,7 @@ public enum BlockType {
canPassThrough.add(BlockID.COMPARATOR_OFF); canPassThrough.add(BlockID.COMPARATOR_OFF);
canPassThrough.add(BlockID.COMPARATOR_ON); canPassThrough.add(BlockID.COMPARATOR_ON);
canPassThrough.add(BlockID.ACTIVATOR_RAIL); canPassThrough.add(BlockID.ACTIVATOR_RAIL);
canPassThrough.add(BlockID.CARPET);
} }
/** /**
@ -628,6 +635,9 @@ public enum BlockType {
usesData.add(BlockID.ACTIVATOR_RAIL); usesData.add(BlockID.ACTIVATOR_RAIL);
usesData.add(BlockID.DROPPER); usesData.add(BlockID.DROPPER);
usesData.add(BlockID.HOPPER); usesData.add(BlockID.HOPPER);
usesData.add(BlockID.STAINED_CLAY);
usesData.add(BlockID.HAY_BLOCK);
usesData.add(BlockID.CARPET);
} }
/** /**
@ -1029,6 +1039,7 @@ public enum BlockType {
isTranslucent.add(BlockID.HOPPER); isTranslucent.add(BlockID.HOPPER);
isTranslucent.add(BlockID.QUARTZ_STAIRS); isTranslucent.add(BlockID.QUARTZ_STAIRS);
isTranslucent.add(BlockID.ACTIVATOR_RAIL); isTranslucent.add(BlockID.ACTIVATOR_RAIL);
isTranslucent.add(BlockID.CARPET);
} }
/** /**
@ -1224,6 +1235,11 @@ public enum BlockType {
addIdentity(BlockID.ACTIVATOR_RAIL); // rule 1 addIdentity(BlockID.ACTIVATOR_RAIL); // rule 1
addIdentity(BlockID.DROPPER); // rule 1 addIdentity(BlockID.DROPPER); // rule 1
addIdentities(BlockID.STAINED_CLAY, 16); // rule 1
addIdentity(BlockID.HAY_BLOCK); // rule 1
addIdentities(BlockID.CARPET, 16); // rule 1
addIdentity(BlockID.HARDENED_CLAY); // rule 1
addIdentity(BlockID.COAL_BLOCK); // rule 1
} }
/** /**
@ -1451,7 +1467,13 @@ public enum BlockType {
return new BaseItemStack(ItemID.NETHER_QUARTZ); return new BaseItemStack(ItemID.NETHER_QUARTZ);
case BlockID.QUARTZ_BLOCK: case BlockID.QUARTZ_BLOCK:
return new BaseItemStack(BlockID.QUARTZ_BLOCK, (data >= 2 ? 2 : data)); return new BaseItemStack(BlockID.QUARTZ_BLOCK, 1, (data >= 2 ? 2 : data));
case BlockID.LOG:
return new BaseItemStack(BlockID.LOG, 1, (short) (data & 0x3)); // strip orientation data
case BlockID.HAY_BLOCK:
return new BaseItemStack(BlockID.HAY_BLOCK); // strip orientation data
case BlockID.WOODEN_STAIRS: case BlockID.WOODEN_STAIRS:
case BlockID.COBBLESTONE_STAIRS: case BlockID.COBBLESTONE_STAIRS:
@ -1565,6 +1587,7 @@ public enum BlockType {
nonDataAttachments.put(BlockID.COMPARATOR_OFF, PlayerDirection.DOWN); nonDataAttachments.put(BlockID.COMPARATOR_OFF, PlayerDirection.DOWN);
nonDataAttachments.put(BlockID.COMPARATOR_ON, PlayerDirection.DOWN); nonDataAttachments.put(BlockID.COMPARATOR_ON, PlayerDirection.DOWN);
nonDataAttachments.put(BlockID.ACTIVATOR_RAIL, PlayerDirection.DOWN); nonDataAttachments.put(BlockID.ACTIVATOR_RAIL, PlayerDirection.DOWN);
nonDataAttachments.put(BlockID.CARPET, PlayerDirection.DOWN);
} }
/** /**

View File

@ -178,6 +178,11 @@ public final class ItemID {
public static final int NETHER_QUARTZ = 406; public static final int NETHER_QUARTZ = 406;
public static final int TNT_MINECART = 407; public static final int TNT_MINECART = 407;
public static final int HOPPER_MINECART = 408; public static final int HOPPER_MINECART = 408;
public static final int HORSE_ARMOR_IRON = 417;
public static final int HORSE_ARMOR_GOLD = 418;
public static final int HORSE_ARMOR_DIAMOND = 419;
public static final int LEAD = 420;
public static final int NAME_TAG = 421;
@Deprecated public static final int GOLD_RECORD = 2256; // deprecated, but leave it there @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 @Deprecated public static final int GREEN_RECORD = 2257; // deprecated, but leave it there

View File

@ -194,6 +194,11 @@ public enum ItemType {
QUARTZ_STAIRS(BlockID.QUARTZ_STAIRS, "Quartz Stairs", "quartzstairs"), QUARTZ_STAIRS(BlockID.QUARTZ_STAIRS, "Quartz Stairs", "quartzstairs"),
ACTIVATOR_RAIL(BlockID.ACTIVATOR_RAIL, "Activator Rail", "activatorrail", "tntrail", "activatortrack"), ACTIVATOR_RAIL(BlockID.ACTIVATOR_RAIL, "Activator Rail", "activatorrail", "tntrail", "activatortrack"),
DROPPER(BlockID.DROPPER, "Dropper", "dropper"), DROPPER(BlockID.DROPPER, "Dropper", "dropper"),
STAINED_CLAY(BlockID.STAINED_CLAY, "Stained clay", "stainedclay"),
HAY_BLOCK(BlockID.HAY_BLOCK, "Hay Block", "hayblock", "haybale", "wheatbale"),
CARPET(BlockID.CARPET, "Carpet", "carpet"),
HARDENED_CLAY(BlockID.HARDENED_CLAY, "Hardened Clay", "hardenedclay", "hardclay"),
COAL_BLOCK(BlockID.COAL_BLOCK, "Block of Coal", "coalblock", "blockofcoal"),
// Items // Items
IRON_SHOVEL(ItemID.IRON_SHOVEL, "Iron shovel", "ironshovel"), IRON_SHOVEL(ItemID.IRON_SHOVEL, "Iron shovel", "ironshovel"),
@ -337,7 +342,7 @@ public enum ItemType {
POISONOUS_POTATO(ItemID.POISONOUS_POTATO, "Poisonous potato", "poisonpotato", "poisonouspotato"), POISONOUS_POTATO(ItemID.POISONOUS_POTATO, "Poisonous potato", "poisonpotato", "poisonouspotato"),
BLANK_MAP(ItemID.BLANK_MAP, "Blank map", "blankmap", "emptymap"), BLANK_MAP(ItemID.BLANK_MAP, "Blank map", "blankmap", "emptymap"),
GOLDEN_CARROT(ItemID.GOLDEN_CARROT, "Golden carrot", "goldencarrot", "goldcarrot"), GOLDEN_CARROT(ItemID.GOLDEN_CARROT, "Golden carrot", "goldencarrot", "goldcarrot"),
HEAD(ItemID.HEAD, "Head", "head", "headmount", "mount"), HEAD(ItemID.HEAD, "Head", "skull", "head", "headmount", "mount"),
CARROT_ON_A_STICK(ItemID.CARROT_ON_A_STICK, "Carrot on a stick", "carrotonastick", "carrotonstick", "stickcarrot", "carrotstick"), CARROT_ON_A_STICK(ItemID.CARROT_ON_A_STICK, "Carrot on a stick", "carrotonastick", "carrotonstick", "stickcarrot", "carrotstick"),
NETHER_STAR(ItemID.NETHER_STAR, "Nether star", "netherstar", "starnether"), NETHER_STAR(ItemID.NETHER_STAR, "Nether star", "netherstar", "starnether"),
PUMPKIN_PIE(ItemID.PUMPKIN_PIE, "Pumpkin pie", "pumpkinpie"), PUMPKIN_PIE(ItemID.PUMPKIN_PIE, "Pumpkin pie", "pumpkinpie"),
@ -349,6 +354,11 @@ public enum ItemType {
NETHER_QUARTZ(ItemID.NETHER_QUARTZ, "Nether Quartz", "netherquartz", "quartz"), NETHER_QUARTZ(ItemID.NETHER_QUARTZ, "Nether Quartz", "netherquartz", "quartz"),
TNT_MINECART(ItemID.TNT_MINECART, "Minecart with TNT", "minecraftwithtnt", "tntminecart", "minecarttnt"), TNT_MINECART(ItemID.TNT_MINECART, "Minecart with TNT", "minecraftwithtnt", "tntminecart", "minecarttnt"),
HOPPER_MINECART(ItemID.HOPPER_MINECART, "Minecart with Hopper", "minecraftwithhopper", "hopperminecart", "minecarthopper"), HOPPER_MINECART(ItemID.HOPPER_MINECART, "Minecart with Hopper", "minecraftwithhopper", "hopperminecart", "minecarthopper"),
HORSE_ARMOR_IRON(ItemID.HORSE_ARMOR_IRON, "Iron Horse Armor", "ironhorsearmor", "ironbarding"),
HORSE_ARMOR_GOLD(ItemID.HORSE_ARMOR_GOLD, "Gold Horse Armor", "goldhorsearmor", "goldbarding"),
HORSE_ARMOR_DIAMOND(ItemID.HORSE_ARMOR_DIAMOND, "Diamond Horse Armor", "diamondhorsearmor", "diamondbarding"),
LEAD(ItemID.LEAD, "Lead", "lead", "leash"),
NAME_TAG(ItemID.NAME_TAG, "Name Tag", "nametag"),
DISC_13(ItemID.DISC_13, "Music Disc - 13", "disc_13"), DISC_13(ItemID.DISC_13, "Music Disc - 13", "disc_13"),
DISC_CAT(ItemID.DISC_CAT, "Music Disc - Cat", "disc_cat"), DISC_CAT(ItemID.DISC_CAT, "Music Disc - Cat", "disc_cat"),
DISC_BLOCKS(ItemID.DISC_BLOCKS, "Music Disc - blocks", "disc_blocks"), DISC_BLOCKS(ItemID.DISC_BLOCKS, "Music Disc - blocks", "disc_blocks"),
@ -579,6 +589,9 @@ public enum ItemType {
shouldNotStack.add(ItemID.ENCHANTED_BOOK); shouldNotStack.add(ItemID.ENCHANTED_BOOK);
shouldNotStack.add(ItemID.TNT_MINECART); shouldNotStack.add(ItemID.TNT_MINECART);
shouldNotStack.add(ItemID.HOPPER_MINECART); shouldNotStack.add(ItemID.HOPPER_MINECART);
shouldNotStack.add(ItemID.HORSE_ARMOR_IRON);
shouldNotStack.add(ItemID.HORSE_ARMOR_GOLD);
shouldNotStack.add(ItemID.HORSE_ARMOR_DIAMOND);
shouldNotStack.add(ItemID.DISC_13); shouldNotStack.add(ItemID.DISC_13);
shouldNotStack.add(ItemID.DISC_CAT); shouldNotStack.add(ItemID.DISC_CAT);
shouldNotStack.add(ItemID.DISC_BLOCKS); shouldNotStack.add(ItemID.DISC_BLOCKS);
@ -623,6 +636,8 @@ public enum ItemType {
usesDamageValue.add(BlockID.COBBLESTONE_WALL); usesDamageValue.add(BlockID.COBBLESTONE_WALL);
usesDamageValue.add(BlockID.ANVIL); usesDamageValue.add(BlockID.ANVIL);
usesDamageValue.add(BlockID.QUARTZ_BLOCK); usesDamageValue.add(BlockID.QUARTZ_BLOCK);
usesDamageValue.add(BlockID.STAINED_CLAY);
usesDamageValue.add(BlockID.CARPET);
usesDamageValue.add(ItemID.COAL); usesDamageValue.add(ItemID.COAL);
usesDamageValue.add(ItemID.INK_SACK); usesDamageValue.add(ItemID.INK_SACK);