Add a few 1.8 features/blocks/items/whatever

This commit is contained in:
Zach Brown 2014-09-10 16:19:06 -05:00
parent cdbc7da18f
commit e60db6a306
3 changed files with 1625 additions and 0 deletions

View File

@ -0,0 +1,174 @@
From a638c19165d7c6b06753762109c8ad69e76bef72 Mon Sep 17 00:00:00 2001
From: Zach Brown <Zbob750@live.com>
Date: Sun, 7 Sep 2014 14:56:25 -0500
Subject: [PATCH] Some 1.8 features
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
index c45c180..5752c0f 100644
--- a/src/main/java/org/bukkit/Material.java
+++ b/src/main/java/org/bukkit/Material.java
@@ -229,12 +229,43 @@ public enum Material {
LOG_2(162),
ACACIA_STAIRS(163, Stairs.class),
DARK_OAK_STAIRS(164, Stairs.class),
+ // PaperSpigot start - Add new 1.8 blocks
+ SLIME_BLOCK(165),
+ BARRIER_BLOCK(166),
+ IRON_TRAPDOOR(167, TrapDoor.class),
+ PRISMARINE_BLOCK(168),
+ LANTERN_BLOCK(169),
+ // PaperSpigot end
HAY_BLOCK(170),
CARPET(171),
HARD_CLAY(172),
COAL_BLOCK(173),
PACKED_ICE(174),
DOUBLE_PLANT(175),
+ // PaperSpigot start - Add more new 1.8 blocks
+ STANDING_BANNER(176),
+ HANGING_BANNER(177),
+ NIGHTLIGHT_DETECTOR(178),
+ RED_SANDSTONE(179),
+ RED_SANDSTONE_STAIRS(180),
+ DOUBLE_STEP2(181, Step.class),
+ STEP2(182),
+ SPRUCE_FENCE_GATE(183, Gate.class),
+ BIRCH_FENCE_GATE(184, Gate.class),
+ JUNGLE_FENCE_GATE(185, Gate.class),
+ DARK_OAK_FENCE_GATE(186, Gate.class),
+ ACACIA_FENCE_GATE(187, Gate.class),
+ SPRUCE_FENCE(188),
+ BIRCH_FENCE(189),
+ JUNGLE_FENCE(190),
+ DARK_OAK_FENCE(191),
+ ACACIA_FENCE(192),
+ SPRUCE_DOOR_BLOCK(193),
+ BIRCH_DOOR_BLOCK(194),
+ JUNGLE_DOOR_BLOCK(195),
+ ACACIA_DOOR_BLOCK(196),
+ DARK_OAK_DOOR_BLOCK(197),
+ // PaperSpigot end
// ----- Item Separator -----
IRON_SPADE(256, 1, 250),
IRON_PICKAXE(257, 1, 250),
@@ -401,6 +432,15 @@ public enum Material {
LEASH(420),
NAME_TAG(421),
COMMAND_MINECART(422, 1),
+ // PaperSpigot start - Add new items
+ RAW_MUTTON(423),
+ COOKED_MUTTON(424),
+ SPRUCE_DOOR(427),
+ BIRCH_DOOR(428),
+ JUNGLE_DOOR(429),
+ ACACIA_DOOR(430),
+ DARK_OAK_DOOR(431),
+ // PaperSpigot end
GOLD_RECORD(2256, 1),
GREEN_RECORD(2257, 1),
RECORD_3(2258, 1),
@@ -558,6 +598,8 @@ public enum Material {
case GOLDEN_APPLE:
case ROTTEN_FLESH:
case SPIDER_EYE:
+ case RAW_MUTTON:
+ case COOKED_MUTTON:
return true;
default:
return false;
@@ -777,6 +819,29 @@ public enum Material {
case ACACIA_STAIRS:
case DARK_OAK_STAIRS:
case PACKED_ICE:
+ // PaperSpigot start - Add new block types
+ case PRISMARINE_BLOCK:
+ case NIGHTLIGHT_DETECTOR:
+ case RED_SANDSTONE:
+ case RED_SANDSTONE_STAIRS:
+ case DOUBLE_STEP2:
+ case STEP2:
+ case SPRUCE_FENCE_GATE:
+ case BIRCH_FENCE_GATE:
+ case JUNGLE_FENCE_GATE:
+ case DARK_OAK_FENCE_GATE:
+ case ACACIA_FENCE_GATE:
+ case SPRUCE_FENCE:
+ case BIRCH_FENCE:
+ case JUNGLE_FENCE:
+ case DARK_OAK_FENCE:
+ case ACACIA_FENCE:
+ case SPRUCE_DOOR_BLOCK:
+ case BIRCH_DOOR_BLOCK:
+ case JUNGLE_DOOR_BLOCK:
+ case ACACIA_DOOR_BLOCK:
+ case DARK_OAK_DOOR_BLOCK:
+ // PaperSpigot end
return true;
default:
return false;
@@ -837,6 +902,13 @@ public enum Material {
case ACTIVATOR_RAIL:
case CARPET:
case DOUBLE_PLANT:
+ // PaperSpigot start - Add new block types
+ case SLIME_BLOCK:
+ case BARRIER_BLOCK:
+ case LANTERN_BLOCK:
+ case STANDING_BANNER:
+ case HANGING_BANNER:
+ // PaperSpigot end
return true;
default:
return false;
@@ -889,6 +961,23 @@ public enum Material {
case LOG_2:
case ACACIA_STAIRS:
case DARK_OAK_STAIRS:
+ // PaperSpigot start - Add new blocks
+ case SPRUCE_FENCE_GATE:
+ case BIRCH_FENCE_GATE:
+ case JUNGLE_FENCE_GATE:
+ case DARK_OAK_FENCE_GATE:
+ case ACACIA_FENCE_GATE:
+ case SPRUCE_FENCE:
+ case BIRCH_FENCE:
+ case JUNGLE_FENCE:
+ case DARK_OAK_FENCE:
+ case ACACIA_FENCE:
+ case SPRUCE_DOOR_BLOCK:
+ case BIRCH_DOOR_BLOCK:
+ case JUNGLE_DOOR_BLOCK:
+ case ACACIA_DOOR_BLOCK:
+ case DARK_OAK_DOOR_BLOCK:
+ // PaperSpigot end
return true;
default:
return false;
@@ -928,6 +1017,13 @@ public enum Material {
case LOG_2:
case CARPET:
case DOUBLE_PLANT:
+ // PaperSpigot start - Add new block types
+ case SPRUCE_FENCE:
+ case BIRCH_FENCE:
+ case JUNGLE_FENCE:
+ case DARK_OAK_FENCE:
+ case ACACIA_FENCE:
+ // PaperSpigot end
return true;
default:
return false;
@@ -1009,6 +1105,9 @@ public enum Material {
case COAL_BLOCK:
case LOG_2:
case PACKED_ICE:
+ // PaperSpigot start - Add new blocks
+ case DOUBLE_STEP2:
+ // PaperSpigot end
return true;
default:
return false;
--
1.9.1

View File

@ -0,0 +1,512 @@
From d1696997a26b8ce4731b0e51b369ebf75bace45a Mon Sep 17 00:00:00 2001
From: Zach Brown <Zbob750@live.com>
Date: Sat, 6 Sep 2014 22:05:09 -0500
Subject: [PATCH] mc-dev imports for 1.8 things
diff --git a/src/main/java/net/minecraft/server/BlockStone.java b/src/main/java/net/minecraft/server/BlockStone.java
new file mode 100644
index 0000000..33be3e3
--- /dev/null
+++ b/src/main/java/net/minecraft/server/BlockStone.java
@@ -0,0 +1,15 @@
+package net.minecraft.server;
+
+import java.util.Random;
+
+public class BlockStone extends Block {
+
+ public BlockStone() {
+ super(Material.STONE);
+ this.a(CreativeModeTab.b);
+ }
+
+ public Item getDropType(int i, Random random, int j) {
+ return Item.getItemOf(Blocks.COBBLESTONE);
+ }
+}
diff --git a/src/main/java/net/minecraft/server/Blocks.java b/src/main/java/net/minecraft/server/Blocks.java
new file mode 100644
index 0000000..c36e7fb
--- /dev/null
+++ b/src/main/java/net/minecraft/server/Blocks.java
@@ -0,0 +1,177 @@
+package net.minecraft.server;
+
+public class Blocks {
+
+ public static final Block AIR = (Block) Block.REGISTRY.get("air");
+ public static final Block STONE = (Block) Block.REGISTRY.get("stone");
+ public static final BlockGrass GRASS = (BlockGrass) Block.REGISTRY.get("grass");
+ public static final Block DIRT = (Block) Block.REGISTRY.get("dirt");
+ public static final Block COBBLESTONE = (Block) Block.REGISTRY.get("cobblestone");
+ public static final Block WOOD = (Block) Block.REGISTRY.get("planks");
+ public static final Block SAPLING = (Block) Block.REGISTRY.get("sapling");
+ public static final Block BEDROCK = (Block) Block.REGISTRY.get("bedrock");
+ public static final BlockFluids WATER = (BlockFluids) Block.REGISTRY.get("flowing_water");
+ public static final Block STATIONARY_WATER = (Block) Block.REGISTRY.get("water");
+ public static final BlockFluids LAVA = (BlockFluids) Block.REGISTRY.get("flowing_lava");
+ public static final Block STATIONARY_LAVA = (Block) Block.REGISTRY.get("lava");
+ public static final BlockSand SAND = (BlockSand) Block.REGISTRY.get("sand");
+ public static final Block GRAVEL = (Block) Block.REGISTRY.get("gravel");
+ public static final Block GOLD_ORE = (Block) Block.REGISTRY.get("gold_ore");
+ public static final Block IRON_ORE = (Block) Block.REGISTRY.get("iron_ore");
+ public static final Block COAL_ORE = (Block) Block.REGISTRY.get("coal_ore");
+ public static final Block LOG = (Block) Block.REGISTRY.get("log");
+ public static final Block LOG2 = (Block) Block.REGISTRY.get("log2");
+ public static final BlockLeaves LEAVES = (BlockLeaves) Block.REGISTRY.get("leaves");
+ public static final BlockLeaves LEAVES2 = (BlockLeaves) Block.REGISTRY.get("leaves2");
+ public static final Block SPONGE = (Block) Block.REGISTRY.get("sponge");
+ public static final Block GLASS = (Block) Block.REGISTRY.get("glass");
+ public static final Block LAPIS_ORE = (Block) Block.REGISTRY.get("lapis_ore");
+ public static final Block LAPIS_BLOCK = (Block) Block.REGISTRY.get("lapis_block");
+ public static final Block DISPENSER = (Block) Block.REGISTRY.get("dispenser");
+ public static final Block SANDSTONE = (Block) Block.REGISTRY.get("sandstone");
+ public static final Block NOTE_BLOCK = (Block) Block.REGISTRY.get("noteblock");
+ public static final Block BED = (Block) Block.REGISTRY.get("bed");
+ public static final Block GOLDEN_RAIL = (Block) Block.REGISTRY.get("golden_rail");
+ public static final Block DETECTOR_RAIL = (Block) Block.REGISTRY.get("detector_rail");
+ public static final BlockPiston PISTON_STICKY = (BlockPiston) Block.REGISTRY.get("sticky_piston");
+ public static final Block WEB = (Block) Block.REGISTRY.get("web");
+ public static final BlockLongGrass LONG_GRASS = (BlockLongGrass) Block.REGISTRY.get("tallgrass");
+ public static final BlockDeadBush DEAD_BUSH = (BlockDeadBush) Block.REGISTRY.get("deadbush");
+ public static final BlockPiston PISTON = (BlockPiston) Block.REGISTRY.get("piston");
+ public static final BlockPistonExtension PISTON_EXTENSION = (BlockPistonExtension) Block.REGISTRY.get("piston_head");
+ public static final Block WOOL = (Block) Block.REGISTRY.get("wool");
+ public static final BlockPistonMoving PISTON_MOVING = (BlockPistonMoving) Block.REGISTRY.get("piston_extension");
+ public static final BlockFlowers YELLOW_FLOWER = (BlockFlowers) Block.REGISTRY.get("yellow_flower");
+ public static final BlockFlowers RED_ROSE = (BlockFlowers) Block.REGISTRY.get("red_flower");
+ public static final BlockPlant BROWN_MUSHROOM = (BlockPlant) Block.REGISTRY.get("brown_mushroom");
+ public static final BlockPlant RED_MUSHROOM = (BlockPlant) Block.REGISTRY.get("red_mushroom");
+ public static final Block GOLD_BLOCK = (Block) Block.REGISTRY.get("gold_block");
+ public static final Block IRON_BLOCK = (Block) Block.REGISTRY.get("iron_block");
+ public static final BlockStepAbstract DOUBLE_STEP = (BlockStepAbstract) Block.REGISTRY.get("double_stone_slab");
+ public static final BlockStepAbstract STEP = (BlockStepAbstract) Block.REGISTRY.get("stone_slab");
+ public static final Block BRICK = (Block) Block.REGISTRY.get("brick_block");
+ public static final Block TNT = (Block) Block.REGISTRY.get("tnt");
+ public static final Block BOOKSHELF = (Block) Block.REGISTRY.get("bookshelf");
+ public static final Block MOSSY_COBBLESTONE = (Block) Block.REGISTRY.get("mossy_cobblestone");
+ public static final Block OBSIDIAN = (Block) Block.REGISTRY.get("obsidian");
+ public static final Block TORCH = (Block) Block.REGISTRY.get("torch");
+ public static final BlockFire FIRE = (BlockFire) Block.REGISTRY.get("fire");
+ public static final Block MOB_SPAWNER = (Block) Block.REGISTRY.get("mob_spawner");
+ public static final Block WOOD_STAIRS = (Block) Block.REGISTRY.get("oak_stairs");
+ public static final BlockChest CHEST = (BlockChest) Block.REGISTRY.get("chest");
+ public static final BlockRedstoneWire REDSTONE_WIRE = (BlockRedstoneWire) Block.REGISTRY.get("redstone_wire");
+ public static final Block DIAMOND_ORE = (Block) Block.REGISTRY.get("diamond_ore");
+ public static final Block DIAMOND_BLOCK = (Block) Block.REGISTRY.get("diamond_block");
+ public static final Block WORKBENCH = (Block) Block.REGISTRY.get("crafting_table");
+ public static final Block CROPS = (Block) Block.REGISTRY.get("wheat");
+ public static final Block SOIL = (Block) Block.REGISTRY.get("farmland");
+ public static final Block FURNACE = (Block) Block.REGISTRY.get("furnace");
+ public static final Block BURNING_FURNACE = (Block) Block.REGISTRY.get("lit_furnace");
+ public static final Block SIGN_POST = (Block) Block.REGISTRY.get("standing_sign");
+ public static final Block WOODEN_DOOR = (Block) Block.REGISTRY.get("wooden_door");
+ public static final Block LADDER = (Block) Block.REGISTRY.get("ladder");
+ public static final Block RAILS = (Block) Block.REGISTRY.get("rail");
+ public static final Block COBBLESTONE_STAIRS = (Block) Block.REGISTRY.get("stone_stairs");
+ public static final Block WALL_SIGN = (Block) Block.REGISTRY.get("wall_sign");
+ public static final Block LEVER = (Block) Block.REGISTRY.get("lever");
+ public static final Block STONE_PLATE = (Block) Block.REGISTRY.get("stone_pressure_plate");
+ public static final Block IRON_DOOR_BLOCK = (Block) Block.REGISTRY.get("iron_door");
+ public static final Block WOOD_PLATE = (Block) Block.REGISTRY.get("wooden_pressure_plate");
+ public static final Block REDSTONE_ORE = (Block) Block.REGISTRY.get("redstone_ore");
+ public static final Block GLOWING_REDSTONE_ORE = (Block) Block.REGISTRY.get("lit_redstone_ore");
+ public static final Block REDSTONE_TORCH_OFF = (Block) Block.REGISTRY.get("unlit_redstone_torch");
+ public static final Block REDSTONE_TORCH_ON = (Block) Block.REGISTRY.get("redstone_torch");
+ public static final Block STONE_BUTTON = (Block) Block.REGISTRY.get("stone_button");
+ public static final Block SNOW = (Block) Block.REGISTRY.get("snow_layer");
+ public static final Block ICE = (Block) Block.REGISTRY.get("ice");
+ public static final Block SNOW_BLOCK = (Block) Block.REGISTRY.get("snow");
+ public static final Block CACTUS = (Block) Block.REGISTRY.get("cactus");
+ public static final Block CLAY = (Block) Block.REGISTRY.get("clay");
+ public static final Block SUGAR_CANE_BLOCK = (Block) Block.REGISTRY.get("reeds");
+ public static final Block JUKEBOX = (Block) Block.REGISTRY.get("jukebox");
+ public static final Block FENCE = (Block) Block.REGISTRY.get("fence");
+ public static final Block PUMPKIN = (Block) Block.REGISTRY.get("pumpkin");
+ public static final Block NETHERRACK = (Block) Block.REGISTRY.get("netherrack");
+ public static final Block SOUL_SAND = (Block) Block.REGISTRY.get("soul_sand");
+ public static final Block GLOWSTONE = (Block) Block.REGISTRY.get("glowstone");
+ public static final BlockPortal PORTAL = (BlockPortal) Block.REGISTRY.get("portal");
+ public static final Block JACK_O_LANTERN = (Block) Block.REGISTRY.get("lit_pumpkin");
+ public static final Block CAKE_BLOCK = (Block) Block.REGISTRY.get("cake");
+ public static final BlockRepeater DIODE_OFF = (BlockRepeater) Block.REGISTRY.get("unpowered_repeater");
+ public static final BlockRepeater DIODE_ON = (BlockRepeater) Block.REGISTRY.get("powered_repeater");
+ public static final Block TRAP_DOOR = (Block) Block.REGISTRY.get("trapdoor");
+ public static final Block MONSTER_EGGS = (Block) Block.REGISTRY.get("monster_egg");
+ public static final Block SMOOTH_BRICK = (Block) Block.REGISTRY.get("stonebrick");
+ public static final Block BIG_MUSHROOM_1 = (Block) Block.REGISTRY.get("brown_mushroom_block");
+ public static final Block BIG_MUSHROOM_2 = (Block) Block.REGISTRY.get("red_mushroom_block");
+ public static final Block IRON_FENCE = (Block) Block.REGISTRY.get("iron_bars");
+ public static final Block THIN_GLASS = (Block) Block.REGISTRY.get("glass_pane");
+ public static final Block MELON = (Block) Block.REGISTRY.get("melon_block");
+ public static final Block PUMPKIN_STEM = (Block) Block.REGISTRY.get("pumpkin_stem");
+ public static final Block MELON_STEM = (Block) Block.REGISTRY.get("melon_stem");
+ public static final Block VINE = (Block) Block.REGISTRY.get("vine");
+ public static final Block FENCE_GATE = (Block) Block.REGISTRY.get("fence_gate");
+ public static final Block BRICK_STAIRS = (Block) Block.REGISTRY.get("brick_stairs");
+ public static final Block STONE_STAIRS = (Block) Block.REGISTRY.get("stone_brick_stairs");
+ public static final BlockMycel MYCEL = (BlockMycel) Block.REGISTRY.get("mycelium");
+ public static final Block WATER_LILY = (Block) Block.REGISTRY.get("waterlily");
+ public static final Block NETHER_BRICK = (Block) Block.REGISTRY.get("nether_brick");
+ public static final Block NETHER_FENCE = (Block) Block.REGISTRY.get("nether_brick_fence");
+ public static final Block NETHER_BRICK_STAIRS = (Block) Block.REGISTRY.get("nether_brick_stairs");
+ public static final Block NETHER_WART = (Block) Block.REGISTRY.get("nether_wart");
+ public static final Block ENCHANTMENT_TABLE = (Block) Block.REGISTRY.get("enchanting_table");
+ public static final Block BREWING_STAND = (Block) Block.REGISTRY.get("brewing_stand");
+ public static final BlockCauldron CAULDRON = (BlockCauldron) Block.REGISTRY.get("cauldron");
+ public static final Block ENDER_PORTAL = (Block) Block.REGISTRY.get("end_portal");
+ public static final Block ENDER_PORTAL_FRAME = (Block) Block.REGISTRY.get("end_portal_frame");
+ public static final Block WHITESTONE = (Block) Block.REGISTRY.get("end_stone");
+ public static final Block DRAGON_EGG = (Block) Block.REGISTRY.get("dragon_egg");
+ public static final Block REDSTONE_LAMP_OFF = (Block) Block.REGISTRY.get("redstone_lamp");
+ public static final Block REDSTONE_LAMP_ON = (Block) Block.REGISTRY.get("lit_redstone_lamp");
+ public static final BlockStepAbstract WOOD_DOUBLE_STEP = (BlockStepAbstract) Block.REGISTRY.get("double_wooden_slab");
+ public static final BlockStepAbstract WOOD_STEP = (BlockStepAbstract) Block.REGISTRY.get("wooden_slab");
+ public static final Block COCOA = (Block) Block.REGISTRY.get("cocoa");
+ public static final Block SANDSTONE_STAIRS = (Block) Block.REGISTRY.get("sandstone_stairs");
+ public static final Block EMERALD_ORE = (Block) Block.REGISTRY.get("emerald_ore");
+ public static final Block ENDER_CHEST = (Block) Block.REGISTRY.get("ender_chest");
+ public static final BlockTripwireHook TRIPWIRE_SOURCE = (BlockTripwireHook) Block.REGISTRY.get("tripwire_hook");
+ public static final Block TRIPWIRE = (Block) Block.REGISTRY.get("tripwire");
+ public static final Block EMERALD_BLOCK = (Block) Block.REGISTRY.get("emerald_block");
+ public static final Block SPRUCE_WOOD_STAIRS = (Block) Block.REGISTRY.get("spruce_stairs");
+ public static final Block BIRCH_WOOD_STAIRS = (Block) Block.REGISTRY.get("birch_stairs");
+ public static final Block JUNGLE_WOOD_STAIRS = (Block) Block.REGISTRY.get("jungle_stairs");
+ public static final Block COMMAND = (Block) Block.REGISTRY.get("command_block");
+ public static final BlockBeacon BEACON = (BlockBeacon) Block.REGISTRY.get("beacon");
+ public static final Block COBBLE_WALL = (Block) Block.REGISTRY.get("cobblestone_wall");
+ public static final Block FLOWER_POT = (Block) Block.REGISTRY.get("flower_pot");
+ public static final Block CARROTS = (Block) Block.REGISTRY.get("carrots");
+ public static final Block POTATOES = (Block) Block.REGISTRY.get("potatoes");
+ public static final Block WOOD_BUTTON = (Block) Block.REGISTRY.get("wooden_button");
+ public static final Block SKULL = (Block) Block.REGISTRY.get("skull");
+ public static final Block ANVIL = (Block) Block.REGISTRY.get("anvil");
+ public static final Block TRAPPED_CHEST = (Block) Block.REGISTRY.get("trapped_chest");
+ public static final Block GOLD_PLATE = (Block) Block.REGISTRY.get("light_weighted_pressure_plate");
+ public static final Block IRON_PLATE = (Block) Block.REGISTRY.get("heavy_weighted_pressure_plate");
+ public static final BlockRedstoneComparator REDSTONE_COMPARATOR_OFF = (BlockRedstoneComparator) Block.REGISTRY.get("unpowered_comparator");
+ public static final BlockRedstoneComparator REDSTONE_COMPARATOR_ON = (BlockRedstoneComparator) Block.REGISTRY.get("powered_comparator");
+ public static final BlockDaylightDetector DAYLIGHT_DETECTOR = (BlockDaylightDetector) Block.REGISTRY.get("daylight_detector");
+ public static final Block REDSTONE_BLOCK = (Block) Block.REGISTRY.get("redstone_block");
+ public static final Block QUARTZ_ORE = (Block) Block.REGISTRY.get("quartz_ore");
+ public static final BlockHopper HOPPER = (BlockHopper) Block.REGISTRY.get("hopper");
+ public static final Block QUARTZ_BLOCK = (Block) Block.REGISTRY.get("quartz_block");
+ public static final Block QUARTZ_STAIRS = (Block) Block.REGISTRY.get("quartz_stairs");
+ public static final Block ACTIVATOR_RAIL = (Block) Block.REGISTRY.get("activator_rail");
+ public static final Block DROPPER = (Block) Block.REGISTRY.get("dropper");
+ public static final Block STAINED_HARDENED_CLAY = (Block) Block.REGISTRY.get("stained_hardened_clay");
+ public static final Block HAY_BLOCK = (Block) Block.REGISTRY.get("hay_block");
+ public static final Block WOOL_CARPET = (Block) Block.REGISTRY.get("carpet");
+ public static final Block HARDENED_CLAY = (Block) Block.REGISTRY.get("hardened_clay");
+ public static final Block COAL_BLOCK = (Block) Block.REGISTRY.get("coal_block");
+ public static final Block PACKED_ICE = (Block) Block.REGISTRY.get("packed_ice");
+ public static final Block ACACIA_STAIRS = (Block) Block.REGISTRY.get("acacia_stairs");
+ public static final Block DARK_OAK_STAIRS = (Block) Block.REGISTRY.get("dark_oak_stairs");
+ public static final BlockTallPlant DOUBLE_PLANT = (BlockTallPlant) Block.REGISTRY.get("double_plant");
+ public static final BlockStainedGlass STAINED_GLASS = (BlockStainedGlass) Block.REGISTRY.get("stained_glass");
+ public static final BlockStainedGlassPane STAINED_GLASS_PANE = (BlockStainedGlassPane) Block.REGISTRY.get("stained_glass_pane");
+
+}
diff --git a/src/main/java/net/minecraft/server/ItemDoor.java b/src/main/java/net/minecraft/server/ItemDoor.java
new file mode 100644
index 0000000..ee8568b
--- /dev/null
+++ b/src/main/java/net/minecraft/server/ItemDoor.java
@@ -0,0 +1,79 @@
+package net.minecraft.server;
+
+public class ItemDoor extends Item {
+
+ private Material a;
+
+ public ItemDoor(Material material) {
+ this.a = material;
+ this.maxStackSize = 1;
+ this.a(CreativeModeTab.d);
+ }
+
+ public boolean interactWith(ItemStack itemstack, EntityHuman entityhuman, World world, int i, int j, int k, int l, float f, float f1, float f2) {
+ if (l != 1) {
+ return false;
+ } else {
+ ++j;
+ Block block;
+
+ if (this.a == Material.WOOD) {
+ block = Blocks.WOODEN_DOOR;
+ } else {
+ block = Blocks.IRON_DOOR_BLOCK;
+ }
+
+ if (entityhuman.a(i, j, k, l, itemstack) && entityhuman.a(i, j + 1, k, l, itemstack)) {
+ if (!block.canPlace(world, i, j, k)) {
+ return false;
+ } else {
+ int i1 = MathHelper.floor((double) ((entityhuman.yaw + 180.0F) * 4.0F / 360.0F) - 0.5D) & 3;
+
+ place(world, i, j, k, i1, block);
+ --itemstack.count;
+ return true;
+ }
+ } else {
+ return false;
+ }
+ }
+ }
+
+ public static void place(World world, int i, int j, int k, int l, Block block) {
+ byte b0 = 0;
+ byte b1 = 0;
+
+ if (l == 0) {
+ b1 = 1;
+ }
+
+ if (l == 1) {
+ b0 = -1;
+ }
+
+ if (l == 2) {
+ b1 = -1;
+ }
+
+ if (l == 3) {
+ b0 = 1;
+ }
+
+ int i1 = (world.getType(i - b0, j, k - b1).r() ? 1 : 0) + (world.getType(i - b0, j + 1, k - b1).r() ? 1 : 0);
+ int j1 = (world.getType(i + b0, j, k + b1).r() ? 1 : 0) + (world.getType(i + b0, j + 1, k + b1).r() ? 1 : 0);
+ boolean flag = world.getType(i - b0, j, k - b1) == block || world.getType(i - b0, j + 1, k - b1) == block;
+ boolean flag1 = world.getType(i + b0, j, k + b1) == block || world.getType(i + b0, j + 1, k + b1) == block;
+ boolean flag2 = false;
+
+ if (flag && !flag1) {
+ flag2 = true;
+ } else if (j1 > i1) {
+ flag2 = true;
+ }
+
+ world.setTypeAndData(i, j, k, block, l, 2);
+ world.setTypeAndData(i, j + 1, k, block, 8 | (flag2 ? 1 : 0), 2);
+ world.applyPhysics(i, j, k, block);
+ world.applyPhysics(i, j + 1, k, block);
+ }
+}
diff --git a/src/main/java/net/minecraft/server/Items.java b/src/main/java/net/minecraft/server/Items.java
new file mode 100644
index 0000000..6834e67
--- /dev/null
+++ b/src/main/java/net/minecraft/server/Items.java
@@ -0,0 +1,177 @@
+package net.minecraft.server;
+
+public class Items {
+
+ public static final Item IRON_SPADE = (Item) Item.REGISTRY.get("iron_shovel");
+ public static final Item IRON_PICKAXE = (Item) Item.REGISTRY.get("iron_pickaxe");
+ public static final Item IRON_AXE = (Item) Item.REGISTRY.get("iron_axe");
+ public static final Item FLINT_AND_STEEL = (Item) Item.REGISTRY.get("flint_and_steel");
+ public static final Item APPLE = (Item) Item.REGISTRY.get("apple");
+ public static final ItemBow BOW = (ItemBow) Item.REGISTRY.get("bow");
+ public static final Item ARROW = (Item) Item.REGISTRY.get("arrow");
+ public static final Item COAL = (Item) Item.REGISTRY.get("coal");
+ public static final Item DIAMOND = (Item) Item.REGISTRY.get("diamond");
+ public static final Item IRON_INGOT = (Item) Item.REGISTRY.get("iron_ingot");
+ public static final Item GOLD_INGOT = (Item) Item.REGISTRY.get("gold_ingot");
+ public static final Item IRON_SWORD = (Item) Item.REGISTRY.get("iron_sword");
+ public static final Item WOOD_SWORD = (Item) Item.REGISTRY.get("wooden_sword");
+ public static final Item WOOD_SPADE = (Item) Item.REGISTRY.get("wooden_shovel");
+ public static final Item WOOD_PICKAXE = (Item) Item.REGISTRY.get("wooden_pickaxe");
+ public static final Item WOOD_AXE = (Item) Item.REGISTRY.get("wooden_axe");
+ public static final Item STONE_SWORD = (Item) Item.REGISTRY.get("stone_sword");
+ public static final Item STONE_SPADE = (Item) Item.REGISTRY.get("stone_shovel");
+ public static final Item STONE_PICKAXE = (Item) Item.REGISTRY.get("stone_pickaxe");
+ public static final Item STONE_AXE = (Item) Item.REGISTRY.get("stone_axe");
+ public static final Item DIAMOND_SWORD = (Item) Item.REGISTRY.get("diamond_sword");
+ public static final Item DIAMOND_SPADE = (Item) Item.REGISTRY.get("diamond_shovel");
+ public static final Item DIAMOND_PICKAXE = (Item) Item.REGISTRY.get("diamond_pickaxe");
+ public static final Item DIAMOND_AXE = (Item) Item.REGISTRY.get("diamond_axe");
+ public static final Item STICK = (Item) Item.REGISTRY.get("stick");
+ public static final Item BOWL = (Item) Item.REGISTRY.get("bowl");
+ public static final Item MUSHROOM_SOUP = (Item) Item.REGISTRY.get("mushroom_stew");
+ public static final Item GOLD_SWORD = (Item) Item.REGISTRY.get("golden_sword");
+ public static final Item GOLD_SPADE = (Item) Item.REGISTRY.get("golden_shovel");
+ public static final Item GOLD_PICKAXE = (Item) Item.REGISTRY.get("golden_pickaxe");
+ public static final Item GOLD_AXE = (Item) Item.REGISTRY.get("golden_axe");
+ public static final Item STRING = (Item) Item.REGISTRY.get("string");
+ public static final Item FEATHER = (Item) Item.REGISTRY.get("feather");
+ public static final Item SULPHUR = (Item) Item.REGISTRY.get("gunpowder");
+ public static final Item WOOD_HOE = (Item) Item.REGISTRY.get("wooden_hoe");
+ public static final Item STONE_HOE = (Item) Item.REGISTRY.get("stone_hoe");
+ public static final Item IRON_HOE = (Item) Item.REGISTRY.get("iron_hoe");
+ public static final Item DIAMOND_HOE = (Item) Item.REGISTRY.get("diamond_hoe");
+ public static final Item GOLD_HOE = (Item) Item.REGISTRY.get("golden_hoe");
+ public static final Item SEEDS = (Item) Item.REGISTRY.get("wheat_seeds");
+ public static final Item WHEAT = (Item) Item.REGISTRY.get("wheat");
+ public static final Item BREAD = (Item) Item.REGISTRY.get("bread");
+ public static final ItemArmor LEATHER_HELMET = (ItemArmor) Item.REGISTRY.get("leather_helmet");
+ public static final ItemArmor LEATHER_CHESTPLATE = (ItemArmor) Item.REGISTRY.get("leather_chestplate");
+ public static final ItemArmor LEATHER_LEGGINGS = (ItemArmor) Item.REGISTRY.get("leather_leggings");
+ public static final ItemArmor LEATHER_BOOTS = (ItemArmor) Item.REGISTRY.get("leather_boots");
+ public static final ItemArmor CHAINMAIL_HELMET = (ItemArmor) Item.REGISTRY.get("chainmail_helmet");
+ public static final ItemArmor CHAINMAIL_CHESTPLATE = (ItemArmor) Item.REGISTRY.get("chainmail_chestplate");
+ public static final ItemArmor CHAINMAIL_LEGGINGS = (ItemArmor) Item.REGISTRY.get("chainmail_leggings");
+ public static final ItemArmor CHAINMAIL_BOOTS = (ItemArmor) Item.REGISTRY.get("chainmail_boots");
+ public static final ItemArmor IRON_HELMET = (ItemArmor) Item.REGISTRY.get("iron_helmet");
+ public static final ItemArmor IRON_CHESTPLATE = (ItemArmor) Item.REGISTRY.get("iron_chestplate");
+ public static final ItemArmor IRON_LEGGINGS = (ItemArmor) Item.REGISTRY.get("iron_leggings");
+ public static final ItemArmor IRON_BOOTS = (ItemArmor) Item.REGISTRY.get("iron_boots");
+ public static final ItemArmor DIAMOND_HELMET = (ItemArmor) Item.REGISTRY.get("diamond_helmet");
+ public static final ItemArmor DIAMOND_CHESTPLATE = (ItemArmor) Item.REGISTRY.get("diamond_chestplate");
+ public static final ItemArmor DIAMOND_LEGGINGS = (ItemArmor) Item.REGISTRY.get("diamond_leggings");
+ public static final ItemArmor DIAMOND_BOOTS = (ItemArmor) Item.REGISTRY.get("diamond_boots");
+ public static final ItemArmor GOLD_HELMET = (ItemArmor) Item.REGISTRY.get("golden_helmet");
+ public static final ItemArmor GOLD_CHESTPLATE = (ItemArmor) Item.REGISTRY.get("golden_chestplate");
+ public static final ItemArmor GOLD_LEGGINGS = (ItemArmor) Item.REGISTRY.get("golden_leggings");
+ public static final ItemArmor GOLD_BOOTS = (ItemArmor) Item.REGISTRY.get("golden_boots");
+ public static final Item FLINT = (Item) Item.REGISTRY.get("flint");
+ public static final Item PORK = (Item) Item.REGISTRY.get("porkchop");
+ public static final Item GRILLED_PORK = (Item) Item.REGISTRY.get("cooked_porkchop");
+ public static final Item PAINTING = (Item) Item.REGISTRY.get("painting");
+ public static final Item GOLDEN_APPLE = (Item) Item.REGISTRY.get("golden_apple");
+ public static final Item SIGN = (Item) Item.REGISTRY.get("sign");
+ public static final Item WOOD_DOOR = (Item) Item.REGISTRY.get("wooden_door");
+ public static final Item BUCKET = (Item) Item.REGISTRY.get("bucket");
+ public static final Item WATER_BUCKET = (Item) Item.REGISTRY.get("water_bucket");
+ public static final Item LAVA_BUCKET = (Item) Item.REGISTRY.get("lava_bucket");
+ public static final Item MINECART = (Item) Item.REGISTRY.get("minecart");
+ public static final Item SADDLE = (Item) Item.REGISTRY.get("saddle");
+ public static final Item IRON_DOOR = (Item) Item.REGISTRY.get("iron_door");
+ public static final Item REDSTONE = (Item) Item.REGISTRY.get("redstone");
+ public static final Item SNOW_BALL = (Item) Item.REGISTRY.get("snowball");
+ public static final Item BOAT = (Item) Item.REGISTRY.get("boat");
+ public static final Item LEATHER = (Item) Item.REGISTRY.get("leather");
+ public static final Item MILK_BUCKET = (Item) Item.REGISTRY.get("milk_bucket");
+ public static final Item CLAY_BRICK = (Item) Item.REGISTRY.get("brick");
+ public static final Item CLAY_BALL = (Item) Item.REGISTRY.get("clay_ball");
+ public static final Item SUGAR_CANE = (Item) Item.REGISTRY.get("reeds");
+ public static final Item PAPER = (Item) Item.REGISTRY.get("paper");
+ public static final Item BOOK = (Item) Item.REGISTRY.get("book");
+ public static final Item SLIME_BALL = (Item) Item.REGISTRY.get("slime_ball");
+ public static final Item STORAGE_MINECART = (Item) Item.REGISTRY.get("chest_minecart");
+ public static final Item POWERED_MINECART = (Item) Item.REGISTRY.get("furnace_minecart");
+ public static final Item EGG = (Item) Item.REGISTRY.get("egg");
+ public static final Item COMPASS = (Item) Item.REGISTRY.get("compass");
+ public static final ItemFishingRod FISHING_ROD = (ItemFishingRod) Item.REGISTRY.get("fishing_rod");
+ public static final Item WATCH = (Item) Item.REGISTRY.get("clock");
+ public static final Item GLOWSTONE_DUST = (Item) Item.REGISTRY.get("glowstone_dust");
+ public static final Item RAW_FISH = (Item) Item.REGISTRY.get("fish");
+ public static final Item COOKED_FISH = (Item) Item.REGISTRY.get("cooked_fished");
+ public static final Item INK_SACK = (Item) Item.REGISTRY.get("dye");
+ public static final Item BONE = (Item) Item.REGISTRY.get("bone");
+ public static final Item SUGAR = (Item) Item.REGISTRY.get("sugar");
+ public static final Item CAKE = (Item) Item.REGISTRY.get("cake");
+ public static final Item BED = (Item) Item.REGISTRY.get("bed");
+ public static final Item DIODE = (Item) Item.REGISTRY.get("repeater");
+ public static final Item COOKIE = (Item) Item.REGISTRY.get("cookie");
+ public static final ItemWorldMap MAP = (ItemWorldMap) Item.REGISTRY.get("filled_map");
+ public static final ItemShears SHEARS = (ItemShears) Item.REGISTRY.get("shears");
+ public static final Item MELON = (Item) Item.REGISTRY.get("melon");
+ public static final Item PUMPKIN_SEEDS = (Item) Item.REGISTRY.get("pumpkin_seeds");
+ public static final Item MELON_SEEDS = (Item) Item.REGISTRY.get("melon_seeds");
+ public static final Item RAW_BEEF = (Item) Item.REGISTRY.get("beef");
+ public static final Item COOKED_BEEF = (Item) Item.REGISTRY.get("cooked_beef");
+ public static final Item RAW_CHICKEN = (Item) Item.REGISTRY.get("chicken");
+ public static final Item COOKED_CHICKEN = (Item) Item.REGISTRY.get("cooked_chicken");
+ public static final Item ROTTEN_FLESH = (Item) Item.REGISTRY.get("rotten_flesh");
+ public static final Item ENDER_PEARL = (Item) Item.REGISTRY.get("ender_pearl");
+ public static final Item BLAZE_ROD = (Item) Item.REGISTRY.get("blaze_rod");
+ public static final Item GHAST_TEAR = (Item) Item.REGISTRY.get("ghast_tear");
+ public static final Item GOLD_NUGGET = (Item) Item.REGISTRY.get("gold_nugget");
+ public static final Item NETHER_STALK = (Item) Item.REGISTRY.get("nether_wart");
+ public static final ItemPotion POTION = (ItemPotion) Item.REGISTRY.get("potion");
+ public static final Item GLASS_BOTTLE = (Item) Item.REGISTRY.get("glass_bottle");
+ public static final Item SPIDER_EYE = (Item) Item.REGISTRY.get("spider_eye");
+ public static final Item FERMENTED_SPIDER_EYE = (Item) Item.REGISTRY.get("fermented_spider_eye");
+ public static final Item BLAZE_POWDER = (Item) Item.REGISTRY.get("blaze_powder");
+ public static final Item MAGMA_CREAM = (Item) Item.REGISTRY.get("magma_cream");
+ public static final Item BREWING_STAND = (Item) Item.REGISTRY.get("brewing_stand");
+ public static final Item CAULDRON = (Item) Item.REGISTRY.get("cauldron");
+ public static final Item EYE_OF_ENDER = (Item) Item.REGISTRY.get("ender_eye");
+ public static final Item SPECKLED_MELON = (Item) Item.REGISTRY.get("speckled_melon");
+ public static final Item MONSTER_EGG = (Item) Item.REGISTRY.get("spawn_egg");
+ public static final Item EXP_BOTTLE = (Item) Item.REGISTRY.get("experience_bottle");
+ public static final Item FIREBALL = (Item) Item.REGISTRY.get("fire_charge");
+ public static final Item BOOK_AND_QUILL = (Item) Item.REGISTRY.get("writable_book");
+ public static final Item WRITTEN_BOOK = (Item) Item.REGISTRY.get("written_book");
+ public static final Item EMERALD = (Item) Item.REGISTRY.get("emerald");
+ public static final Item ITEM_FRAME = (Item) Item.REGISTRY.get("item_frame");
+ public static final Item FLOWER_POT = (Item) Item.REGISTRY.get("flower_pot");
+ public static final Item CARROT = (Item) Item.REGISTRY.get("carrot");
+ public static final Item POTATO = (Item) Item.REGISTRY.get("potato");
+ public static final Item POTATO_BAKED = (Item) Item.REGISTRY.get("baked_potato");
+ public static final Item POTATO_POISON = (Item) Item.REGISTRY.get("poisonous_potato");
+ public static final ItemMapEmpty MAP_EMPTY = (ItemMapEmpty) Item.REGISTRY.get("map");
+ public static final Item CARROT_GOLDEN = (Item) Item.REGISTRY.get("golden_carrot");
+ public static final Item SKULL = (Item) Item.REGISTRY.get("skull");
+ public static final Item CARROT_STICK = (Item) Item.REGISTRY.get("carrot_on_a_stick");
+ public static final Item NETHER_STAR = (Item) Item.REGISTRY.get("nether_star");
+ public static final Item PUMPKIN_PIE = (Item) Item.REGISTRY.get("pumpkin_pie");
+ public static final Item FIREWORKS = (Item) Item.REGISTRY.get("fireworks");
+ public static final Item FIREWORKS_CHARGE = (Item) Item.REGISTRY.get("firework_charge");
+ public static final ItemEnchantedBook ENCHANTED_BOOK = (ItemEnchantedBook) Item.REGISTRY.get("enchanted_book");
+ public static final Item REDSTONE_COMPARATOR = (Item) Item.REGISTRY.get("comparator");
+ public static final Item NETHER_BRICK = (Item) Item.REGISTRY.get("netherbrick");
+ public static final Item QUARTZ = (Item) Item.REGISTRY.get("quartz");
+ public static final Item MINECART_TNT = (Item) Item.REGISTRY.get("tnt_minecart");
+ public static final Item MINECART_HOPPER = (Item) Item.REGISTRY.get("hopper_minecart");
+ public static final Item HORSE_ARMOR_IRON = (Item) Item.REGISTRY.get("iron_horse_armor");
+ public static final Item HORSE_ARMOR_GOLD = (Item) Item.REGISTRY.get("golden_horse_armor");
+ public static final Item HORSE_ARMOR_DIAMOND = (Item) Item.REGISTRY.get("diamond_horse_armor");
+ public static final Item LEASH = (Item) Item.REGISTRY.get("lead");
+ public static final Item NAME_TAG = (Item) Item.REGISTRY.get("name_tag");
+ public static final Item MINECART_COMMAND = (Item) Item.REGISTRY.get("command_block_minecart");
+ public static final Item RECORD_1 = (Item) Item.REGISTRY.get("record_13");
+ public static final Item RECORD_2 = (Item) Item.REGISTRY.get("record_cat");
+ public static final Item RECORD_3 = (Item) Item.REGISTRY.get("record_blocks");
+ public static final Item RECORD_4 = (Item) Item.REGISTRY.get("record_chirp");
+ public static final Item RECORD_5 = (Item) Item.REGISTRY.get("record_far");
+ public static final Item RECORD_6 = (Item) Item.REGISTRY.get("record_mall");
+ public static final Item RECORD_7 = (Item) Item.REGISTRY.get("record_mellohi");
+ public static final Item RECORD_8 = (Item) Item.REGISTRY.get("record_stal");
+ public static final Item RECORD_9 = (Item) Item.REGISTRY.get("record_strad");
+ public static final Item RECORD_10 = (Item) Item.REGISTRY.get("record_ward");
+ public static final Item RECORD_11 = (Item) Item.REGISTRY.get("record_11");
+ public static final Item RECORD_12 = (Item) Item.REGISTRY.get("record_wait");
+
+}
diff --git a/src/main/java/net/minecraft/server/RecipesCrafting.java b/src/main/java/net/minecraft/server/RecipesCrafting.java
new file mode 100644
index 0000000..0abda55
--- /dev/null
+++ b/src/main/java/net/minecraft/server/RecipesCrafting.java
@@ -0,0 +1,25 @@
+package net.minecraft.server;
+
+public class RecipesCrafting {
+
+ public RecipesCrafting() {}
+
+ public void a(CraftingManager craftingmanager) {
+ craftingmanager.registerShapedRecipe(new ItemStack(Blocks.CHEST), new Object[] { "###", "# #", "###", Character.valueOf('#'), Blocks.WOOD});
+ craftingmanager.registerShapedRecipe(new ItemStack(Blocks.TRAPPED_CHEST), new Object[] { "#-", Character.valueOf('#'), Blocks.CHEST, Character.valueOf('-'), Blocks.TRIPWIRE_SOURCE});
+ craftingmanager.registerShapedRecipe(new ItemStack(Blocks.ENDER_CHEST), new Object[] { "###", "#E#", "###", Character.valueOf('#'), Blocks.OBSIDIAN, Character.valueOf('E'), Items.EYE_OF_ENDER});
+ craftingmanager.registerShapedRecipe(new ItemStack(Blocks.FURNACE), new Object[] { "###", "# #", "###", Character.valueOf('#'), Blocks.COBBLESTONE});
+ craftingmanager.registerShapedRecipe(new ItemStack(Blocks.WORKBENCH), new Object[] { "##", "##", Character.valueOf('#'), Blocks.WOOD});
+ craftingmanager.registerShapedRecipe(new ItemStack(Blocks.SANDSTONE), new Object[] { "##", "##", Character.valueOf('#'), new ItemStack(Blocks.SAND, 1, 0)});
+ craftingmanager.registerShapedRecipe(new ItemStack(Blocks.SANDSTONE, 4, 2), new Object[] { "##", "##", Character.valueOf('#'), Blocks.SANDSTONE});
+ craftingmanager.registerShapedRecipe(new ItemStack(Blocks.SANDSTONE, 1, 1), new Object[] { "#", "#", Character.valueOf('#'), new ItemStack(Blocks.STEP, 1, 1)});
+ craftingmanager.registerShapedRecipe(new ItemStack(Blocks.QUARTZ_BLOCK, 1, 1), new Object[] { "#", "#", Character.valueOf('#'), new ItemStack(Blocks.STEP, 1, 7)});
+ craftingmanager.registerShapedRecipe(new ItemStack(Blocks.QUARTZ_BLOCK, 2, 2), new Object[] { "#", "#", Character.valueOf('#'), new ItemStack(Blocks.QUARTZ_BLOCK, 1, 0)});
+ craftingmanager.registerShapedRecipe(new ItemStack(Blocks.SMOOTH_BRICK, 4), new Object[] { "##", "##", Character.valueOf('#'), Blocks.STONE});
+ craftingmanager.registerShapedRecipe(new ItemStack(Blocks.IRON_FENCE, 16), new Object[] { "###", "###", Character.valueOf('#'), Items.IRON_INGOT});
+ craftingmanager.registerShapedRecipe(new ItemStack(Blocks.THIN_GLASS, 16), new Object[] { "###", "###", Character.valueOf('#'), Blocks.GLASS});
+ craftingmanager.registerShapedRecipe(new ItemStack(Blocks.REDSTONE_LAMP_OFF, 1), new Object[] { " R ", "RGR", " R ", Character.valueOf('R'), Items.REDSTONE, Character.valueOf('G'), Blocks.GLOWSTONE});
+ craftingmanager.registerShapedRecipe(new ItemStack(Blocks.BEACON, 1), new Object[] { "GGG", "GSG", "OOO", Character.valueOf('G'), Blocks.GLASS, Character.valueOf('S'), Items.NETHER_STAR, Character.valueOf('O'), Blocks.OBSIDIAN});
+ craftingmanager.registerShapedRecipe(new ItemStack(Blocks.NETHER_BRICK, 1), new Object[] { "NN", "NN", Character.valueOf('N'), Items.NETHER_BRICK});
+ }
+}
--
1.9.1

View File

@ -0,0 +1,939 @@
From 8f6c0f5ec64da2c1ac31fc0b2edfd0188185a06e Mon Sep 17 00:00:00 2001
From: Zach Brown <Zbob750@live.com>
Date: Sun, 7 Sep 2014 15:45:58 -0500
Subject: [PATCH] Implement a few 1.8 features
Blocks, items, few odds and ends
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
index 24e84d6..8c50956 100644
--- a/src/main/java/net/minecraft/server/Block.java
+++ b/src/main/java/net/minecraft/server/Block.java
@@ -21,6 +21,7 @@ public class Block {
public static final StepSound n = new StepSound("snow", 1.0F, 1.0F);
public static final StepSound o = new StepSoundLadder("ladder", 1.0F, 1.0F);
public static final StepSound p = new StepSoundAnvil("anvil", 0.3F, 1.0F);
+ public static final StepSound qS = new StepSound("slime", 1.0F, 1.0F); // Slime step sound
protected boolean q;
protected int r;
protected boolean s;
@@ -262,7 +263,7 @@ public class Block {
REGISTRY.a(148, "heavy_weighted_pressure_plate", (new BlockPressurePlateWeighted("iron_block", Material.ORE, 150)).c(0.5F).a(f).c("weightedPlate_heavy"));
REGISTRY.a(149, "unpowered_comparator", (new BlockRedstoneComparator(false)).c(0.0F).a(f).c("comparator").H().d("comparator_off"));
REGISTRY.a(150, "powered_comparator", (new BlockRedstoneComparator(true)).c(0.0F).a(0.625F).a(f).c("comparator").H().d("comparator_on"));
- REGISTRY.a(151, "daylight_detector", (new BlockDaylightDetector()).c(0.2F).a(f).c("daylightDetector").d("daylight_detector"));
+ REGISTRY.a(151, "daylight_detector", (new BlockDaylightDetector(false)).c(0.2F).a(f).c("daylightDetector").d("daylight_detector")); // PaperSpigot add false for day/night sensor
REGISTRY.a(152, "redstone_block", (new BlockRedstone(MaterialMapColor.f)).c(5.0F).b(10.0F).a(j).c("blockRedstone").d("redstone_block"));
REGISTRY.a(153, "quartz_ore", (new BlockOre()).c(3.0F).b(5.0F).a(i).c("netherquartz").d("quartz_ore"));
REGISTRY.a(154, "hopper", (new BlockHopper()).c(3.0F).b(8.0F).a(f).c("hopper").d("hopper"));
@@ -278,12 +279,44 @@ public class Block {
REGISTRY.a(162, "log2", (new BlockLog2()).c("log").d("log"));
REGISTRY.a(163, "acacia_stairs", (new BlockStairs(block1, 4)).c("stairsWoodAcacia"));
REGISTRY.a(164, "dark_oak_stairs", (new BlockStairs(block1, 5)).c("stairsWoodDarkOak"));
+ // PaperSpigot start - Add new 1.8 blocks
+ REGISTRY.a(165, "slime", (new BlockSlime(true)).a(qS));
+ REGISTRY.a(166, "barrier", (new Block(Material.STONE)).s().b(6000000.0F).a(i).c("barrier").H().d("barrier"));
+ REGISTRY.a(167, "iron_trapdoor", (new BlockTrapdoor(Material.ORE).c(5.0F).a(f).c("ironTrapdoor").H().d("ironTrapdoor")));
+ REGISTRY.a(168, "prismarine" , (new BlockPrismarine().c(1.5F).b(10.0F).a(i).c("prismarine")));
+ REGISTRY.a(169, "sea_lantern", (new BlockLightStone(Material.SHATTERABLE).c(0.3F).a(k).a(1.0F).c("sea_lantern")));
+ // PaperSpigot end
REGISTRY.a(170, "hay_block", (new BlockHay()).c(0.5F).a(h).c("hayBlock").a(CreativeModeTab.b).d("hay_block"));
REGISTRY.a(171, "carpet", (new BlockCarpet()).c(0.1F).a(l).c("woolCarpet").g(0));
REGISTRY.a(172, "hardened_clay", (new BlockHardenedClay()).c(1.25F).b(7.0F).a(i).c("clayHardened").d("hardened_clay"));
REGISTRY.a(173, "coal_block", (new Block(Material.STONE)).c(5.0F).b(10.0F).a(i).c("blockCoal").a(CreativeModeTab.b).d("coal_block"));
REGISTRY.a(174, "packed_ice", (new BlockPackedIce()).c(0.5F).a(k).c("icePacked").d("ice_packed"));
REGISTRY.a(175, "double_plant", new BlockTallPlant());
+ // PaperSpigot start - More new 1.8 blocks
+ REGISTRY.a(176, "standing_banner", (new BlockStationary(Material.WOOL)).c(1.0F).a(f).c("banner"));
+ REGISTRY.a(177, "wall_banner", (new BlockStationary(Material.WOOL)).c(1.0F).a(f).c("banner"));
+ REGISTRY.a(178, "daylight_detector_inverted", new BlockDaylightDetector(true));
+ Block block12 = (new BlockSandStone()).a(i).c(0.8F).c("redSandStone");
+ REGISTRY.a(179, "red_sandstone", block12);
+ REGISTRY.a(180, "red_sandstone_stairs", (new BlockStairs(block12, 0).c("stairsRedSandStone")));
+ REGISTRY.a(181, "double_stone_slab2", (new BlockStep(true)).c(2.0F).b(10.0F).a(i).c("stoneSlab2"));
+ REGISTRY.a(182, "stone_slab2", (new BlockStep(false)).c(2.0F).b(10.0F).a(i).c("stoneSlab2"));
+ REGISTRY.a(183, "spruce_fence_gate", new BlockFenceGate().c(2.0F).b(5.0F).a(f).c("spruceFenceGate"));
+ REGISTRY.a(184, "birch_fence_gate", new BlockFenceGate().c(2.0F).b(5.0F).a(f).c("birchFenceGate"));
+ REGISTRY.a(185, "jungle_fence_gate", new BlockFenceGate().c(2.0F).b(5.0F).a(f).c("jungleFenceGate"));
+ REGISTRY.a(186, "dark_oak_fence_gate", new BlockFenceGate().c(2.0F).b(5.0F).a(f).c("darkOakFenceGate"));
+ REGISTRY.a(187, "acacia_fence_gate", new BlockFenceGate().c(2.0F).b(5.0F).a(f).c("acaciaFenceGate"));
+ REGISTRY.a(188, "spruce_fence", (new BlockFence("planks_spruce", Material.WOOD)).c(2.0F).b(5.0F).a(f).c("spruceFence"));
+ REGISTRY.a(189, "birch_fence", (new BlockFence("planks_birch", Material.WOOD)).c(2.0F).b(5.0F).a(f).c("birchFence"));
+ REGISTRY.a(190, "jungle_fence", (new BlockFence("planks_jungle", Material.WOOD)).c(2.0F).b(5.0F).a(f).c("jungleFence"));
+ REGISTRY.a(191, "dark_oak_fence", (new BlockFence("planks_dark_oak", Material.WOOD)).c(2.0F).b(5.0F).a(5).c("darkOakFence"));
+ REGISTRY.a(192, "acacia_fence", (new BlockFence("planks_acacia", Material.WOOD)).c(2.0F).b(5.0F).a(5).c("acaciaFence"));
+ REGISTRY.a(193, "spruce_door", (new BlockDoor(Material.WOOD)).c(3.0F).a(f).c("doorSpruce"));
+ REGISTRY.a(194, "birch_door", (new BlockDoor(Material.WOOD)).c(3.0F).a(f).c("doorBirch"));
+ REGISTRY.a(195, "jungle_door", (new BlockDoor(Material.WOOD)).c(3.0F).a(f).c("doorJungle"));
+ REGISTRY.a(196, "acacia_door", (new BlockDoor(Material.WOOD)).c(3.0F).a(f).c("doorAcacia"));
+ REGISTRY.a(197, "dark_oak_door", (new BlockDoor(Material.WOOD)).c(3.0F).a(f).c("doorDarkOak"));
+ // PaperSpigot end
Iterator iterator = REGISTRY.iterator();
while (iterator.hasNext()) {
diff --git a/src/main/java/net/minecraft/server/BlockDaylightDetector.java b/src/main/java/net/minecraft/server/BlockDaylightDetector.java
index 1298610..9ec14ef 100644
--- a/src/main/java/net/minecraft/server/BlockDaylightDetector.java
+++ b/src/main/java/net/minecraft/server/BlockDaylightDetector.java
@@ -5,11 +5,13 @@ import java.util.Random;
public class BlockDaylightDetector extends BlockContainer {
private IIcon[] a = new IIcon[2];
+ private boolean alternate = false; // PaperSpigot - day/night sensor
- public BlockDaylightDetector() {
+ public BlockDaylightDetector(boolean alternate) { // PaperSpigot - day/night sensor
super(Material.WOOD);
this.a(0.0F, 0.0F, 0.0F, 1.0F, 0.375F, 1.0F);
this.a(CreativeModeTab.d);
+ this.alternate = alternate; // PaperSpigot - day/night sensor
}
public void updateShape(IBlockAccess iblockaccess, int i, int j, int k) {
@@ -31,32 +33,13 @@ public class BlockDaylightDetector extends BlockContainer {
int l = world.getData(i, j, k);
int i1 = world.b(EnumSkyBlock.SKY, i, j, k) - world.j;
float f = world.d(1.0F);
-
- if (f < 3.1415927F) {
- f += (0.0F - f) * 0.2F;
- } else {
- f += (6.2831855F - f) * 0.2F;
- }
-
- // PaperSpigot start - Configurable "inversion" for daylight detectors
- if (world.paperSpigotConfig.invertedDaylightDetectors) {
- i1 = Math.round((float) i1 * MathHelper.cos(f) * -1 + 15);
- if (i1 < 10) {
- i1 = 0;
- }
-
- if (i1 > 9) {
- i1 = 15;
- }
- } else {
- i1 = Math.round((float) i1 * MathHelper.cos(f));
- if (i1 < 0) {
- i1 = 0;
- }
-
- if (i1 > 15) {
- i1 = 15;
- }
+ // PaperSpigot backport 1.8 daylight/night detector logic
+ float f2 = f < 3.1415927F ? 0.0F : 6.2831855F;
+ f += (f2 - f) * 0.2F;
+ i1 = Math.round((float) i1 * thing(f));
+ i1 = anotherThing(i1, 0, 15);
+ if (this.alternate || world.paperSpigotConfig.invertedDaylightDetectors) {
+ i1 = 15 - i1;
}
// PaperSpigot end
@@ -82,4 +65,16 @@ public class BlockDaylightDetector extends BlockContainer {
public TileEntity a(World world, int i) {
return new TileEntityLightDetector();
}
+
+ // PaperSpigot start - Backport necessary helpers
+ private static final float[] b = new float[65536];
+
+ public static float thing(float f) {
+ return b[(int) (f * 10430.378F + 16384.0F) & '\uffff'];
+ }
+
+ public static int anotherThing(int var0, int var1, int var2) {
+ return var0 < var1 ? var1 : (var0 > var2 ? var2 : var0);
+ }
+ // PaperSpigot end
}
diff --git a/src/main/java/net/minecraft/server/BlockDoor.java b/src/main/java/net/minecraft/server/BlockDoor.java
index 9c3ae2e..00052a3 100644
--- a/src/main/java/net/minecraft/server/BlockDoor.java
+++ b/src/main/java/net/minecraft/server/BlockDoor.java
@@ -6,6 +6,9 @@ import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit
public class BlockDoor extends Block {
+ // PaperSpigot start - 1.8 door type compatibility
+ public static final String[] a = new String[] { };
+
protected BlockDoor(Material material) {
super(material);
float f = 0.5F;
@@ -197,7 +200,8 @@ public class BlockDoor extends Block {
}
public Item getDropType(int i, Random random, int j) {
- return (i & 8) != 0 ? null : (this.material == Material.ORE ? Items.IRON_DOOR : Items.WOOD_DOOR);
+ // PaperSpigot - backport 1.8 door drop handling
+ return this == Blocks.IRON_DOOR_BLOCK ? Items.IRON_DOOR : (this == Blocks.SPRUCE_DOOR_BLOCK ? Items.SPRUCE_DOOR : (this == Blocks.BIRCH_DOOR_BLOCK ? Items.BIRCH_DOOR : (this == Blocks.JUNGLE_DOOR_BLOCK ? Items.JUNGLE_DOOR : (this == Blocks.ACACIA_DOOR_BLOCK ? Items.ACACIA_DOOR : (this == Blocks.DARK_OAK_DOOR_BLOCK ? Items.DARK_OAK_DOOR : Items.WOOD_DOOR)))));
}
public MovingObjectPosition a(World world, int i, int j, int k, Vec3D vec3d, Vec3D vec3d1) {
diff --git a/src/main/java/net/minecraft/server/BlockPrismarine.java b/src/main/java/net/minecraft/server/BlockPrismarine.java
new file mode 100644
index 0000000..0a2cd71
--- /dev/null
+++ b/src/main/java/net/minecraft/server/BlockPrismarine.java
@@ -0,0 +1,17 @@
+package net.minecraft.server;
+
+public class BlockPrismarine extends Block {
+
+ // Created by PaperSpigot for compatibility reasons, by no means is this necessarily the actual NMS representation
+
+ public static final String[] a = new String[] { "prismarine", "prismarine_bricks", "dark_prismarine"};
+
+ public BlockPrismarine() {
+ super(Material.STONE);
+ this.a(CreativeModeTab.b);
+ }
+
+ public int getDropData(int i) {
+ return i;
+ }
+}
diff --git a/src/main/java/net/minecraft/server/BlockRedSandStone.java b/src/main/java/net/minecraft/server/BlockRedSandStone.java
new file mode 100644
index 0000000..29284ad
--- /dev/null
+++ b/src/main/java/net/minecraft/server/BlockRedSandStone.java
@@ -0,0 +1,17 @@
+package net.minecraft.server;
+
+public class BlockRedSandStone extends Block {
+
+ // Created by PaperSpigot for compatibility reasons, by no means is this necessarily the actual NMS representation
+
+ public static final String[] a = new String[] { "red_sandstone", "chiseled_red_sandstone", "smooth_red_sandstone"};
+
+ public BlockRedSandStone() {
+ super(Material.STONE);
+ this.a(CreativeModeTab.b);
+ }
+
+ public int getDropData(int i) {
+ return i;
+ }
+}
diff --git a/src/main/java/net/minecraft/server/BlockSlime.java b/src/main/java/net/minecraft/server/BlockSlime.java
new file mode 100644
index 0000000..74cb6e6
--- /dev/null
+++ b/src/main/java/net/minecraft/server/BlockSlime.java
@@ -0,0 +1,11 @@
+package net.minecraft.server;
+
+public class BlockSlime extends BlockHalfTransparent {
+
+ // Created by PaperSpigot for compatibility reasons, by no means is this necessarily the actual NMS representation
+
+ public BlockSlime(boolean flag) {
+ super("slime", Material.SHATTERABLE, flag);
+ this.a(CreativeModeTab.b);
+ }
+}
diff --git a/src/main/java/net/minecraft/server/BlockStone.java b/src/main/java/net/minecraft/server/BlockStone.java
index 33be3e3..65d625d 100644
--- a/src/main/java/net/minecraft/server/BlockStone.java
+++ b/src/main/java/net/minecraft/server/BlockStone.java
@@ -4,11 +4,20 @@ import java.util.Random;
public class BlockStone extends Block {
+ // PaperSpigot - Add 1.8 block variants
+ public static final String[] a = new String[] { "default", "granite", "polished_granite", "diorite", "polished_diorite", "andesite", "polished_andesite" };
+
public BlockStone() {
super(Material.STONE);
this.a(CreativeModeTab.b);
}
+ // PaperSpigot start - Add 1.8 block variants
+ public int getDropData(int i) {
+ return i;
+ }
+ // PaperSpigot end
+
public Item getDropType(int i, Random random, int j) {
return Item.getItemOf(Blocks.COBBLESTONE);
}
diff --git a/src/main/java/net/minecraft/server/Blocks.java b/src/main/java/net/minecraft/server/Blocks.java
index c36e7fb..c03745a 100644
--- a/src/main/java/net/minecraft/server/Blocks.java
+++ b/src/main/java/net/minecraft/server/Blocks.java
@@ -173,5 +173,25 @@ public class Blocks {
public static final BlockTallPlant DOUBLE_PLANT = (BlockTallPlant) Block.REGISTRY.get("double_plant");
public static final BlockStainedGlass STAINED_GLASS = (BlockStainedGlass) Block.REGISTRY.get("stained_glass");
public static final BlockStainedGlassPane STAINED_GLASS_PANE = (BlockStainedGlassPane) Block.REGISTRY.get("stained_glass_pane");
+ // PaperSpigot start - Add 1.8 blocks
+ public static final BlockPrismarine PRISMARINE = (BlockPrismarine) Block.REGISTRY.get("prismarine");
+ public static final Block RED_SANDSTONE = (Block) Block.REGISTRY.get("red_sandstone");
+ public static final Block SPRUCE_DOOR_BLOCK = (Block) Block.REGISTRY.get("spruce_door");
+ public static final Block BIRCH_DOOR_BLOCK = (Block) Block.REGISTRY.get("birch_door");
+ public static final Block JUNGLE_DOOR_BLOCK = (Block) Block.REGISTRY.get("jungle_door");
+ public static final Block ACACIA_DOOR_BLOCK = (Block) Block.REGISTRY.get("acacia_door");
+ public static final Block DARK_OAK_DOOR_BLOCK = (Block) Block.REGISTRY.get("dark_oak_door");
+ public static final Block SLIME = (Block) Block.REGISTRY.get("slime");
+ public static final Block SPRUCE_FENCE = (Block) Block.REGISTRY.get("spruce_fence");
+ public static final Block BIRCH_FENCE = (Block) Block.REGISTRY.get("birch_fence");
+ public static final Block JUNGLE_FENCE = (Block) Block.REGISTRY.get("jungle_fence");
+ public static final Block DARK_OAK_FENCE = (Block) Block.REGISTRY.get("dark_oak_fence");
+ public static final Block ACACIA_FENCE = (Block) Block.REGISTRY.get("acacia_fence");
+ public static final Block SPRUCE_FENCE_GATE = (Block) Block.REGISTRY.get("spruce_fence_gate");
+ public static final Block BIRCH_FENCE_GATE = (Block) Block.REGISTRY.get("birch_fence_gate");
+ public static final Block JUNGLE_FENCE_GATE = (Block) Block.REGISTRY.get("jungle_fence_gate");
+ public static final Block DARK_OAK_FENCE_GATE = (Block) Block.REGISTRY.get("dark_oak_fence_gate");
+ public static final Block ACACIA_FENCE_GATE = (Block) Block.REGISTRY.get("acacia_fence_gate");
+ // PaperSpigot end
}
diff --git a/src/main/java/net/minecraft/server/CraftingManager.java b/src/main/java/net/minecraft/server/CraftingManager.java
index e2fbdc4..7b9acf2 100644
--- a/src/main/java/net/minecraft/server/CraftingManager.java
+++ b/src/main/java/net/minecraft/server/CraftingManager.java
@@ -37,11 +37,11 @@ public class CraftingManager {
this.registerShapedRecipe(new ItemStack(Items.PAPER, 3), new Object[] { "###", Character.valueOf('#'), Items.SUGAR_CANE});
this.registerShapelessRecipe(new ItemStack(Items.BOOK, 1), new Object[] { Items.PAPER, Items.PAPER, Items.PAPER, Items.LEATHER});
this.registerShapelessRecipe(new ItemStack(Items.BOOK_AND_QUILL, 1), new Object[] { Items.BOOK, new ItemStack(Items.INK_SACK, 1, 0), Items.FEATHER});
- this.registerShapedRecipe(new ItemStack(Blocks.FENCE, 2), new Object[] { "###", "###", Character.valueOf('#'), Items.STICK});
+ this.registerShapedRecipe(new ItemStack(Blocks.FENCE, 3), new Object[] { "#S#", "#S#", Character.valueOf('#'), new ItemStack(Blocks.WOOD, 1, 0), Character.valueOf('S'), Items.STICK }); // PaperSpigot - Use 1.8 recipe
this.registerShapedRecipe(new ItemStack(Blocks.COBBLE_WALL, 6, 0), new Object[] { "###", "###", Character.valueOf('#'), Blocks.COBBLESTONE});
this.registerShapedRecipe(new ItemStack(Blocks.COBBLE_WALL, 6, 1), new Object[] { "###", "###", Character.valueOf('#'), Blocks.MOSSY_COBBLESTONE});
this.registerShapedRecipe(new ItemStack(Blocks.NETHER_FENCE, 6), new Object[] { "###", "###", Character.valueOf('#'), Blocks.NETHER_BRICK});
- this.registerShapedRecipe(new ItemStack(Blocks.FENCE_GATE, 1), new Object[] { "#W#", "#W#", Character.valueOf('#'), Items.STICK, Character.valueOf('W'), Blocks.WOOD});
+ this.registerShapedRecipe(new ItemStack(Blocks.FENCE_GATE, 1), new Object[] { "#W#", "#W#", Character.valueOf('#'), Items.STICK, Character.valueOf('W'), new ItemStack(Blocks.WOOD, 1, 0)}); // PaperSpigot - Add explicit data value
this.registerShapedRecipe(new ItemStack(Blocks.JUKEBOX, 1), new Object[] { "###", "#X#", "###", Character.valueOf('#'), Blocks.WOOD, Character.valueOf('X'), Items.DIAMOND});
this.registerShapedRecipe(new ItemStack(Items.LEASH, 2), new Object[] { "~~ ", "~O ", " ~", Character.valueOf('~'), Items.STRING, Character.valueOf('O'), Items.SLIME_BALL});
this.registerShapedRecipe(new ItemStack(Blocks.NOTE_BLOCK, 1), new Object[] { "###", "#X#", "###", Character.valueOf('#'), Blocks.WOOD, Character.valueOf('X'), Items.REDSTONE});
@@ -55,7 +55,7 @@ public class CraftingManager {
this.registerShapedRecipe(new ItemStack(Blocks.WOOL, 1), new Object[] { "##", "##", Character.valueOf('#'), Items.STRING});
this.registerShapedRecipe(new ItemStack(Blocks.TNT, 1), new Object[] { "X#X", "#X#", "X#X", Character.valueOf('X'), Items.SULPHUR, Character.valueOf('#'), Blocks.SAND});
this.registerShapedRecipe(new ItemStack(Blocks.STEP, 6, 3), new Object[] { "###", Character.valueOf('#'), Blocks.COBBLESTONE});
- this.registerShapedRecipe(new ItemStack(Blocks.STEP, 6, 0), new Object[] { "###", Character.valueOf('#'), Blocks.STONE});
+ this.registerShapedRecipe(new ItemStack(Blocks.STEP, 6, 0), new Object[] { "###", Character.valueOf('#'), new ItemStack(Blocks.STONE, 1, 0)}); // PaperSpigot - Explicit data value
this.registerShapedRecipe(new ItemStack(Blocks.STEP, 6, 1), new Object[] { "###", Character.valueOf('#'), Blocks.SANDSTONE});
this.registerShapedRecipe(new ItemStack(Blocks.STEP, 6, 4), new Object[] { "###", Character.valueOf('#'), Blocks.BRICK});
this.registerShapedRecipe(new ItemStack(Blocks.STEP, 6, 5), new Object[] { "###", Character.valueOf('#'), Blocks.SMOOTH_BRICK});
@@ -68,7 +68,7 @@ public class CraftingManager {
this.registerShapedRecipe(new ItemStack(Blocks.WOOD_STEP, 6, 4), new Object[] { "###", Character.valueOf('#'), new ItemStack(Blocks.WOOD, 1, 4)});
this.registerShapedRecipe(new ItemStack(Blocks.WOOD_STEP, 6, 5), new Object[] { "###", Character.valueOf('#'), new ItemStack(Blocks.WOOD, 1, 5)});
this.registerShapedRecipe(new ItemStack(Blocks.LADDER, 3), new Object[] { "# #", "###", "# #", Character.valueOf('#'), Items.STICK});
- this.registerShapedRecipe(new ItemStack(Items.WOOD_DOOR, 1), new Object[] { "##", "##", "##", Character.valueOf('#'), Blocks.WOOD});
+ this.registerShapedRecipe(new ItemStack(Items.WOOD_DOOR, 3), new Object[] { "##", "##", "##", Character.valueOf('#'), new ItemStack(Blocks.WOOD, 1, 0) }); // PaperSpigot - Add explicit data value and bump to 3
this.registerShapedRecipe(new ItemStack(Blocks.TRAP_DOOR, 2), new Object[] { "###", "###", Character.valueOf('#'), Blocks.WOOD});
this.registerShapedRecipe(new ItemStack(Items.IRON_DOOR, 1), new Object[] { "##", "##", "##", Character.valueOf('#'), Items.IRON_INGOT});
this.registerShapedRecipe(new ItemStack(Items.SIGN, 3), new Object[] { "###", "###", " X ", Character.valueOf('#'), Blocks.WOOD, Character.valueOf('X'), Items.STICK});
@@ -125,14 +125,14 @@ public class CraftingManager {
this.registerShapedRecipe(new ItemStack(Blocks.LEVER, 1), new Object[] { "X", "#", Character.valueOf('#'), Blocks.COBBLESTONE, Character.valueOf('X'), Items.STICK});
this.registerShapedRecipe(new ItemStack(Blocks.TRIPWIRE_SOURCE, 2), new Object[] { "I", "S", "#", Character.valueOf('#'), Blocks.WOOD, Character.valueOf('S'), Items.STICK, Character.valueOf('I'), Items.IRON_INGOT});
this.registerShapedRecipe(new ItemStack(Blocks.REDSTONE_TORCH_ON, 1), new Object[] { "X", "#", Character.valueOf('#'), Items.STICK, Character.valueOf('X'), Items.REDSTONE});
- this.registerShapedRecipe(new ItemStack(Items.DIODE, 1), new Object[] { "#X#", "III", Character.valueOf('#'), Blocks.REDSTONE_TORCH_ON, Character.valueOf('X'), Items.REDSTONE, Character.valueOf('I'), Blocks.STONE});
+ this.registerShapedRecipe(new ItemStack(Items.DIODE, 1), new Object[] { "#X#", "III", Character.valueOf('#'), Blocks.REDSTONE_TORCH_ON, Character.valueOf('X'), Items.REDSTONE, Character.valueOf('I'), new ItemStack(Blocks.STONE, 1, 0)}); // PaperSpigot - Explicit data value
this.registerShapedRecipe(new ItemStack(Items.REDSTONE_COMPARATOR, 1), new Object[] { " # ", "#X#", "III", Character.valueOf('#'), Blocks.REDSTONE_TORCH_ON, Character.valueOf('X'), Items.QUARTZ, Character.valueOf('I'), Blocks.STONE});
this.registerShapedRecipe(new ItemStack(Items.WATCH, 1), new Object[] { " # ", "#X#", " # ", Character.valueOf('#'), Items.GOLD_INGOT, Character.valueOf('X'), Items.REDSTONE});
this.registerShapedRecipe(new ItemStack(Items.COMPASS, 1), new Object[] { " # ", "#X#", " # ", Character.valueOf('#'), Items.IRON_INGOT, Character.valueOf('X'), Items.REDSTONE});
this.registerShapedRecipe(new ItemStack(Items.MAP_EMPTY, 1), new Object[] { "###", "#X#", "###", Character.valueOf('#'), Items.PAPER, Character.valueOf('X'), Items.COMPASS});
- this.registerShapedRecipe(new ItemStack(Blocks.STONE_BUTTON, 1), new Object[] { "#", Character.valueOf('#'), Blocks.STONE});
+ this.registerShapedRecipe(new ItemStack(Blocks.STONE_BUTTON, 1), new Object[] { "#", Character.valueOf('#'), new ItemStack(Blocks.STONE, 1, 0)}); // PaperSpigot - Explicit data value
this.registerShapedRecipe(new ItemStack(Blocks.WOOD_BUTTON, 1), new Object[] { "#", Character.valueOf('#'), Blocks.WOOD});
- this.registerShapedRecipe(new ItemStack(Blocks.STONE_PLATE, 1), new Object[] { "##", Character.valueOf('#'), Blocks.STONE});
+ this.registerShapedRecipe(new ItemStack(Blocks.STONE_PLATE, 1), new Object[] { "##", Character.valueOf('#'), new ItemStack(Blocks.STONE, 1, 0)}); // PaperSpigot - Explicit data value
this.registerShapedRecipe(new ItemStack(Blocks.WOOD_PLATE, 1), new Object[] { "##", Character.valueOf('#'), Blocks.WOOD});
this.registerShapedRecipe(new ItemStack(Blocks.IRON_PLATE, 1), new Object[] { "##", Character.valueOf('#'), Items.IRON_INGOT});
this.registerShapedRecipe(new ItemStack(Blocks.GOLD_PLATE, 1), new Object[] { "##", Character.valueOf('#'), Items.GOLD_INGOT});
@@ -152,6 +152,30 @@ public class CraftingManager {
this.registerShapelessRecipe(new ItemStack(Blocks.MOSSY_COBBLESTONE), new Object[] { Blocks.VINE, Blocks.COBBLESTONE});
this.registerShapelessRecipe(new ItemStack(Blocks.SMOOTH_BRICK, 1, 1), new Object[] { Blocks.VINE, Blocks.SMOOTH_BRICK});
this.registerShapelessRecipe(new ItemStack(Blocks.SMOOTH_BRICK, 1, 3), new Object[] { new ItemStack(Blocks.STEP, 1, 5), new ItemStack(Blocks.STEP, 1, 5)});
+ // Register 1.8 stone variant recipes
+ this.registerShapelessRecipe(new ItemStack(Blocks.STONE, 1, 1), new Object[] { new ItemStack(Blocks.STONE, 1, 3), Items.QUARTZ }); // Granite
+ this.registerShapedRecipe(new ItemStack(Blocks.STONE, 4, 2), new Object[] { "##", "##", Character.valueOf('#'), new ItemStack(Blocks.STONE, 1, 1) }); // Polished Granite
+ this.registerShapedRecipe(new ItemStack(Blocks.STONE, 2, 3), new Object[] { "CQ", "QC", Character.valueOf('C'), Blocks.COBBLESTONE, Character.valueOf('Q'), Items.QUARTZ }); // Diorite
+ this.registerShapedRecipe(new ItemStack(Blocks.STONE, 4, 4), new Object[] { "##", "##", Character.valueOf('#'), new ItemStack(Blocks.STONE, 1, 3) }); // Polished Diorite
+ this.registerShapelessRecipe(new ItemStack(Blocks.STONE, 2, 5), new Object[] { new ItemStack(Blocks.STONE, 1, 3), Blocks.COBBLESTONE }); // Andesite
+ this.registerShapedRecipe(new ItemStack(Blocks.STONE, 4, 6), new Object[] { "##", "##", Character.valueOf('#'), new ItemStack(Blocks.STONE, 1, 5) }); // Polished Andesite
+ this.registerShapedRecipe(new ItemStack(Blocks.SLIME), new Object[] { "###", "###", "###", Character.valueOf('#'), Items.SLIME_BALL }); // Slime Ball -> Slime Block
+ this.registerShapedRecipe(new ItemStack(Items.SLIME_BALL, 9), new Object[] { "#", Character.valueOf('#'), new ItemStack(Blocks.SLIME, 1) }); // Slime Block -> Slime Ball
+ this.registerShapedRecipe(new ItemStack(Blocks.SPRUCE_FENCE, 3), new Object[] { "#S#", "#S#", Character.valueOf('#'), new ItemStack(Blocks.WOOD, 1, 1), Character.valueOf('S'), Items.STICK }); // Spruce fence
+ this.registerShapedRecipe(new ItemStack(Blocks.BIRCH_FENCE, 3), new Object[] { "#S#", "#S#", Character.valueOf('#'), new ItemStack(Blocks.WOOD, 1, 2), Character.valueOf('S'), Items.STICK }); // Birch fence
+ this.registerShapedRecipe(new ItemStack(Blocks.JUNGLE_FENCE, 3), new Object[] { "#S#", "#S#", Character.valueOf('#'), new ItemStack(Blocks.WOOD, 1, 3), Character.valueOf('S'), Items.STICK }); // Jungle fence
+ this.registerShapedRecipe(new ItemStack(Blocks.ACACIA_FENCE, 3), new Object[] { "#S#", "#S#", Character.valueOf('#'), new ItemStack(Blocks.WOOD, 1, 4), Character.valueOf('S'), Items.STICK }); // Acacia fence
+ this.registerShapedRecipe(new ItemStack(Blocks.DARK_OAK_FENCE, 3), new Object[] { "#S#", "#S#", Character.valueOf('#'), new ItemStack(Blocks.WOOD, 1, 5), Character.valueOf('S'), Items.STICK }); // Dark Oak fence
+ this.registerShapedRecipe(new ItemStack(Blocks.SPRUCE_FENCE_GATE, 1), new Object[] { "#W#", "#W#", Character.valueOf('#'), Items.STICK, Character.valueOf('W'), new ItemStack(Blocks.WOOD, 1, 1) }); // Spruce fence gate
+ this.registerShapedRecipe(new ItemStack(Blocks.BIRCH_FENCE_GATE, 1), new Object[] { "#W#", "#W#", Character.valueOf('#'), Items.STICK, Character.valueOf('W'), new ItemStack(Blocks.WOOD, 1, 2) }); // Birch fence gate
+ this.registerShapedRecipe(new ItemStack(Blocks.JUNGLE_FENCE_GATE, 1), new Object[] { "#W#", "#W#", Character.valueOf('#'), Items.STICK, Character.valueOf('W'), new ItemStack(Blocks.WOOD, 1, 3) }); // Jungle fence gate
+ this.registerShapedRecipe(new ItemStack(Blocks.ACACIA_FENCE_GATE, 1), new Object[] { "#W#", "#W#", Character.valueOf('#'), Items.STICK, Character.valueOf('W'), new ItemStack(Blocks.WOOD, 1, 4) }); // Acacia fence gate
+ this.registerShapedRecipe(new ItemStack(Blocks.DARK_OAK_FENCE_GATE, 1), new Object[] { "#W#", "#W#", Character.valueOf('#'), Items.STICK, Character.valueOf('W'), new ItemStack(Blocks.WOOD, 1, 5) }); // Dark Oak fence gate
+ this.registerShapedRecipe(new ItemStack(Items.SPRUCE_DOOR, 3), new Object[] { "##", "##", "##", Character.valueOf('#'), new ItemStack(Blocks.WOOD, 1, 1) }); // Spruce door
+ this.registerShapedRecipe(new ItemStack(Items.BIRCH_DOOR, 3), new Object[] { "##", "##", "##", Character.valueOf('#'), new ItemStack(Blocks.WOOD, 1, 2) }); // Birch door
+ this.registerShapedRecipe(new ItemStack(Items.JUNGLE_DOOR, 3), new Object[] { "##", "##", "##", Character.valueOf('#'), new ItemStack(Blocks.WOOD, 1, 3) }); // Jungle door
+ this.registerShapedRecipe(new ItemStack(Items.ACACIA_DOOR, 3), new Object[] { "##", "##", "##", Character.valueOf('#'), new ItemStack(Blocks.WOOD, 1, 4) }); // Acacia door
+ this.registerShapedRecipe(new ItemStack(Items.DARK_OAK_DOOR, 3), new Object[] { "##", "##", "##", Character.valueOf('#'), new ItemStack(Blocks.WOOD, 1, 5) }); // Dark Oak door
// PaperSpigot end
// Collections.sort(this.recipes, new RecipeSorter(this)); // CraftBukkit - moved below
this.sort(); // CraftBukkit - call new sort method
diff --git a/src/main/java/net/minecraft/server/EntitySheep.java b/src/main/java/net/minecraft/server/EntitySheep.java
index 381ae78..e72e4e1 100644
--- a/src/main/java/net/minecraft/server/EntitySheep.java
+++ b/src/main/java/net/minecraft/server/EntitySheep.java
@@ -64,6 +64,18 @@ public class EntitySheep extends EntityAnimal {
if (!this.isSheared()) {
this.a(new ItemStack(Item.getItemOf(Blocks.WOOL), 1, this.getColor()), 0.0F);
}
+
+ // PaperSpigot start - 1.8 mutton drops!
+ int j = this.random.nextInt(2) + 1 + this.random.nextInt(1 + i);
+
+ for (int k = 0; k < j; ++k) {
+ if (this.isBurning()) {
+ this.a(Items.COOKED_MUTTON, 1);
+ } else {
+ this.a(Items.MUTTON, 1);
+ }
+ }
+ // PaperSpigot end
}
protected Item getLoot() {
diff --git a/src/main/java/net/minecraft/server/Item.java b/src/main/java/net/minecraft/server/Item.java
index 4382f1a..7493e42 100644
--- a/src/main/java/net/minecraft/server/Item.java
+++ b/src/main/java/net/minecraft/server/Item.java
@@ -200,6 +200,16 @@ public class Item {
REGISTRY.a(420, "lead", (new ItemLeash()).c("leash").f("lead"));
REGISTRY.a(421, "name_tag", (new ItemNameTag()).c("nameTag").f("name_tag"));
REGISTRY.a(422, "command_block_minecart", (new ItemMinecart(6)).c("minecartCommandBlock").f("minecart_command_block").a((CreativeModeTab) null));
+ // PaperSpigot start - Add new item types
+ REGISTRY.a(423, "mutton", (new ItemFood(2, 0.3F, true)).c("muttonRaw"));
+ REGISTRY.a(424, "cooked_mutton", (new ItemFood(6, 0.8F, true)).c("muttonCooked"));
+ //REGISTRY.a(425, "banner", (); // TODO: Needs backporting - wait for deobf
+ REGISTRY.a(427, "spruce_door", (new ItemDoorSpruce(Material.WOOD)).c("doorSpruce").f("spruce_door"));
+ REGISTRY.a(428, "birch_door", (new ItemDoorBirch(Material.WOOD)).c("doorBirch").f("birch_door"));
+ REGISTRY.a(429, "jungle_door", (new ItemDoorJungle(Material.WOOD)).c("doorJungle").f("jungle_door"));
+ REGISTRY.a(430, "acacia_door", (new ItemDoorAcacia(Material.WOOD)).c("doorAcacia").f("acacia_door"));
+ REGISTRY.a(431, "dark_oak_door", (new ItemDoorDarkOak(Material.WOOD)).c("doorDarkOak").f("dark_oak_door"));
+ // PaperSpigot end
REGISTRY.a(2256, "record_13", (new ItemRecord("13")).c("record").f("record_13"));
REGISTRY.a(2257, "record_cat", (new ItemRecord("cat")).c("record").f("record_cat"));
REGISTRY.a(2258, "record_blocks", (new ItemRecord("blocks")).c("record").f("record_blocks"));
@@ -212,7 +222,8 @@ public class Item {
REGISTRY.a(2265, "record_ward", (new ItemRecord("ward")).c("record").f("record_ward"));
REGISTRY.a(2266, "record_11", (new ItemRecord("11")).c("record").f("record_11"));
REGISTRY.a(2267, "record_wait", (new ItemRecord("wait")).c("record").f("record_wait"));
- HashSet hashset = Sets.newHashSet(new Block[] { Blocks.AIR, Blocks.BREWING_STAND, Blocks.BED, Blocks.NETHER_WART, Blocks.CAULDRON, Blocks.FLOWER_POT, Blocks.CROPS, Blocks.SUGAR_CANE_BLOCK, Blocks.CAKE_BLOCK, Blocks.SKULL, Blocks.PISTON_EXTENSION, Blocks.PISTON_MOVING, Blocks.GLOWING_REDSTONE_ORE, Blocks.DIODE_ON, Blocks.PUMPKIN_STEM, Blocks.SIGN_POST, Blocks.REDSTONE_COMPARATOR_ON, Blocks.TRIPWIRE, Blocks.REDSTONE_LAMP_ON, Blocks.MELON_STEM, Blocks.REDSTONE_TORCH_OFF, Blocks.REDSTONE_COMPARATOR_OFF, Blocks.REDSTONE_WIRE, Blocks.WALL_SIGN, Blocks.DIODE_OFF, Blocks.IRON_DOOR_BLOCK, Blocks.WOODEN_DOOR});
+ // PaperSpigot - Add new doors
+ HashSet hashset = Sets.newHashSet(new Block[] { Blocks.AIR, Blocks.BREWING_STAND, Blocks.BED, Blocks.NETHER_WART, Blocks.CAULDRON, Blocks.FLOWER_POT, Blocks.CROPS, Blocks.SUGAR_CANE_BLOCK, Blocks.CAKE_BLOCK, Blocks.SKULL, Blocks.PISTON_EXTENSION, Blocks.PISTON_MOVING, Blocks.GLOWING_REDSTONE_ORE, Blocks.DIODE_ON, Blocks.PUMPKIN_STEM, Blocks.SIGN_POST, Blocks.REDSTONE_COMPARATOR_ON, Blocks.TRIPWIRE, Blocks.REDSTONE_LAMP_ON, Blocks.MELON_STEM, Blocks.REDSTONE_TORCH_OFF, Blocks.REDSTONE_COMPARATOR_OFF, Blocks.REDSTONE_WIRE, Blocks.WALL_SIGN, Blocks.DIODE_OFF, Blocks.IRON_DOOR_BLOCK, Blocks.WOODEN_DOOR, Blocks.SPRUCE_DOOR_BLOCK, Blocks.BIRCH_DOOR_BLOCK, Blocks.ACACIA_DOOR_BLOCK, Blocks.DARK_OAK_DOOR_BLOCK});
Iterator iterator = Block.REGISTRY.keySet().iterator();
while (iterator.hasNext()) {
@@ -288,6 +299,13 @@ public class Item {
} else if (block == Blocks.MOB_SPAWNER || block == Blocks.BIG_MUSHROOM_1 || block == Blocks.BIG_MUSHROOM_2) {
object = new ItemWithAuxData(block, true);
// CraftBukkit end
+ // PaperSpigot start - Stone and Prismarine variants
+ } else if (block == Blocks.STONE) {
+ object = (new ItemMultiTexture(Blocks.STONE, Blocks.STONE, BlockStone.a)).b("stone");
+ } else if (block == Blocks.PRISMARINE) {
+ object = (new ItemMultiTexture(Blocks.PRISMARINE, Blocks.PRISMARINE, BlockPrismarine.a)).b("prismarine");
+ } else if (block == Blocks.RED_SANDSTONE) {
+ object = (new ItemMultiTexture(Blocks.RED_SANDSTONE, Blocks.RED_SANDSTONE, BlockRedSandStone.a)).b("red_sandstone");
} else {
if (hashset.contains(block)) {
continue;
diff --git a/src/main/java/net/minecraft/server/ItemDoor.java b/src/main/java/net/minecraft/server/ItemDoor.java
index ee8568b..0875b76 100644
--- a/src/main/java/net/minecraft/server/ItemDoor.java
+++ b/src/main/java/net/minecraft/server/ItemDoor.java
@@ -6,7 +6,7 @@ public class ItemDoor extends Item {
public ItemDoor(Material material) {
this.a = material;
- this.maxStackSize = 1;
+ this.maxStackSize = 64; // PaperSpigot - Bump to 1.8 max stack size
this.a(CreativeModeTab.d);
}
diff --git a/src/main/java/net/minecraft/server/ItemDoorAcacia.java b/src/main/java/net/minecraft/server/ItemDoorAcacia.java
new file mode 100644
index 0000000..b9c7ec8
--- /dev/null
+++ b/src/main/java/net/minecraft/server/ItemDoorAcacia.java
@@ -0,0 +1,81 @@
+package net.minecraft.server;
+
+public class ItemDoorAcacia extends Item {
+
+ // PaperSpigot - Added for compatibility reasons
+
+ private Material a;
+
+ public ItemDoorAcacia(Material material) {
+ this.a = material;
+ this.maxStackSize = 64; // PaperSpigot - Bump to 1.8 max stack size
+ this.a(CreativeModeTab.d);
+ }
+
+ public boolean interactWith(ItemStack itemstack, EntityHuman entityhuman, World world, int i, int j, int k, int l, float f, float f1, float f2) {
+ if (l != 1) {
+ return false;
+ } else {
+ ++j;
+ Block block;
+
+ if (this.a == Material.WOOD) {
+ block = Blocks.ACACIA_DOOR_BLOCK;
+ } else {
+ block = Blocks.IRON_DOOR_BLOCK;
+ }
+
+ if (entityhuman.a(i, j, k, l, itemstack) && entityhuman.a(i, j + 1, k, l, itemstack)) {
+ if (!block.canPlace(world, i, j, k)) {
+ return false;
+ } else {
+ int i1 = MathHelper.floor((double) ((entityhuman.yaw + 180.0F) * 4.0F / 360.0F) - 0.5D) & 3;
+
+ place(world, i, j, k, i1, block);
+ --itemstack.count;
+ return true;
+ }
+ } else {
+ return false;
+ }
+ }
+ }
+
+ public static void place(World world, int i, int j, int k, int l, Block block) {
+ byte b0 = 0;
+ byte b1 = 0;
+
+ if (l == 0) {
+ b1 = 1;
+ }
+
+ if (l == 1) {
+ b0 = -1;
+ }
+
+ if (l == 2) {
+ b1 = -1;
+ }
+
+ if (l == 3) {
+ b0 = 1;
+ }
+
+ int i1 = (world.getType(i - b0, j, k - b1).r() ? 1 : 0) + (world.getType(i - b0, j + 1, k - b1).r() ? 1 : 0);
+ int j1 = (world.getType(i + b0, j, k + b1).r() ? 1 : 0) + (world.getType(i + b0, j + 1, k + b1).r() ? 1 : 0);
+ boolean flag = world.getType(i - b0, j, k - b1) == block || world.getType(i - b0, j + 1, k - b1) == block;
+ boolean flag1 = world.getType(i + b0, j, k + b1) == block || world.getType(i + b0, j + 1, k + b1) == block;
+ boolean flag2 = false;
+
+ if (flag && !flag1) {
+ flag2 = true;
+ } else if (j1 > i1) {
+ flag2 = true;
+ }
+
+ world.setTypeAndData(i, j, k, block, l, 2);
+ world.setTypeAndData(i, j + 1, k, block, 8 | (flag2 ? 1 : 0), 2);
+ world.applyPhysics(i, j, k, block);
+ world.applyPhysics(i, j + 1, k, block);
+ }
+}
diff --git a/src/main/java/net/minecraft/server/ItemDoorBirch.java b/src/main/java/net/minecraft/server/ItemDoorBirch.java
new file mode 100644
index 0000000..69e8590
--- /dev/null
+++ b/src/main/java/net/minecraft/server/ItemDoorBirch.java
@@ -0,0 +1,81 @@
+package net.minecraft.server;
+
+public class ItemDoorBirch extends Item {
+
+ // PaperSpigot - Added for compatibility reasons
+
+ private Material a;
+
+ public ItemDoorBirch(Material material) {
+ this.a = material;
+ this.maxStackSize = 64; // PaperSpigot - Bump to 1.8 max stack size
+ this.a(CreativeModeTab.d);
+ }
+
+ public boolean interactWith(ItemStack itemstack, EntityHuman entityhuman, World world, int i, int j, int k, int l, float f, float f1, float f2) {
+ if (l != 1) {
+ return false;
+ } else {
+ ++j;
+ Block block;
+
+ if (this.a == Material.WOOD) {
+ block = Blocks.BIRCH_DOOR_BLOCK;
+ } else {
+ block = Blocks.IRON_DOOR_BLOCK;
+ }
+
+ if (entityhuman.a(i, j, k, l, itemstack) && entityhuman.a(i, j + 1, k, l, itemstack)) {
+ if (!block.canPlace(world, i, j, k)) {
+ return false;
+ } else {
+ int i1 = MathHelper.floor((double) ((entityhuman.yaw + 180.0F) * 4.0F / 360.0F) - 0.5D) & 3;
+
+ place(world, i, j, k, i1, block);
+ --itemstack.count;
+ return true;
+ }
+ } else {
+ return false;
+ }
+ }
+ }
+
+ public static void place(World world, int i, int j, int k, int l, Block block) {
+ byte b0 = 0;
+ byte b1 = 0;
+
+ if (l == 0) {
+ b1 = 1;
+ }
+
+ if (l == 1) {
+ b0 = -1;
+ }
+
+ if (l == 2) {
+ b1 = -1;
+ }
+
+ if (l == 3) {
+ b0 = 1;
+ }
+
+ int i1 = (world.getType(i - b0, j, k - b1).r() ? 1 : 0) + (world.getType(i - b0, j + 1, k - b1).r() ? 1 : 0);
+ int j1 = (world.getType(i + b0, j, k + b1).r() ? 1 : 0) + (world.getType(i + b0, j + 1, k + b1).r() ? 1 : 0);
+ boolean flag = world.getType(i - b0, j, k - b1) == block || world.getType(i - b0, j + 1, k - b1) == block;
+ boolean flag1 = world.getType(i + b0, j, k + b1) == block || world.getType(i + b0, j + 1, k + b1) == block;
+ boolean flag2 = false;
+
+ if (flag && !flag1) {
+ flag2 = true;
+ } else if (j1 > i1) {
+ flag2 = true;
+ }
+
+ world.setTypeAndData(i, j, k, block, l, 2);
+ world.setTypeAndData(i, j + 1, k, block, 8 | (flag2 ? 1 : 0), 2);
+ world.applyPhysics(i, j, k, block);
+ world.applyPhysics(i, j + 1, k, block);
+ }
+}
diff --git a/src/main/java/net/minecraft/server/ItemDoorDarkOak.java b/src/main/java/net/minecraft/server/ItemDoorDarkOak.java
new file mode 100644
index 0000000..9dfe5a1
--- /dev/null
+++ b/src/main/java/net/minecraft/server/ItemDoorDarkOak.java
@@ -0,0 +1,81 @@
+package net.minecraft.server;
+
+public class ItemDoorDarkOak extends Item {
+
+ // PaperSpigot - Added for compatibility reasons
+
+ private Material a;
+
+ public ItemDoorDarkOak(Material material) {
+ this.a = material;
+ this.maxStackSize = 64; // PaperSpigot - Bump to 1.8 max stack size
+ this.a(CreativeModeTab.d);
+ }
+
+ public boolean interactWith(ItemStack itemstack, EntityHuman entityhuman, World world, int i, int j, int k, int l, float f, float f1, float f2) {
+ if (l != 1) {
+ return false;
+ } else {
+ ++j;
+ Block block;
+
+ if (this.a == Material.WOOD) {
+ block = Blocks.DARK_OAK_DOOR_BLOCK;
+ } else {
+ block = Blocks.IRON_DOOR_BLOCK;
+ }
+
+ if (entityhuman.a(i, j, k, l, itemstack) && entityhuman.a(i, j + 1, k, l, itemstack)) {
+ if (!block.canPlace(world, i, j, k)) {
+ return false;
+ } else {
+ int i1 = MathHelper.floor((double) ((entityhuman.yaw + 180.0F) * 4.0F / 360.0F) - 0.5D) & 3;
+
+ place(world, i, j, k, i1, block);
+ --itemstack.count;
+ return true;
+ }
+ } else {
+ return false;
+ }
+ }
+ }
+
+ public static void place(World world, int i, int j, int k, int l, Block block) {
+ byte b0 = 0;
+ byte b1 = 0;
+
+ if (l == 0) {
+ b1 = 1;
+ }
+
+ if (l == 1) {
+ b0 = -1;
+ }
+
+ if (l == 2) {
+ b1 = -1;
+ }
+
+ if (l == 3) {
+ b0 = 1;
+ }
+
+ int i1 = (world.getType(i - b0, j, k - b1).r() ? 1 : 0) + (world.getType(i - b0, j + 1, k - b1).r() ? 1 : 0);
+ int j1 = (world.getType(i + b0, j, k + b1).r() ? 1 : 0) + (world.getType(i + b0, j + 1, k + b1).r() ? 1 : 0);
+ boolean flag = world.getType(i - b0, j, k - b1) == block || world.getType(i - b0, j + 1, k - b1) == block;
+ boolean flag1 = world.getType(i + b0, j, k + b1) == block || world.getType(i + b0, j + 1, k + b1) == block;
+ boolean flag2 = false;
+
+ if (flag && !flag1) {
+ flag2 = true;
+ } else if (j1 > i1) {
+ flag2 = true;
+ }
+
+ world.setTypeAndData(i, j, k, block, l, 2);
+ world.setTypeAndData(i, j + 1, k, block, 8 | (flag2 ? 1 : 0), 2);
+ world.applyPhysics(i, j, k, block);
+ world.applyPhysics(i, j + 1, k, block);
+ }
+}
diff --git a/src/main/java/net/minecraft/server/ItemDoorJungle.java b/src/main/java/net/minecraft/server/ItemDoorJungle.java
new file mode 100644
index 0000000..b23b82d
--- /dev/null
+++ b/src/main/java/net/minecraft/server/ItemDoorJungle.java
@@ -0,0 +1,81 @@
+package net.minecraft.server;
+
+public class ItemDoorJungle extends Item {
+
+ // PaperSpigot - Added for compatibility reasons
+
+ private Material a;
+
+ public ItemDoorJungle(Material material) {
+ this.a = material;
+ this.maxStackSize = 64; // PaperSpigot - Bump to 1.8 max stack size
+ this.a(CreativeModeTab.d);
+ }
+
+ public boolean interactWith(ItemStack itemstack, EntityHuman entityhuman, World world, int i, int j, int k, int l, float f, float f1, float f2) {
+ if (l != 1) {
+ return false;
+ } else {
+ ++j;
+ Block block;
+
+ if (this.a == Material.WOOD) {
+ block = Blocks.JUNGLE_DOOR_BLOCK;
+ } else {
+ block = Blocks.IRON_DOOR_BLOCK;
+ }
+
+ if (entityhuman.a(i, j, k, l, itemstack) && entityhuman.a(i, j + 1, k, l, itemstack)) {
+ if (!block.canPlace(world, i, j, k)) {
+ return false;
+ } else {
+ int i1 = MathHelper.floor((double) ((entityhuman.yaw + 180.0F) * 4.0F / 360.0F) - 0.5D) & 3;
+
+ place(world, i, j, k, i1, block);
+ --itemstack.count;
+ return true;
+ }
+ } else {
+ return false;
+ }
+ }
+ }
+
+ public static void place(World world, int i, int j, int k, int l, Block block) {
+ byte b0 = 0;
+ byte b1 = 0;
+
+ if (l == 0) {
+ b1 = 1;
+ }
+
+ if (l == 1) {
+ b0 = -1;
+ }
+
+ if (l == 2) {
+ b1 = -1;
+ }
+
+ if (l == 3) {
+ b0 = 1;
+ }
+
+ int i1 = (world.getType(i - b0, j, k - b1).r() ? 1 : 0) + (world.getType(i - b0, j + 1, k - b1).r() ? 1 : 0);
+ int j1 = (world.getType(i + b0, j, k + b1).r() ? 1 : 0) + (world.getType(i + b0, j + 1, k + b1).r() ? 1 : 0);
+ boolean flag = world.getType(i - b0, j, k - b1) == block || world.getType(i - b0, j + 1, k - b1) == block;
+ boolean flag1 = world.getType(i + b0, j, k + b1) == block || world.getType(i + b0, j + 1, k + b1) == block;
+ boolean flag2 = false;
+
+ if (flag && !flag1) {
+ flag2 = true;
+ } else if (j1 > i1) {
+ flag2 = true;
+ }
+
+ world.setTypeAndData(i, j, k, block, l, 2);
+ world.setTypeAndData(i, j + 1, k, block, 8 | (flag2 ? 1 : 0), 2);
+ world.applyPhysics(i, j, k, block);
+ world.applyPhysics(i, j + 1, k, block);
+ }
+}
diff --git a/src/main/java/net/minecraft/server/ItemDoorSpruce.java b/src/main/java/net/minecraft/server/ItemDoorSpruce.java
new file mode 100644
index 0000000..15eb16a
--- /dev/null
+++ b/src/main/java/net/minecraft/server/ItemDoorSpruce.java
@@ -0,0 +1,81 @@
+package net.minecraft.server;
+
+public class ItemDoorSpruce extends Item {
+
+ // PaperSpigot - Added for compatibility reasons
+
+ private Material a;
+
+ public ItemDoorSpruce(Material material) {
+ this.a = material;
+ this.maxStackSize = 64; // PaperSpigot - Bump to 1.8 max stack size
+ this.a(CreativeModeTab.d);
+ }
+
+ public boolean interactWith(ItemStack itemstack, EntityHuman entityhuman, World world, int i, int j, int k, int l, float f, float f1, float f2) {
+ if (l != 1) {
+ return false;
+ } else {
+ ++j;
+ Block block;
+
+ if (this.a == Material.WOOD) {
+ block = Blocks.SPRUCE_DOOR_BLOCK;
+ } else {
+ block = Blocks.IRON_DOOR_BLOCK;
+ }
+
+ if (entityhuman.a(i, j, k, l, itemstack) && entityhuman.a(i, j + 1, k, l, itemstack)) {
+ if (!block.canPlace(world, i, j, k)) {
+ return false;
+ } else {
+ int i1 = MathHelper.floor((double) ((entityhuman.yaw + 180.0F) * 4.0F / 360.0F) - 0.5D) & 3;
+
+ place(world, i, j, k, i1, block);
+ --itemstack.count;
+ return true;
+ }
+ } else {
+ return false;
+ }
+ }
+ }
+
+ public static void place(World world, int i, int j, int k, int l, Block block) {
+ byte b0 = 0;
+ byte b1 = 0;
+
+ if (l == 0) {
+ b1 = 1;
+ }
+
+ if (l == 1) {
+ b0 = -1;
+ }
+
+ if (l == 2) {
+ b1 = -1;
+ }
+
+ if (l == 3) {
+ b0 = 1;
+ }
+
+ int i1 = (world.getType(i - b0, j, k - b1).r() ? 1 : 0) + (world.getType(i - b0, j + 1, k - b1).r() ? 1 : 0);
+ int j1 = (world.getType(i + b0, j, k + b1).r() ? 1 : 0) + (world.getType(i + b0, j + 1, k + b1).r() ? 1 : 0);
+ boolean flag = world.getType(i - b0, j, k - b1) == block || world.getType(i - b0, j + 1, k - b1) == block;
+ boolean flag1 = world.getType(i + b0, j, k + b1) == block || world.getType(i + b0, j + 1, k + b1) == block;
+ boolean flag2 = false;
+
+ if (flag && !flag1) {
+ flag2 = true;
+ } else if (j1 > i1) {
+ flag2 = true;
+ }
+
+ world.setTypeAndData(i, j, k, block, l, 2);
+ world.setTypeAndData(i, j + 1, k, block, 8 | (flag2 ? 1 : 0), 2);
+ world.applyPhysics(i, j, k, block);
+ world.applyPhysics(i, j + 1, k, block);
+ }
+}
diff --git a/src/main/java/net/minecraft/server/Items.java b/src/main/java/net/minecraft/server/Items.java
index 6834e67..3876847 100644
--- a/src/main/java/net/minecraft/server/Items.java
+++ b/src/main/java/net/minecraft/server/Items.java
@@ -173,5 +173,14 @@ public class Items {
public static final Item RECORD_10 = (Item) Item.REGISTRY.get("record_ward");
public static final Item RECORD_11 = (Item) Item.REGISTRY.get("record_11");
public static final Item RECORD_12 = (Item) Item.REGISTRY.get("record_wait");
+ // PaperSpigot start - Add new items
+ public static final Item SPRUCE_DOOR = (Item) Item.REGISTRY.get("spruce_door");
+ public static final Item BIRCH_DOOR = (Item) Item.REGISTRY.get("birch_door");
+ public static final Item JUNGLE_DOOR = (Item) Item.REGISTRY.a(429); // Jungle door ID, no idea why it does this will investigate more later
+ public static final Item ACACIA_DOOR = (Item) Item.REGISTRY.get("acacia_door");
+ public static final Item DARK_OAK_DOOR = (Item) Item.REGISTRY.get("dark_oak_door");
+ public static final Item MUTTON = (Item) Item.REGISTRY.get("mutton");
+ public static final Item COOKED_MUTTON = (Item) Item.REGISTRY.get("cooked_mutton");
+ // PaperSpigot end
}
diff --git a/src/main/java/net/minecraft/server/RecipesCrafting.java b/src/main/java/net/minecraft/server/RecipesCrafting.java
index 0abda55..c34e71b 100644
--- a/src/main/java/net/minecraft/server/RecipesCrafting.java
+++ b/src/main/java/net/minecraft/server/RecipesCrafting.java
@@ -15,7 +15,7 @@ public class RecipesCrafting {
craftingmanager.registerShapedRecipe(new ItemStack(Blocks.SANDSTONE, 1, 1), new Object[] { "#", "#", Character.valueOf('#'), new ItemStack(Blocks.STEP, 1, 1)});
craftingmanager.registerShapedRecipe(new ItemStack(Blocks.QUARTZ_BLOCK, 1, 1), new Object[] { "#", "#", Character.valueOf('#'), new ItemStack(Blocks.STEP, 1, 7)});
craftingmanager.registerShapedRecipe(new ItemStack(Blocks.QUARTZ_BLOCK, 2, 2), new Object[] { "#", "#", Character.valueOf('#'), new ItemStack(Blocks.QUARTZ_BLOCK, 1, 0)});
- craftingmanager.registerShapedRecipe(new ItemStack(Blocks.SMOOTH_BRICK, 4), new Object[] { "##", "##", Character.valueOf('#'), Blocks.STONE});
+ craftingmanager.registerShapedRecipe(new ItemStack(Blocks.SMOOTH_BRICK, 4), new Object[] { "##", "##", Character.valueOf('#'), new ItemStack(Blocks.STONE, 1, 0)}); // PaperSpigot - Explicit data value
craftingmanager.registerShapedRecipe(new ItemStack(Blocks.IRON_FENCE, 16), new Object[] { "###", "###", Character.valueOf('#'), Items.IRON_INGOT});
craftingmanager.registerShapedRecipe(new ItemStack(Blocks.THIN_GLASS, 16), new Object[] { "###", "###", Character.valueOf('#'), Blocks.GLASS});
craftingmanager.registerShapedRecipe(new ItemStack(Blocks.REDSTONE_LAMP_OFF, 1), new Object[] { " R ", "RGR", " R ", Character.valueOf('R'), Items.REDSTONE, Character.valueOf('G'), Blocks.GLOWSTONE});
diff --git a/src/main/java/net/minecraft/server/RecipesFurnace.java b/src/main/java/net/minecraft/server/RecipesFurnace.java
index 23a1446..db4d7d3 100644
--- a/src/main/java/net/minecraft/server/RecipesFurnace.java
+++ b/src/main/java/net/minecraft/server/RecipesFurnace.java
@@ -34,6 +34,7 @@ public class RecipesFurnace {
this.a(Items.POTATO, new ItemStack(Items.POTATO_BAKED), 0.35F);
this.registerRecipe(Blocks.NETHERRACK, new ItemStack(Items.NETHER_BRICK), 0.1F);
this.registerRecipe(Blocks.SMOOTH_BRICK, new ItemStack(Blocks.SMOOTH_BRICK, 1, 2), 0.5F); // PaperSpigot - Register cracked stone brick recipe
+ this.a(Items.MUTTON, new ItemStack(Items.COOKED_MUTTON), 0.35F); // PaperSpigot - Register mutton recipe
EnumFish[] aenumfish = EnumFish.values();
int i = aenumfish.length;
--
1.9.1