base mod created
This commit is contained in:
166
build/tmp/recompileMc/sources/net/minecraft/init/Biomes.java
Normal file
166
build/tmp/recompileMc/sources/net/minecraft/init/Biomes.java
Normal file
@@ -0,0 +1,166 @@
|
||||
package net.minecraft.init;
|
||||
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
|
||||
public abstract class Biomes
|
||||
{
|
||||
public static final Biome OCEAN;
|
||||
public static final Biome DEFAULT;
|
||||
public static final Biome PLAINS;
|
||||
public static final Biome DESERT;
|
||||
public static final Biome EXTREME_HILLS;
|
||||
public static final Biome FOREST;
|
||||
public static final Biome TAIGA;
|
||||
public static final Biome SWAMPLAND;
|
||||
public static final Biome RIVER;
|
||||
public static final Biome HELL;
|
||||
/** Is the biome used for sky world. */
|
||||
public static final Biome SKY;
|
||||
public static final Biome FROZEN_OCEAN;
|
||||
public static final Biome FROZEN_RIVER;
|
||||
public static final Biome ICE_PLAINS;
|
||||
public static final Biome ICE_MOUNTAINS;
|
||||
public static final Biome MUSHROOM_ISLAND;
|
||||
public static final Biome MUSHROOM_ISLAND_SHORE;
|
||||
/** Beach biome. */
|
||||
public static final Biome BEACH;
|
||||
/** Desert Hills biome. */
|
||||
public static final Biome DESERT_HILLS;
|
||||
/** Forest Hills biome. */
|
||||
public static final Biome FOREST_HILLS;
|
||||
/** Taiga Hills biome. */
|
||||
public static final Biome TAIGA_HILLS;
|
||||
/** Extreme Hills Edge biome. */
|
||||
public static final Biome EXTREME_HILLS_EDGE;
|
||||
/** Jungle biome identifier */
|
||||
public static final Biome JUNGLE;
|
||||
public static final Biome JUNGLE_HILLS;
|
||||
public static final Biome JUNGLE_EDGE;
|
||||
public static final Biome DEEP_OCEAN;
|
||||
public static final Biome STONE_BEACH;
|
||||
public static final Biome COLD_BEACH;
|
||||
public static final Biome BIRCH_FOREST;
|
||||
public static final Biome BIRCH_FOREST_HILLS;
|
||||
public static final Biome ROOFED_FOREST;
|
||||
public static final Biome COLD_TAIGA;
|
||||
public static final Biome COLD_TAIGA_HILLS;
|
||||
public static final Biome REDWOOD_TAIGA;
|
||||
public static final Biome REDWOOD_TAIGA_HILLS;
|
||||
public static final Biome EXTREME_HILLS_WITH_TREES;
|
||||
public static final Biome SAVANNA;
|
||||
public static final Biome SAVANNA_PLATEAU;
|
||||
public static final Biome MESA;
|
||||
public static final Biome MESA_ROCK;
|
||||
public static final Biome MESA_CLEAR_ROCK;
|
||||
public static final Biome VOID;
|
||||
public static final Biome MUTATED_PLAINS;
|
||||
public static final Biome MUTATED_DESERT;
|
||||
public static final Biome MUTATED_EXTREME_HILLS;
|
||||
public static final Biome MUTATED_FOREST;
|
||||
public static final Biome MUTATED_TAIGA;
|
||||
public static final Biome MUTATED_SWAMPLAND;
|
||||
public static final Biome MUTATED_ICE_FLATS;
|
||||
public static final Biome MUTATED_JUNGLE;
|
||||
public static final Biome MUTATED_JUNGLE_EDGE;
|
||||
public static final Biome MUTATED_BIRCH_FOREST;
|
||||
public static final Biome MUTATED_BIRCH_FOREST_HILLS;
|
||||
public static final Biome MUTATED_ROOFED_FOREST;
|
||||
public static final Biome MUTATED_TAIGA_COLD;
|
||||
public static final Biome MUTATED_REDWOOD_TAIGA;
|
||||
public static final Biome MUTATED_REDWOOD_TAIGA_HILLS;
|
||||
public static final Biome MUTATED_EXTREME_HILLS_WITH_TREES;
|
||||
public static final Biome MUTATED_SAVANNA;
|
||||
public static final Biome MUTATED_SAVANNA_ROCK;
|
||||
public static final Biome MUTATED_MESA;
|
||||
public static final Biome MUTATED_MESA_ROCK;
|
||||
public static final Biome MUTATED_MESA_CLEAR_ROCK;
|
||||
|
||||
private static Biome getRegisteredBiome(String id)
|
||||
{
|
||||
Biome biome = Biome.REGISTRY.getObject(new ResourceLocation(id));
|
||||
|
||||
if (biome == null)
|
||||
{
|
||||
throw new IllegalStateException("Invalid Biome requested: " + id);
|
||||
}
|
||||
else
|
||||
{
|
||||
return biome;
|
||||
}
|
||||
}
|
||||
|
||||
static
|
||||
{
|
||||
if (!Bootstrap.isRegistered())
|
||||
{
|
||||
throw new RuntimeException("Accessed Biomes before Bootstrap!");
|
||||
}
|
||||
else
|
||||
{
|
||||
OCEAN = getRegisteredBiome("ocean");
|
||||
DEFAULT = OCEAN;
|
||||
PLAINS = getRegisteredBiome("plains");
|
||||
DESERT = getRegisteredBiome("desert");
|
||||
EXTREME_HILLS = getRegisteredBiome("extreme_hills");
|
||||
FOREST = getRegisteredBiome("forest");
|
||||
TAIGA = getRegisteredBiome("taiga");
|
||||
SWAMPLAND = getRegisteredBiome("swampland");
|
||||
RIVER = getRegisteredBiome("river");
|
||||
HELL = getRegisteredBiome("hell");
|
||||
SKY = getRegisteredBiome("sky");
|
||||
FROZEN_OCEAN = getRegisteredBiome("frozen_ocean");
|
||||
FROZEN_RIVER = getRegisteredBiome("frozen_river");
|
||||
ICE_PLAINS = getRegisteredBiome("ice_flats");
|
||||
ICE_MOUNTAINS = getRegisteredBiome("ice_mountains");
|
||||
MUSHROOM_ISLAND = getRegisteredBiome("mushroom_island");
|
||||
MUSHROOM_ISLAND_SHORE = getRegisteredBiome("mushroom_island_shore");
|
||||
BEACH = getRegisteredBiome("beaches");
|
||||
DESERT_HILLS = getRegisteredBiome("desert_hills");
|
||||
FOREST_HILLS = getRegisteredBiome("forest_hills");
|
||||
TAIGA_HILLS = getRegisteredBiome("taiga_hills");
|
||||
EXTREME_HILLS_EDGE = getRegisteredBiome("smaller_extreme_hills");
|
||||
JUNGLE = getRegisteredBiome("jungle");
|
||||
JUNGLE_HILLS = getRegisteredBiome("jungle_hills");
|
||||
JUNGLE_EDGE = getRegisteredBiome("jungle_edge");
|
||||
DEEP_OCEAN = getRegisteredBiome("deep_ocean");
|
||||
STONE_BEACH = getRegisteredBiome("stone_beach");
|
||||
COLD_BEACH = getRegisteredBiome("cold_beach");
|
||||
BIRCH_FOREST = getRegisteredBiome("birch_forest");
|
||||
BIRCH_FOREST_HILLS = getRegisteredBiome("birch_forest_hills");
|
||||
ROOFED_FOREST = getRegisteredBiome("roofed_forest");
|
||||
COLD_TAIGA = getRegisteredBiome("taiga_cold");
|
||||
COLD_TAIGA_HILLS = getRegisteredBiome("taiga_cold_hills");
|
||||
REDWOOD_TAIGA = getRegisteredBiome("redwood_taiga");
|
||||
REDWOOD_TAIGA_HILLS = getRegisteredBiome("redwood_taiga_hills");
|
||||
EXTREME_HILLS_WITH_TREES = getRegisteredBiome("extreme_hills_with_trees");
|
||||
SAVANNA = getRegisteredBiome("savanna");
|
||||
SAVANNA_PLATEAU = getRegisteredBiome("savanna_rock");
|
||||
MESA = getRegisteredBiome("mesa");
|
||||
MESA_ROCK = getRegisteredBiome("mesa_rock");
|
||||
MESA_CLEAR_ROCK = getRegisteredBiome("mesa_clear_rock");
|
||||
VOID = getRegisteredBiome("void");
|
||||
MUTATED_PLAINS = getRegisteredBiome("mutated_plains");
|
||||
MUTATED_DESERT = getRegisteredBiome("mutated_desert");
|
||||
MUTATED_EXTREME_HILLS = getRegisteredBiome("mutated_extreme_hills");
|
||||
MUTATED_FOREST = getRegisteredBiome("mutated_forest");
|
||||
MUTATED_TAIGA = getRegisteredBiome("mutated_taiga");
|
||||
MUTATED_SWAMPLAND = getRegisteredBiome("mutated_swampland");
|
||||
MUTATED_ICE_FLATS = getRegisteredBiome("mutated_ice_flats");
|
||||
MUTATED_JUNGLE = getRegisteredBiome("mutated_jungle");
|
||||
MUTATED_JUNGLE_EDGE = getRegisteredBiome("mutated_jungle_edge");
|
||||
MUTATED_BIRCH_FOREST = getRegisteredBiome("mutated_birch_forest");
|
||||
MUTATED_BIRCH_FOREST_HILLS = getRegisteredBiome("mutated_birch_forest_hills");
|
||||
MUTATED_ROOFED_FOREST = getRegisteredBiome("mutated_roofed_forest");
|
||||
MUTATED_TAIGA_COLD = getRegisteredBiome("mutated_taiga_cold");
|
||||
MUTATED_REDWOOD_TAIGA = getRegisteredBiome("mutated_redwood_taiga");
|
||||
MUTATED_REDWOOD_TAIGA_HILLS = getRegisteredBiome("mutated_redwood_taiga_hills");
|
||||
MUTATED_EXTREME_HILLS_WITH_TREES = getRegisteredBiome("mutated_extreme_hills_with_trees");
|
||||
MUTATED_SAVANNA = getRegisteredBiome("mutated_savanna");
|
||||
MUTATED_SAVANNA_ROCK = getRegisteredBiome("mutated_savanna_rock");
|
||||
MUTATED_MESA = getRegisteredBiome("mutated_mesa");
|
||||
MUTATED_MESA_ROCK = getRegisteredBiome("mutated_mesa_rock");
|
||||
MUTATED_MESA_CLEAR_ROCK = getRegisteredBiome("mutated_mesa_clear_rock");
|
||||
}
|
||||
}
|
||||
}
|
||||
583
build/tmp/recompileMc/sources/net/minecraft/init/Blocks.java
Normal file
583
build/tmp/recompileMc/sources/net/minecraft/init/Blocks.java
Normal file
@@ -0,0 +1,583 @@
|
||||
package net.minecraft.init;
|
||||
|
||||
import com.google.common.collect.Sets;
|
||||
import java.util.Set;
|
||||
import javax.annotation.Nullable;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockBeacon;
|
||||
import net.minecraft.block.BlockBush;
|
||||
import net.minecraft.block.BlockCactus;
|
||||
import net.minecraft.block.BlockCauldron;
|
||||
import net.minecraft.block.BlockChest;
|
||||
import net.minecraft.block.BlockDaylightDetector;
|
||||
import net.minecraft.block.BlockDeadBush;
|
||||
import net.minecraft.block.BlockDoor;
|
||||
import net.minecraft.block.BlockDoublePlant;
|
||||
import net.minecraft.block.BlockDynamicLiquid;
|
||||
import net.minecraft.block.BlockFire;
|
||||
import net.minecraft.block.BlockFlower;
|
||||
import net.minecraft.block.BlockGrass;
|
||||
import net.minecraft.block.BlockHopper;
|
||||
import net.minecraft.block.BlockLeaves;
|
||||
import net.minecraft.block.BlockMycelium;
|
||||
import net.minecraft.block.BlockPistonBase;
|
||||
import net.minecraft.block.BlockPistonExtension;
|
||||
import net.minecraft.block.BlockPistonMoving;
|
||||
import net.minecraft.block.BlockPortal;
|
||||
import net.minecraft.block.BlockRedstoneComparator;
|
||||
import net.minecraft.block.BlockRedstoneRepeater;
|
||||
import net.minecraft.block.BlockRedstoneWire;
|
||||
import net.minecraft.block.BlockReed;
|
||||
import net.minecraft.block.BlockSand;
|
||||
import net.minecraft.block.BlockSkull;
|
||||
import net.minecraft.block.BlockSlab;
|
||||
import net.minecraft.block.BlockStainedGlass;
|
||||
import net.minecraft.block.BlockStainedGlassPane;
|
||||
import net.minecraft.block.BlockStaticLiquid;
|
||||
import net.minecraft.block.BlockTallGrass;
|
||||
import net.minecraft.block.BlockTripWireHook;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class Blocks
|
||||
{
|
||||
private static final Set<Block> CACHE;
|
||||
public static final Block AIR;
|
||||
public static final Block STONE;
|
||||
public static final BlockGrass GRASS;
|
||||
public static final Block DIRT;
|
||||
public static final Block COBBLESTONE;
|
||||
public static final Block PLANKS;
|
||||
public static final Block SAPLING;
|
||||
public static final Block BEDROCK;
|
||||
public static final BlockDynamicLiquid FLOWING_WATER;
|
||||
public static final BlockStaticLiquid WATER;
|
||||
public static final BlockDynamicLiquid FLOWING_LAVA;
|
||||
public static final BlockStaticLiquid LAVA;
|
||||
public static final BlockSand SAND;
|
||||
public static final Block GRAVEL;
|
||||
public static final Block GOLD_ORE;
|
||||
public static final Block IRON_ORE;
|
||||
public static final Block COAL_ORE;
|
||||
public static final Block LOG;
|
||||
public static final Block LOG2;
|
||||
public static final BlockLeaves LEAVES;
|
||||
public static final BlockLeaves LEAVES2;
|
||||
public static final Block SPONGE;
|
||||
public static final Block GLASS;
|
||||
public static final Block LAPIS_ORE;
|
||||
public static final Block LAPIS_BLOCK;
|
||||
public static final Block DISPENSER;
|
||||
public static final Block SANDSTONE;
|
||||
public static final Block NOTEBLOCK;
|
||||
public static final Block BED;
|
||||
public static final Block GOLDEN_RAIL;
|
||||
public static final Block DETECTOR_RAIL;
|
||||
public static final BlockPistonBase STICKY_PISTON;
|
||||
public static final Block WEB;
|
||||
public static final BlockTallGrass TALLGRASS;
|
||||
public static final BlockDeadBush DEADBUSH;
|
||||
public static final BlockPistonBase PISTON;
|
||||
public static final BlockPistonExtension PISTON_HEAD;
|
||||
public static final Block WOOL;
|
||||
public static final BlockPistonMoving PISTON_EXTENSION;
|
||||
public static final BlockFlower YELLOW_FLOWER;
|
||||
public static final BlockFlower RED_FLOWER;
|
||||
public static final BlockBush BROWN_MUSHROOM;
|
||||
public static final BlockBush RED_MUSHROOM;
|
||||
public static final Block GOLD_BLOCK;
|
||||
public static final Block IRON_BLOCK;
|
||||
public static final BlockSlab DOUBLE_STONE_SLAB;
|
||||
public static final BlockSlab STONE_SLAB;
|
||||
public static final Block BRICK_BLOCK;
|
||||
public static final Block TNT;
|
||||
public static final Block BOOKSHELF;
|
||||
public static final Block MOSSY_COBBLESTONE;
|
||||
public static final Block OBSIDIAN;
|
||||
public static final Block TORCH;
|
||||
public static final BlockFire FIRE;
|
||||
public static final Block MOB_SPAWNER;
|
||||
public static final Block OAK_STAIRS;
|
||||
public static final BlockChest CHEST;
|
||||
public static final BlockRedstoneWire REDSTONE_WIRE;
|
||||
public static final Block DIAMOND_ORE;
|
||||
public static final Block DIAMOND_BLOCK;
|
||||
public static final Block CRAFTING_TABLE;
|
||||
public static final Block WHEAT;
|
||||
public static final Block FARMLAND;
|
||||
public static final Block FURNACE;
|
||||
public static final Block LIT_FURNACE;
|
||||
public static final Block STANDING_SIGN;
|
||||
public static final BlockDoor OAK_DOOR;
|
||||
public static final BlockDoor SPRUCE_DOOR;
|
||||
public static final BlockDoor BIRCH_DOOR;
|
||||
public static final BlockDoor JUNGLE_DOOR;
|
||||
public static final BlockDoor ACACIA_DOOR;
|
||||
public static final BlockDoor DARK_OAK_DOOR;
|
||||
public static final Block LADDER;
|
||||
public static final Block RAIL;
|
||||
public static final Block STONE_STAIRS;
|
||||
public static final Block WALL_SIGN;
|
||||
public static final Block LEVER;
|
||||
public static final Block STONE_PRESSURE_PLATE;
|
||||
public static final BlockDoor IRON_DOOR;
|
||||
public static final Block WOODEN_PRESSURE_PLATE;
|
||||
public static final Block REDSTONE_ORE;
|
||||
public static final Block LIT_REDSTONE_ORE;
|
||||
public static final Block UNLIT_REDSTONE_TORCH;
|
||||
public static final Block REDSTONE_TORCH;
|
||||
public static final Block STONE_BUTTON;
|
||||
public static final Block SNOW_LAYER;
|
||||
public static final Block ICE;
|
||||
public static final Block SNOW;
|
||||
public static final BlockCactus CACTUS;
|
||||
public static final Block CLAY;
|
||||
public static final BlockReed REEDS;
|
||||
public static final Block JUKEBOX;
|
||||
public static final Block OAK_FENCE;
|
||||
public static final Block SPRUCE_FENCE;
|
||||
public static final Block BIRCH_FENCE;
|
||||
public static final Block JUNGLE_FENCE;
|
||||
public static final Block DARK_OAK_FENCE;
|
||||
public static final Block ACACIA_FENCE;
|
||||
public static final Block PUMPKIN;
|
||||
public static final Block NETHERRACK;
|
||||
public static final Block SOUL_SAND;
|
||||
public static final Block GLOWSTONE;
|
||||
public static final BlockPortal PORTAL;
|
||||
public static final Block LIT_PUMPKIN;
|
||||
public static final Block CAKE;
|
||||
public static final BlockRedstoneRepeater UNPOWERED_REPEATER;
|
||||
public static final BlockRedstoneRepeater POWERED_REPEATER;
|
||||
public static final Block TRAPDOOR;
|
||||
public static final Block MONSTER_EGG;
|
||||
public static final Block STONEBRICK;
|
||||
public static final Block BROWN_MUSHROOM_BLOCK;
|
||||
public static final Block RED_MUSHROOM_BLOCK;
|
||||
public static final Block IRON_BARS;
|
||||
public static final Block GLASS_PANE;
|
||||
public static final Block MELON_BLOCK;
|
||||
public static final Block PUMPKIN_STEM;
|
||||
public static final Block MELON_STEM;
|
||||
public static final Block VINE;
|
||||
public static final Block OAK_FENCE_GATE;
|
||||
public static final Block SPRUCE_FENCE_GATE;
|
||||
public static final Block BIRCH_FENCE_GATE;
|
||||
public static final Block JUNGLE_FENCE_GATE;
|
||||
public static final Block DARK_OAK_FENCE_GATE;
|
||||
public static final Block ACACIA_FENCE_GATE;
|
||||
public static final Block BRICK_STAIRS;
|
||||
public static final Block STONE_BRICK_STAIRS;
|
||||
public static final BlockMycelium MYCELIUM;
|
||||
public static final Block WATERLILY;
|
||||
public static final Block NETHER_BRICK;
|
||||
public static final Block NETHER_BRICK_FENCE;
|
||||
public static final Block NETHER_BRICK_STAIRS;
|
||||
public static final Block NETHER_WART;
|
||||
public static final Block ENCHANTING_TABLE;
|
||||
public static final Block BREWING_STAND;
|
||||
public static final BlockCauldron CAULDRON;
|
||||
public static final Block END_PORTAL;
|
||||
public static final Block END_PORTAL_FRAME;
|
||||
public static final Block END_STONE;
|
||||
public static final Block DRAGON_EGG;
|
||||
public static final Block REDSTONE_LAMP;
|
||||
public static final Block LIT_REDSTONE_LAMP;
|
||||
public static final BlockSlab DOUBLE_WOODEN_SLAB;
|
||||
public static final BlockSlab WOODEN_SLAB;
|
||||
public static final Block COCOA;
|
||||
public static final Block SANDSTONE_STAIRS;
|
||||
public static final Block EMERALD_ORE;
|
||||
public static final Block ENDER_CHEST;
|
||||
public static final BlockTripWireHook TRIPWIRE_HOOK;
|
||||
public static final Block TRIPWIRE;
|
||||
public static final Block EMERALD_BLOCK;
|
||||
public static final Block SPRUCE_STAIRS;
|
||||
public static final Block BIRCH_STAIRS;
|
||||
public static final Block JUNGLE_STAIRS;
|
||||
public static final Block COMMAND_BLOCK;
|
||||
public static final BlockBeacon BEACON;
|
||||
public static final Block COBBLESTONE_WALL;
|
||||
public static final Block FLOWER_POT;
|
||||
public static final Block CARROTS;
|
||||
public static final Block POTATOES;
|
||||
public static final Block WOODEN_BUTTON;
|
||||
public static final BlockSkull SKULL;
|
||||
public static final Block ANVIL;
|
||||
public static final Block TRAPPED_CHEST;
|
||||
public static final Block LIGHT_WEIGHTED_PRESSURE_PLATE;
|
||||
public static final Block HEAVY_WEIGHTED_PRESSURE_PLATE;
|
||||
public static final BlockRedstoneComparator UNPOWERED_COMPARATOR;
|
||||
public static final BlockRedstoneComparator POWERED_COMPARATOR;
|
||||
public static final BlockDaylightDetector DAYLIGHT_DETECTOR;
|
||||
public static final BlockDaylightDetector DAYLIGHT_DETECTOR_INVERTED;
|
||||
public static final Block REDSTONE_BLOCK;
|
||||
public static final Block QUARTZ_ORE;
|
||||
public static final BlockHopper HOPPER;
|
||||
public static final Block QUARTZ_BLOCK;
|
||||
public static final Block QUARTZ_STAIRS;
|
||||
public static final Block ACTIVATOR_RAIL;
|
||||
public static final Block DROPPER;
|
||||
public static final Block STAINED_HARDENED_CLAY;
|
||||
public static final Block BARRIER;
|
||||
public static final Block IRON_TRAPDOOR;
|
||||
public static final Block HAY_BLOCK;
|
||||
public static final Block CARPET;
|
||||
public static final Block HARDENED_CLAY;
|
||||
public static final Block COAL_BLOCK;
|
||||
public static final Block PACKED_ICE;
|
||||
public static final Block ACACIA_STAIRS;
|
||||
public static final Block DARK_OAK_STAIRS;
|
||||
public static final Block SLIME_BLOCK;
|
||||
public static final BlockDoublePlant DOUBLE_PLANT;
|
||||
public static final BlockStainedGlass STAINED_GLASS;
|
||||
public static final BlockStainedGlassPane STAINED_GLASS_PANE;
|
||||
public static final Block PRISMARINE;
|
||||
public static final Block SEA_LANTERN;
|
||||
public static final Block STANDING_BANNER;
|
||||
public static final Block WALL_BANNER;
|
||||
public static final Block RED_SANDSTONE;
|
||||
public static final Block RED_SANDSTONE_STAIRS;
|
||||
public static final BlockSlab DOUBLE_STONE_SLAB2;
|
||||
public static final BlockSlab STONE_SLAB2;
|
||||
public static final Block END_ROD;
|
||||
public static final Block CHORUS_PLANT;
|
||||
public static final Block CHORUS_FLOWER;
|
||||
public static final Block PURPUR_BLOCK;
|
||||
public static final Block PURPUR_PILLAR;
|
||||
public static final Block PURPUR_STAIRS;
|
||||
public static final BlockSlab PURPUR_DOUBLE_SLAB;
|
||||
public static final BlockSlab PURPUR_SLAB;
|
||||
public static final Block END_BRICKS;
|
||||
public static final Block BEETROOTS;
|
||||
public static final Block GRASS_PATH;
|
||||
public static final Block END_GATEWAY;
|
||||
public static final Block REPEATING_COMMAND_BLOCK;
|
||||
public static final Block CHAIN_COMMAND_BLOCK;
|
||||
public static final Block FROSTED_ICE;
|
||||
public static final Block MAGMA;
|
||||
public static final Block NETHER_WART_BLOCK;
|
||||
public static final Block RED_NETHER_BRICK;
|
||||
public static final Block BONE_BLOCK;
|
||||
public static final Block STRUCTURE_VOID;
|
||||
public static final Block OBSERVER;
|
||||
public static final Block WHITE_SHULKER_BOX;
|
||||
public static final Block ORANGE_SHULKER_BOX;
|
||||
public static final Block MAGENTA_SHULKER_BOX;
|
||||
public static final Block LIGHT_BLUE_SHULKER_BOX;
|
||||
public static final Block YELLOW_SHULKER_BOX;
|
||||
public static final Block LIME_SHULKER_BOX;
|
||||
public static final Block PINK_SHULKER_BOX;
|
||||
public static final Block GRAY_SHULKER_BOX;
|
||||
public static final Block SILVER_SHULKER_BOX;
|
||||
public static final Block CYAN_SHULKER_BOX;
|
||||
public static final Block PURPLE_SHULKER_BOX;
|
||||
public static final Block BLUE_SHULKER_BOX;
|
||||
public static final Block BROWN_SHULKER_BOX;
|
||||
public static final Block GREEN_SHULKER_BOX;
|
||||
public static final Block RED_SHULKER_BOX;
|
||||
public static final Block BLACK_SHULKER_BOX;
|
||||
public static final Block WHITE_GLAZED_TERRACOTTA;
|
||||
public static final Block ORANGE_GLAZED_TERRACOTTA;
|
||||
public static final Block MAGENTA_GLAZED_TERRACOTTA;
|
||||
public static final Block LIGHT_BLUE_GLAZED_TERRACOTTA;
|
||||
public static final Block YELLOW_GLAZED_TERRACOTTA;
|
||||
public static final Block LIME_GLAZED_TERRACOTTA;
|
||||
public static final Block PINK_GLAZED_TERRACOTTA;
|
||||
public static final Block GRAY_GLAZED_TERRACOTTA;
|
||||
public static final Block SILVER_GLAZED_TERRACOTTA;
|
||||
public static final Block CYAN_GLAZED_TERRACOTTA;
|
||||
public static final Block PURPLE_GLAZED_TERRACOTTA;
|
||||
public static final Block BLUE_GLAZED_TERRACOTTA;
|
||||
public static final Block BROWN_GLAZED_TERRACOTTA;
|
||||
public static final Block GREEN_GLAZED_TERRACOTTA;
|
||||
public static final Block RED_GLAZED_TERRACOTTA;
|
||||
public static final Block BLACK_GLAZED_TERRACOTTA;
|
||||
public static final Block CONCRETE;
|
||||
public static final Block CONCRETE_POWDER;
|
||||
public static final Block STRUCTURE_BLOCK;
|
||||
|
||||
/**
|
||||
* Returns the Block in the blockRegistry with the specified name.
|
||||
*/
|
||||
@Nullable
|
||||
private static Block getRegisteredBlock(String blockName)
|
||||
{
|
||||
Block block = Block.REGISTRY.getObject(new ResourceLocation(blockName));
|
||||
|
||||
if (!CACHE.add(block))
|
||||
{
|
||||
throw new IllegalStateException("Invalid Block requested: " + blockName);
|
||||
}
|
||||
else
|
||||
{
|
||||
return block;
|
||||
}
|
||||
}
|
||||
|
||||
static
|
||||
{
|
||||
if (!Bootstrap.isRegistered())
|
||||
{
|
||||
throw new RuntimeException("Accessed Blocks before Bootstrap!");
|
||||
}
|
||||
else
|
||||
{
|
||||
CACHE = Sets.<Block>newHashSet();
|
||||
AIR = getRegisteredBlock("air");
|
||||
STONE = getRegisteredBlock("stone");
|
||||
GRASS = (BlockGrass)getRegisteredBlock("grass");
|
||||
DIRT = getRegisteredBlock("dirt");
|
||||
COBBLESTONE = getRegisteredBlock("cobblestone");
|
||||
PLANKS = getRegisteredBlock("planks");
|
||||
SAPLING = getRegisteredBlock("sapling");
|
||||
BEDROCK = getRegisteredBlock("bedrock");
|
||||
FLOWING_WATER = (BlockDynamicLiquid)getRegisteredBlock("flowing_water");
|
||||
WATER = (BlockStaticLiquid)getRegisteredBlock("water");
|
||||
FLOWING_LAVA = (BlockDynamicLiquid)getRegisteredBlock("flowing_lava");
|
||||
LAVA = (BlockStaticLiquid)getRegisteredBlock("lava");
|
||||
SAND = (BlockSand)getRegisteredBlock("sand");
|
||||
GRAVEL = getRegisteredBlock("gravel");
|
||||
GOLD_ORE = getRegisteredBlock("gold_ore");
|
||||
IRON_ORE = getRegisteredBlock("iron_ore");
|
||||
COAL_ORE = getRegisteredBlock("coal_ore");
|
||||
LOG = getRegisteredBlock("log");
|
||||
LOG2 = getRegisteredBlock("log2");
|
||||
LEAVES = (BlockLeaves)getRegisteredBlock("leaves");
|
||||
LEAVES2 = (BlockLeaves)getRegisteredBlock("leaves2");
|
||||
SPONGE = getRegisteredBlock("sponge");
|
||||
GLASS = getRegisteredBlock("glass");
|
||||
LAPIS_ORE = getRegisteredBlock("lapis_ore");
|
||||
LAPIS_BLOCK = getRegisteredBlock("lapis_block");
|
||||
DISPENSER = getRegisteredBlock("dispenser");
|
||||
SANDSTONE = getRegisteredBlock("sandstone");
|
||||
NOTEBLOCK = getRegisteredBlock("noteblock");
|
||||
BED = getRegisteredBlock("bed");
|
||||
GOLDEN_RAIL = getRegisteredBlock("golden_rail");
|
||||
DETECTOR_RAIL = getRegisteredBlock("detector_rail");
|
||||
STICKY_PISTON = (BlockPistonBase)getRegisteredBlock("sticky_piston");
|
||||
WEB = getRegisteredBlock("web");
|
||||
TALLGRASS = (BlockTallGrass)getRegisteredBlock("tallgrass");
|
||||
DEADBUSH = (BlockDeadBush)getRegisteredBlock("deadbush");
|
||||
PISTON = (BlockPistonBase)getRegisteredBlock("piston");
|
||||
PISTON_HEAD = (BlockPistonExtension)getRegisteredBlock("piston_head");
|
||||
WOOL = getRegisteredBlock("wool");
|
||||
PISTON_EXTENSION = (BlockPistonMoving)getRegisteredBlock("piston_extension");
|
||||
YELLOW_FLOWER = (BlockFlower)getRegisteredBlock("yellow_flower");
|
||||
RED_FLOWER = (BlockFlower)getRegisteredBlock("red_flower");
|
||||
BROWN_MUSHROOM = (BlockBush)getRegisteredBlock("brown_mushroom");
|
||||
RED_MUSHROOM = (BlockBush)getRegisteredBlock("red_mushroom");
|
||||
GOLD_BLOCK = getRegisteredBlock("gold_block");
|
||||
IRON_BLOCK = getRegisteredBlock("iron_block");
|
||||
DOUBLE_STONE_SLAB = (BlockSlab)getRegisteredBlock("double_stone_slab");
|
||||
STONE_SLAB = (BlockSlab)getRegisteredBlock("stone_slab");
|
||||
BRICK_BLOCK = getRegisteredBlock("brick_block");
|
||||
TNT = getRegisteredBlock("tnt");
|
||||
BOOKSHELF = getRegisteredBlock("bookshelf");
|
||||
MOSSY_COBBLESTONE = getRegisteredBlock("mossy_cobblestone");
|
||||
OBSIDIAN = getRegisteredBlock("obsidian");
|
||||
TORCH = getRegisteredBlock("torch");
|
||||
FIRE = (BlockFire)getRegisteredBlock("fire");
|
||||
MOB_SPAWNER = getRegisteredBlock("mob_spawner");
|
||||
OAK_STAIRS = getRegisteredBlock("oak_stairs");
|
||||
CHEST = (BlockChest)getRegisteredBlock("chest");
|
||||
REDSTONE_WIRE = (BlockRedstoneWire)getRegisteredBlock("redstone_wire");
|
||||
DIAMOND_ORE = getRegisteredBlock("diamond_ore");
|
||||
DIAMOND_BLOCK = getRegisteredBlock("diamond_block");
|
||||
CRAFTING_TABLE = getRegisteredBlock("crafting_table");
|
||||
WHEAT = getRegisteredBlock("wheat");
|
||||
FARMLAND = getRegisteredBlock("farmland");
|
||||
FURNACE = getRegisteredBlock("furnace");
|
||||
LIT_FURNACE = getRegisteredBlock("lit_furnace");
|
||||
STANDING_SIGN = getRegisteredBlock("standing_sign");
|
||||
OAK_DOOR = (BlockDoor)getRegisteredBlock("wooden_door");
|
||||
SPRUCE_DOOR = (BlockDoor)getRegisteredBlock("spruce_door");
|
||||
BIRCH_DOOR = (BlockDoor)getRegisteredBlock("birch_door");
|
||||
JUNGLE_DOOR = (BlockDoor)getRegisteredBlock("jungle_door");
|
||||
ACACIA_DOOR = (BlockDoor)getRegisteredBlock("acacia_door");
|
||||
DARK_OAK_DOOR = (BlockDoor)getRegisteredBlock("dark_oak_door");
|
||||
LADDER = getRegisteredBlock("ladder");
|
||||
RAIL = getRegisteredBlock("rail");
|
||||
STONE_STAIRS = getRegisteredBlock("stone_stairs");
|
||||
WALL_SIGN = getRegisteredBlock("wall_sign");
|
||||
LEVER = getRegisteredBlock("lever");
|
||||
STONE_PRESSURE_PLATE = getRegisteredBlock("stone_pressure_plate");
|
||||
IRON_DOOR = (BlockDoor)getRegisteredBlock("iron_door");
|
||||
WOODEN_PRESSURE_PLATE = getRegisteredBlock("wooden_pressure_plate");
|
||||
REDSTONE_ORE = getRegisteredBlock("redstone_ore");
|
||||
LIT_REDSTONE_ORE = getRegisteredBlock("lit_redstone_ore");
|
||||
UNLIT_REDSTONE_TORCH = getRegisteredBlock("unlit_redstone_torch");
|
||||
REDSTONE_TORCH = getRegisteredBlock("redstone_torch");
|
||||
STONE_BUTTON = getRegisteredBlock("stone_button");
|
||||
SNOW_LAYER = getRegisteredBlock("snow_layer");
|
||||
ICE = getRegisteredBlock("ice");
|
||||
SNOW = getRegisteredBlock("snow");
|
||||
CACTUS = (BlockCactus)getRegisteredBlock("cactus");
|
||||
CLAY = getRegisteredBlock("clay");
|
||||
REEDS = (BlockReed)getRegisteredBlock("reeds");
|
||||
JUKEBOX = getRegisteredBlock("jukebox");
|
||||
OAK_FENCE = getRegisteredBlock("fence");
|
||||
SPRUCE_FENCE = getRegisteredBlock("spruce_fence");
|
||||
BIRCH_FENCE = getRegisteredBlock("birch_fence");
|
||||
JUNGLE_FENCE = getRegisteredBlock("jungle_fence");
|
||||
DARK_OAK_FENCE = getRegisteredBlock("dark_oak_fence");
|
||||
ACACIA_FENCE = getRegisteredBlock("acacia_fence");
|
||||
PUMPKIN = getRegisteredBlock("pumpkin");
|
||||
NETHERRACK = getRegisteredBlock("netherrack");
|
||||
SOUL_SAND = getRegisteredBlock("soul_sand");
|
||||
GLOWSTONE = getRegisteredBlock("glowstone");
|
||||
PORTAL = (BlockPortal)getRegisteredBlock("portal");
|
||||
LIT_PUMPKIN = getRegisteredBlock("lit_pumpkin");
|
||||
CAKE = getRegisteredBlock("cake");
|
||||
UNPOWERED_REPEATER = (BlockRedstoneRepeater)getRegisteredBlock("unpowered_repeater");
|
||||
POWERED_REPEATER = (BlockRedstoneRepeater)getRegisteredBlock("powered_repeater");
|
||||
TRAPDOOR = getRegisteredBlock("trapdoor");
|
||||
MONSTER_EGG = getRegisteredBlock("monster_egg");
|
||||
STONEBRICK = getRegisteredBlock("stonebrick");
|
||||
BROWN_MUSHROOM_BLOCK = getRegisteredBlock("brown_mushroom_block");
|
||||
RED_MUSHROOM_BLOCK = getRegisteredBlock("red_mushroom_block");
|
||||
IRON_BARS = getRegisteredBlock("iron_bars");
|
||||
GLASS_PANE = getRegisteredBlock("glass_pane");
|
||||
MELON_BLOCK = getRegisteredBlock("melon_block");
|
||||
PUMPKIN_STEM = getRegisteredBlock("pumpkin_stem");
|
||||
MELON_STEM = getRegisteredBlock("melon_stem");
|
||||
VINE = getRegisteredBlock("vine");
|
||||
OAK_FENCE_GATE = getRegisteredBlock("fence_gate");
|
||||
SPRUCE_FENCE_GATE = getRegisteredBlock("spruce_fence_gate");
|
||||
BIRCH_FENCE_GATE = getRegisteredBlock("birch_fence_gate");
|
||||
JUNGLE_FENCE_GATE = getRegisteredBlock("jungle_fence_gate");
|
||||
DARK_OAK_FENCE_GATE = getRegisteredBlock("dark_oak_fence_gate");
|
||||
ACACIA_FENCE_GATE = getRegisteredBlock("acacia_fence_gate");
|
||||
BRICK_STAIRS = getRegisteredBlock("brick_stairs");
|
||||
STONE_BRICK_STAIRS = getRegisteredBlock("stone_brick_stairs");
|
||||
MYCELIUM = (BlockMycelium)getRegisteredBlock("mycelium");
|
||||
WATERLILY = getRegisteredBlock("waterlily");
|
||||
NETHER_BRICK = getRegisteredBlock("nether_brick");
|
||||
NETHER_BRICK_FENCE = getRegisteredBlock("nether_brick_fence");
|
||||
NETHER_BRICK_STAIRS = getRegisteredBlock("nether_brick_stairs");
|
||||
NETHER_WART = getRegisteredBlock("nether_wart");
|
||||
ENCHANTING_TABLE = getRegisteredBlock("enchanting_table");
|
||||
BREWING_STAND = getRegisteredBlock("brewing_stand");
|
||||
CAULDRON = (BlockCauldron)getRegisteredBlock("cauldron");
|
||||
END_PORTAL = getRegisteredBlock("end_portal");
|
||||
END_PORTAL_FRAME = getRegisteredBlock("end_portal_frame");
|
||||
END_STONE = getRegisteredBlock("end_stone");
|
||||
DRAGON_EGG = getRegisteredBlock("dragon_egg");
|
||||
REDSTONE_LAMP = getRegisteredBlock("redstone_lamp");
|
||||
LIT_REDSTONE_LAMP = getRegisteredBlock("lit_redstone_lamp");
|
||||
DOUBLE_WOODEN_SLAB = (BlockSlab)getRegisteredBlock("double_wooden_slab");
|
||||
WOODEN_SLAB = (BlockSlab)getRegisteredBlock("wooden_slab");
|
||||
COCOA = getRegisteredBlock("cocoa");
|
||||
SANDSTONE_STAIRS = getRegisteredBlock("sandstone_stairs");
|
||||
EMERALD_ORE = getRegisteredBlock("emerald_ore");
|
||||
ENDER_CHEST = getRegisteredBlock("ender_chest");
|
||||
TRIPWIRE_HOOK = (BlockTripWireHook)getRegisteredBlock("tripwire_hook");
|
||||
TRIPWIRE = getRegisteredBlock("tripwire");
|
||||
EMERALD_BLOCK = getRegisteredBlock("emerald_block");
|
||||
SPRUCE_STAIRS = getRegisteredBlock("spruce_stairs");
|
||||
BIRCH_STAIRS = getRegisteredBlock("birch_stairs");
|
||||
JUNGLE_STAIRS = getRegisteredBlock("jungle_stairs");
|
||||
COMMAND_BLOCK = getRegisteredBlock("command_block");
|
||||
BEACON = (BlockBeacon)getRegisteredBlock("beacon");
|
||||
COBBLESTONE_WALL = getRegisteredBlock("cobblestone_wall");
|
||||
FLOWER_POT = getRegisteredBlock("flower_pot");
|
||||
CARROTS = getRegisteredBlock("carrots");
|
||||
POTATOES = getRegisteredBlock("potatoes");
|
||||
WOODEN_BUTTON = getRegisteredBlock("wooden_button");
|
||||
SKULL = (BlockSkull)getRegisteredBlock("skull");
|
||||
ANVIL = getRegisteredBlock("anvil");
|
||||
TRAPPED_CHEST = getRegisteredBlock("trapped_chest");
|
||||
LIGHT_WEIGHTED_PRESSURE_PLATE = getRegisteredBlock("light_weighted_pressure_plate");
|
||||
HEAVY_WEIGHTED_PRESSURE_PLATE = getRegisteredBlock("heavy_weighted_pressure_plate");
|
||||
UNPOWERED_COMPARATOR = (BlockRedstoneComparator)getRegisteredBlock("unpowered_comparator");
|
||||
POWERED_COMPARATOR = (BlockRedstoneComparator)getRegisteredBlock("powered_comparator");
|
||||
DAYLIGHT_DETECTOR = (BlockDaylightDetector)getRegisteredBlock("daylight_detector");
|
||||
DAYLIGHT_DETECTOR_INVERTED = (BlockDaylightDetector)getRegisteredBlock("daylight_detector_inverted");
|
||||
REDSTONE_BLOCK = getRegisteredBlock("redstone_block");
|
||||
QUARTZ_ORE = getRegisteredBlock("quartz_ore");
|
||||
HOPPER = (BlockHopper)getRegisteredBlock("hopper");
|
||||
QUARTZ_BLOCK = getRegisteredBlock("quartz_block");
|
||||
QUARTZ_STAIRS = getRegisteredBlock("quartz_stairs");
|
||||
ACTIVATOR_RAIL = getRegisteredBlock("activator_rail");
|
||||
DROPPER = getRegisteredBlock("dropper");
|
||||
STAINED_HARDENED_CLAY = getRegisteredBlock("stained_hardened_clay");
|
||||
BARRIER = getRegisteredBlock("barrier");
|
||||
IRON_TRAPDOOR = getRegisteredBlock("iron_trapdoor");
|
||||
HAY_BLOCK = getRegisteredBlock("hay_block");
|
||||
CARPET = getRegisteredBlock("carpet");
|
||||
HARDENED_CLAY = getRegisteredBlock("hardened_clay");
|
||||
COAL_BLOCK = getRegisteredBlock("coal_block");
|
||||
PACKED_ICE = getRegisteredBlock("packed_ice");
|
||||
ACACIA_STAIRS = getRegisteredBlock("acacia_stairs");
|
||||
DARK_OAK_STAIRS = getRegisteredBlock("dark_oak_stairs");
|
||||
SLIME_BLOCK = getRegisteredBlock("slime");
|
||||
DOUBLE_PLANT = (BlockDoublePlant)getRegisteredBlock("double_plant");
|
||||
STAINED_GLASS = (BlockStainedGlass)getRegisteredBlock("stained_glass");
|
||||
STAINED_GLASS_PANE = (BlockStainedGlassPane)getRegisteredBlock("stained_glass_pane");
|
||||
PRISMARINE = getRegisteredBlock("prismarine");
|
||||
SEA_LANTERN = getRegisteredBlock("sea_lantern");
|
||||
STANDING_BANNER = getRegisteredBlock("standing_banner");
|
||||
WALL_BANNER = getRegisteredBlock("wall_banner");
|
||||
RED_SANDSTONE = getRegisteredBlock("red_sandstone");
|
||||
RED_SANDSTONE_STAIRS = getRegisteredBlock("red_sandstone_stairs");
|
||||
DOUBLE_STONE_SLAB2 = (BlockSlab)getRegisteredBlock("double_stone_slab2");
|
||||
STONE_SLAB2 = (BlockSlab)getRegisteredBlock("stone_slab2");
|
||||
END_ROD = getRegisteredBlock("end_rod");
|
||||
CHORUS_PLANT = getRegisteredBlock("chorus_plant");
|
||||
CHORUS_FLOWER = getRegisteredBlock("chorus_flower");
|
||||
PURPUR_BLOCK = getRegisteredBlock("purpur_block");
|
||||
PURPUR_PILLAR = getRegisteredBlock("purpur_pillar");
|
||||
PURPUR_STAIRS = getRegisteredBlock("purpur_stairs");
|
||||
PURPUR_DOUBLE_SLAB = (BlockSlab)getRegisteredBlock("purpur_double_slab");
|
||||
PURPUR_SLAB = (BlockSlab)getRegisteredBlock("purpur_slab");
|
||||
END_BRICKS = getRegisteredBlock("end_bricks");
|
||||
BEETROOTS = getRegisteredBlock("beetroots");
|
||||
GRASS_PATH = getRegisteredBlock("grass_path");
|
||||
END_GATEWAY = getRegisteredBlock("end_gateway");
|
||||
REPEATING_COMMAND_BLOCK = getRegisteredBlock("repeating_command_block");
|
||||
CHAIN_COMMAND_BLOCK = getRegisteredBlock("chain_command_block");
|
||||
FROSTED_ICE = getRegisteredBlock("frosted_ice");
|
||||
MAGMA = getRegisteredBlock("magma");
|
||||
NETHER_WART_BLOCK = getRegisteredBlock("nether_wart_block");
|
||||
RED_NETHER_BRICK = getRegisteredBlock("red_nether_brick");
|
||||
BONE_BLOCK = getRegisteredBlock("bone_block");
|
||||
STRUCTURE_VOID = getRegisteredBlock("structure_void");
|
||||
OBSERVER = getRegisteredBlock("observer");
|
||||
WHITE_SHULKER_BOX = getRegisteredBlock("white_shulker_box");
|
||||
ORANGE_SHULKER_BOX = getRegisteredBlock("orange_shulker_box");
|
||||
MAGENTA_SHULKER_BOX = getRegisteredBlock("magenta_shulker_box");
|
||||
LIGHT_BLUE_SHULKER_BOX = getRegisteredBlock("light_blue_shulker_box");
|
||||
YELLOW_SHULKER_BOX = getRegisteredBlock("yellow_shulker_box");
|
||||
LIME_SHULKER_BOX = getRegisteredBlock("lime_shulker_box");
|
||||
PINK_SHULKER_BOX = getRegisteredBlock("pink_shulker_box");
|
||||
GRAY_SHULKER_BOX = getRegisteredBlock("gray_shulker_box");
|
||||
SILVER_SHULKER_BOX = getRegisteredBlock("silver_shulker_box");
|
||||
CYAN_SHULKER_BOX = getRegisteredBlock("cyan_shulker_box");
|
||||
PURPLE_SHULKER_BOX = getRegisteredBlock("purple_shulker_box");
|
||||
BLUE_SHULKER_BOX = getRegisteredBlock("blue_shulker_box");
|
||||
BROWN_SHULKER_BOX = getRegisteredBlock("brown_shulker_box");
|
||||
GREEN_SHULKER_BOX = getRegisteredBlock("green_shulker_box");
|
||||
RED_SHULKER_BOX = getRegisteredBlock("red_shulker_box");
|
||||
BLACK_SHULKER_BOX = getRegisteredBlock("black_shulker_box");
|
||||
WHITE_GLAZED_TERRACOTTA = getRegisteredBlock("white_glazed_terracotta");
|
||||
ORANGE_GLAZED_TERRACOTTA = getRegisteredBlock("orange_glazed_terracotta");
|
||||
MAGENTA_GLAZED_TERRACOTTA = getRegisteredBlock("magenta_glazed_terracotta");
|
||||
LIGHT_BLUE_GLAZED_TERRACOTTA = getRegisteredBlock("light_blue_glazed_terracotta");
|
||||
YELLOW_GLAZED_TERRACOTTA = getRegisteredBlock("yellow_glazed_terracotta");
|
||||
LIME_GLAZED_TERRACOTTA = getRegisteredBlock("lime_glazed_terracotta");
|
||||
PINK_GLAZED_TERRACOTTA = getRegisteredBlock("pink_glazed_terracotta");
|
||||
GRAY_GLAZED_TERRACOTTA = getRegisteredBlock("gray_glazed_terracotta");
|
||||
SILVER_GLAZED_TERRACOTTA = getRegisteredBlock("silver_glazed_terracotta");
|
||||
CYAN_GLAZED_TERRACOTTA = getRegisteredBlock("cyan_glazed_terracotta");
|
||||
PURPLE_GLAZED_TERRACOTTA = getRegisteredBlock("purple_glazed_terracotta");
|
||||
BLUE_GLAZED_TERRACOTTA = getRegisteredBlock("blue_glazed_terracotta");
|
||||
BROWN_GLAZED_TERRACOTTA = getRegisteredBlock("brown_glazed_terracotta");
|
||||
GREEN_GLAZED_TERRACOTTA = getRegisteredBlock("green_glazed_terracotta");
|
||||
RED_GLAZED_TERRACOTTA = getRegisteredBlock("red_glazed_terracotta");
|
||||
BLACK_GLAZED_TERRACOTTA = getRegisteredBlock("black_glazed_terracotta");
|
||||
CONCRETE = getRegisteredBlock("concrete");
|
||||
CONCRETE_POWDER = getRegisteredBlock("concrete_powder");
|
||||
STRUCTURE_BLOCK = getRegisteredBlock("structure_block");
|
||||
CACHE.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
741
build/tmp/recompileMc/sources/net/minecraft/init/Bootstrap.java
Normal file
741
build/tmp/recompileMc/sources/net/minecraft/init/Bootstrap.java
Normal file
@@ -0,0 +1,741 @@
|
||||
package net.minecraft.init;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import java.io.File;
|
||||
import java.io.PrintStream;
|
||||
import java.util.Random;
|
||||
import java.util.UUID;
|
||||
import net.minecraft.advancements.AdvancementManager;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockDispenser;
|
||||
import net.minecraft.block.BlockFire;
|
||||
import net.minecraft.block.BlockLiquid;
|
||||
import net.minecraft.block.BlockPumpkin;
|
||||
import net.minecraft.block.BlockShulkerBox;
|
||||
import net.minecraft.block.BlockSkull;
|
||||
import net.minecraft.block.BlockTNT;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.dispenser.BehaviorDefaultDispenseItem;
|
||||
import net.minecraft.dispenser.BehaviorProjectileDispense;
|
||||
import net.minecraft.dispenser.IBehaviorDispenseItem;
|
||||
import net.minecraft.dispenser.IBlockSource;
|
||||
import net.minecraft.dispenser.IPosition;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityList;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.IProjectile;
|
||||
import net.minecraft.entity.item.EntityBoat;
|
||||
import net.minecraft.entity.item.EntityExpBottle;
|
||||
import net.minecraft.entity.item.EntityFireworkRocket;
|
||||
import net.minecraft.entity.item.EntityTNTPrimed;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.entity.projectile.EntityArrow;
|
||||
import net.minecraft.entity.projectile.EntityEgg;
|
||||
import net.minecraft.entity.projectile.EntityPotion;
|
||||
import net.minecraft.entity.projectile.EntitySmallFireball;
|
||||
import net.minecraft.entity.projectile.EntitySnowball;
|
||||
import net.minecraft.entity.projectile.EntitySpectralArrow;
|
||||
import net.minecraft.entity.projectile.EntityTippedArrow;
|
||||
import net.minecraft.item.EnumDyeColor;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
import net.minecraft.item.ItemBucket;
|
||||
import net.minecraft.item.ItemDye;
|
||||
import net.minecraft.item.ItemMonsterPlacer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.CraftingManager;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTUtil;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionHelper;
|
||||
import net.minecraft.potion.PotionType;
|
||||
import net.minecraft.server.DebugLoggingPrintStream;
|
||||
import net.minecraft.stats.StatList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.tileentity.TileEntityDispenser;
|
||||
import net.minecraft.tileentity.TileEntityShulkerBox;
|
||||
import net.minecraft.tileentity.TileEntitySkull;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.LoggingPrintStream;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.util.SoundEvent;
|
||||
import net.minecraft.util.StringUtils;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraft.world.storage.loot.LootTableList;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
public class Bootstrap
|
||||
{
|
||||
public static final PrintStream SYSOUT = System.out;
|
||||
/** Whether the blocks, items, etc have already been registered */
|
||||
private static boolean alreadyRegistered;
|
||||
public static boolean hasErrored;
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
|
||||
/**
|
||||
* Is Bootstrap registration already done?
|
||||
*/
|
||||
public static boolean isRegistered()
|
||||
{
|
||||
return alreadyRegistered;
|
||||
}
|
||||
|
||||
static void registerDispenserBehaviors()
|
||||
{
|
||||
BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(Items.ARROW, new BehaviorProjectileDispense()
|
||||
{
|
||||
/**
|
||||
* Return the projectile entity spawned by this dispense behavior.
|
||||
*/
|
||||
protected IProjectile getProjectileEntity(World worldIn, IPosition position, ItemStack stackIn)
|
||||
{
|
||||
EntityTippedArrow entitytippedarrow = new EntityTippedArrow(worldIn, position.getX(), position.getY(), position.getZ());
|
||||
entitytippedarrow.pickupStatus = EntityArrow.PickupStatus.ALLOWED;
|
||||
return entitytippedarrow;
|
||||
}
|
||||
});
|
||||
BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(Items.TIPPED_ARROW, new BehaviorProjectileDispense()
|
||||
{
|
||||
/**
|
||||
* Return the projectile entity spawned by this dispense behavior.
|
||||
*/
|
||||
protected IProjectile getProjectileEntity(World worldIn, IPosition position, ItemStack stackIn)
|
||||
{
|
||||
EntityTippedArrow entitytippedarrow = new EntityTippedArrow(worldIn, position.getX(), position.getY(), position.getZ());
|
||||
entitytippedarrow.setPotionEffect(stackIn);
|
||||
entitytippedarrow.pickupStatus = EntityArrow.PickupStatus.ALLOWED;
|
||||
return entitytippedarrow;
|
||||
}
|
||||
});
|
||||
BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(Items.SPECTRAL_ARROW, new BehaviorProjectileDispense()
|
||||
{
|
||||
/**
|
||||
* Return the projectile entity spawned by this dispense behavior.
|
||||
*/
|
||||
protected IProjectile getProjectileEntity(World worldIn, IPosition position, ItemStack stackIn)
|
||||
{
|
||||
EntityArrow entityarrow = new EntitySpectralArrow(worldIn, position.getX(), position.getY(), position.getZ());
|
||||
entityarrow.pickupStatus = EntityArrow.PickupStatus.ALLOWED;
|
||||
return entityarrow;
|
||||
}
|
||||
});
|
||||
BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(Items.EGG, new BehaviorProjectileDispense()
|
||||
{
|
||||
/**
|
||||
* Return the projectile entity spawned by this dispense behavior.
|
||||
*/
|
||||
protected IProjectile getProjectileEntity(World worldIn, IPosition position, ItemStack stackIn)
|
||||
{
|
||||
return new EntityEgg(worldIn, position.getX(), position.getY(), position.getZ());
|
||||
}
|
||||
});
|
||||
BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(Items.SNOWBALL, new BehaviorProjectileDispense()
|
||||
{
|
||||
/**
|
||||
* Return the projectile entity spawned by this dispense behavior.
|
||||
*/
|
||||
protected IProjectile getProjectileEntity(World worldIn, IPosition position, ItemStack stackIn)
|
||||
{
|
||||
return new EntitySnowball(worldIn, position.getX(), position.getY(), position.getZ());
|
||||
}
|
||||
});
|
||||
BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(Items.EXPERIENCE_BOTTLE, new BehaviorProjectileDispense()
|
||||
{
|
||||
/**
|
||||
* Return the projectile entity spawned by this dispense behavior.
|
||||
*/
|
||||
protected IProjectile getProjectileEntity(World worldIn, IPosition position, ItemStack stackIn)
|
||||
{
|
||||
return new EntityExpBottle(worldIn, position.getX(), position.getY(), position.getZ());
|
||||
}
|
||||
protected float getProjectileInaccuracy()
|
||||
{
|
||||
return super.getProjectileInaccuracy() * 0.5F;
|
||||
}
|
||||
protected float getProjectileVelocity()
|
||||
{
|
||||
return super.getProjectileVelocity() * 1.25F;
|
||||
}
|
||||
});
|
||||
BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(Items.SPLASH_POTION, new IBehaviorDispenseItem()
|
||||
{
|
||||
/**
|
||||
* Dispenses the specified ItemStack from a dispenser.
|
||||
*/
|
||||
public ItemStack dispense(IBlockSource source, final ItemStack stack)
|
||||
{
|
||||
return (new BehaviorProjectileDispense()
|
||||
{
|
||||
/**
|
||||
* Return the projectile entity spawned by this dispense behavior.
|
||||
*/
|
||||
protected IProjectile getProjectileEntity(World worldIn, IPosition position, ItemStack stackIn)
|
||||
{
|
||||
return new EntityPotion(worldIn, position.getX(), position.getY(), position.getZ(), stack.copy());
|
||||
}
|
||||
protected float getProjectileInaccuracy()
|
||||
{
|
||||
return super.getProjectileInaccuracy() * 0.5F;
|
||||
}
|
||||
protected float getProjectileVelocity()
|
||||
{
|
||||
return super.getProjectileVelocity() * 1.25F;
|
||||
}
|
||||
}).dispense(source, stack);
|
||||
}
|
||||
});
|
||||
BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(Items.LINGERING_POTION, new IBehaviorDispenseItem()
|
||||
{
|
||||
/**
|
||||
* Dispenses the specified ItemStack from a dispenser.
|
||||
*/
|
||||
public ItemStack dispense(IBlockSource source, final ItemStack stack)
|
||||
{
|
||||
return (new BehaviorProjectileDispense()
|
||||
{
|
||||
/**
|
||||
* Return the projectile entity spawned by this dispense behavior.
|
||||
*/
|
||||
protected IProjectile getProjectileEntity(World worldIn, IPosition position, ItemStack stackIn)
|
||||
{
|
||||
return new EntityPotion(worldIn, position.getX(), position.getY(), position.getZ(), stack.copy());
|
||||
}
|
||||
protected float getProjectileInaccuracy()
|
||||
{
|
||||
return super.getProjectileInaccuracy() * 0.5F;
|
||||
}
|
||||
protected float getProjectileVelocity()
|
||||
{
|
||||
return super.getProjectileVelocity() * 1.25F;
|
||||
}
|
||||
}).dispense(source, stack);
|
||||
}
|
||||
});
|
||||
BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(Items.SPAWN_EGG, new BehaviorDefaultDispenseItem()
|
||||
{
|
||||
/**
|
||||
* Dispense the specified stack, play the dispense sound and spawn particles.
|
||||
*/
|
||||
public ItemStack dispenseStack(IBlockSource source, ItemStack stack)
|
||||
{
|
||||
EnumFacing enumfacing = (EnumFacing)source.getBlockState().getValue(BlockDispenser.FACING);
|
||||
double d0 = source.getX() + (double)enumfacing.getFrontOffsetX();
|
||||
double d1 = (double)((float)(source.getBlockPos().getY() + enumfacing.getFrontOffsetY()) + 0.2F);
|
||||
double d2 = source.getZ() + (double)enumfacing.getFrontOffsetZ();
|
||||
Entity entity = ItemMonsterPlacer.spawnCreature(source.getWorld(), ItemMonsterPlacer.getNamedIdFrom(stack), d0, d1, d2);
|
||||
|
||||
if (entity instanceof EntityLivingBase && stack.hasDisplayName())
|
||||
{
|
||||
entity.setCustomNameTag(stack.getDisplayName());
|
||||
}
|
||||
|
||||
ItemMonsterPlacer.applyItemEntityDataToEntity(source.getWorld(), (EntityPlayer)null, stack, entity);
|
||||
stack.shrink(1);
|
||||
return stack;
|
||||
}
|
||||
});
|
||||
BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(Items.FIREWORKS, new BehaviorDefaultDispenseItem()
|
||||
{
|
||||
/**
|
||||
* Dispense the specified stack, play the dispense sound and spawn particles.
|
||||
*/
|
||||
public ItemStack dispenseStack(IBlockSource source, ItemStack stack)
|
||||
{
|
||||
EnumFacing enumfacing = (EnumFacing)source.getBlockState().getValue(BlockDispenser.FACING);
|
||||
double d0 = source.getX() + (double)enumfacing.getFrontOffsetX();
|
||||
double d1 = (double)((float)source.getBlockPos().getY() + 0.2F);
|
||||
double d2 = source.getZ() + (double)enumfacing.getFrontOffsetZ();
|
||||
EntityFireworkRocket entityfireworkrocket = new EntityFireworkRocket(source.getWorld(), d0, d1, d2, stack);
|
||||
source.getWorld().spawnEntity(entityfireworkrocket);
|
||||
stack.shrink(1);
|
||||
return stack;
|
||||
}
|
||||
/**
|
||||
* Play the dispense sound from the specified block.
|
||||
*/
|
||||
protected void playDispenseSound(IBlockSource source)
|
||||
{
|
||||
source.getWorld().playEvent(1004, source.getBlockPos(), 0);
|
||||
}
|
||||
});
|
||||
BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(Items.FIRE_CHARGE, new BehaviorDefaultDispenseItem()
|
||||
{
|
||||
/**
|
||||
* Dispense the specified stack, play the dispense sound and spawn particles.
|
||||
*/
|
||||
public ItemStack dispenseStack(IBlockSource source, ItemStack stack)
|
||||
{
|
||||
EnumFacing enumfacing = (EnumFacing)source.getBlockState().getValue(BlockDispenser.FACING);
|
||||
IPosition iposition = BlockDispenser.getDispensePosition(source);
|
||||
double d0 = iposition.getX() + (double)((float)enumfacing.getFrontOffsetX() * 0.3F);
|
||||
double d1 = iposition.getY() + (double)((float)enumfacing.getFrontOffsetY() * 0.3F);
|
||||
double d2 = iposition.getZ() + (double)((float)enumfacing.getFrontOffsetZ() * 0.3F);
|
||||
World world = source.getWorld();
|
||||
Random random = world.rand;
|
||||
double d3 = random.nextGaussian() * 0.05D + (double)enumfacing.getFrontOffsetX();
|
||||
double d4 = random.nextGaussian() * 0.05D + (double)enumfacing.getFrontOffsetY();
|
||||
double d5 = random.nextGaussian() * 0.05D + (double)enumfacing.getFrontOffsetZ();
|
||||
world.spawnEntity(new EntitySmallFireball(world, d0, d1, d2, d3, d4, d5));
|
||||
stack.shrink(1);
|
||||
return stack;
|
||||
}
|
||||
/**
|
||||
* Play the dispense sound from the specified block.
|
||||
*/
|
||||
protected void playDispenseSound(IBlockSource source)
|
||||
{
|
||||
source.getWorld().playEvent(1018, source.getBlockPos(), 0);
|
||||
}
|
||||
});
|
||||
BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(Items.BOAT, new Bootstrap.BehaviorDispenseBoat(EntityBoat.Type.OAK));
|
||||
BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(Items.SPRUCE_BOAT, new Bootstrap.BehaviorDispenseBoat(EntityBoat.Type.SPRUCE));
|
||||
BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(Items.BIRCH_BOAT, new Bootstrap.BehaviorDispenseBoat(EntityBoat.Type.BIRCH));
|
||||
BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(Items.JUNGLE_BOAT, new Bootstrap.BehaviorDispenseBoat(EntityBoat.Type.JUNGLE));
|
||||
BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(Items.DARK_OAK_BOAT, new Bootstrap.BehaviorDispenseBoat(EntityBoat.Type.DARK_OAK));
|
||||
BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(Items.ACACIA_BOAT, new Bootstrap.BehaviorDispenseBoat(EntityBoat.Type.ACACIA));
|
||||
IBehaviorDispenseItem ibehaviordispenseitem = new BehaviorDefaultDispenseItem()
|
||||
{
|
||||
private final BehaviorDefaultDispenseItem dispenseBehavior = new BehaviorDefaultDispenseItem();
|
||||
/**
|
||||
* Dispense the specified stack, play the dispense sound and spawn particles.
|
||||
*/
|
||||
public ItemStack dispenseStack(IBlockSource source, ItemStack stack)
|
||||
{
|
||||
ItemBucket itembucket = (ItemBucket)stack.getItem();
|
||||
BlockPos blockpos = source.getBlockPos().offset((EnumFacing)source.getBlockState().getValue(BlockDispenser.FACING));
|
||||
return itembucket.tryPlaceContainedLiquid((EntityPlayer)null, source.getWorld(), blockpos) ? new ItemStack(Items.BUCKET) : this.dispenseBehavior.dispense(source, stack);
|
||||
}
|
||||
};
|
||||
BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(Items.LAVA_BUCKET, ibehaviordispenseitem);
|
||||
BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(Items.WATER_BUCKET, ibehaviordispenseitem);
|
||||
BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(Items.MILK_BUCKET, net.minecraftforge.fluids.DispenseFluidContainer.getInstance());
|
||||
BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(Items.BUCKET, net.minecraftforge.fluids.DispenseFluidContainer.getInstance());
|
||||
if (false)
|
||||
BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(Items.BUCKET, new BehaviorDefaultDispenseItem()
|
||||
{
|
||||
private final BehaviorDefaultDispenseItem dispenseBehavior = new BehaviorDefaultDispenseItem();
|
||||
/**
|
||||
* Dispense the specified stack, play the dispense sound and spawn particles.
|
||||
*/
|
||||
public ItemStack dispenseStack(IBlockSource source, ItemStack stack)
|
||||
{
|
||||
World world = source.getWorld();
|
||||
BlockPos blockpos = source.getBlockPos().offset((EnumFacing)source.getBlockState().getValue(BlockDispenser.FACING));
|
||||
IBlockState iblockstate = world.getBlockState(blockpos);
|
||||
Block block = iblockstate.getBlock();
|
||||
Material material = iblockstate.getMaterial();
|
||||
Item item;
|
||||
|
||||
if (Material.WATER.equals(material) && block instanceof BlockLiquid && ((Integer)iblockstate.getValue(BlockLiquid.LEVEL)).intValue() == 0)
|
||||
{
|
||||
item = Items.WATER_BUCKET;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!Material.LAVA.equals(material) || !(block instanceof BlockLiquid) || ((Integer)iblockstate.getValue(BlockLiquid.LEVEL)).intValue() != 0)
|
||||
{
|
||||
return super.dispenseStack(source, stack);
|
||||
}
|
||||
|
||||
item = Items.LAVA_BUCKET;
|
||||
}
|
||||
|
||||
world.setBlockToAir(blockpos);
|
||||
stack.shrink(1);
|
||||
|
||||
if (stack.isEmpty())
|
||||
{
|
||||
return new ItemStack(item);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (((TileEntityDispenser)source.getBlockTileEntity()).addItemStack(new ItemStack(item)) < 0)
|
||||
{
|
||||
this.dispenseBehavior.dispense(source, new ItemStack(item));
|
||||
}
|
||||
|
||||
return stack;
|
||||
}
|
||||
}
|
||||
});
|
||||
BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(Items.FLINT_AND_STEEL, new Bootstrap.BehaviorDispenseOptional()
|
||||
{
|
||||
/**
|
||||
* Dispense the specified stack, play the dispense sound and spawn particles.
|
||||
*/
|
||||
protected ItemStack dispenseStack(IBlockSource source, ItemStack stack)
|
||||
{
|
||||
World world = source.getWorld();
|
||||
this.successful = true;
|
||||
BlockPos blockpos = source.getBlockPos().offset((EnumFacing)source.getBlockState().getValue(BlockDispenser.FACING));
|
||||
|
||||
if (world.isAirBlock(blockpos))
|
||||
{
|
||||
world.setBlockState(blockpos, Blocks.FIRE.getDefaultState());
|
||||
|
||||
if (stack.attemptDamageItem(1, world.rand, (EntityPlayerMP)null))
|
||||
{
|
||||
stack.setCount(0);
|
||||
}
|
||||
}
|
||||
else if (world.getBlockState(blockpos).getBlock() == Blocks.TNT)
|
||||
{
|
||||
Blocks.TNT.onBlockDestroyedByPlayer(world, blockpos, Blocks.TNT.getDefaultState().withProperty(BlockTNT.EXPLODE, Boolean.valueOf(true)));
|
||||
world.setBlockToAir(blockpos);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.successful = false;
|
||||
}
|
||||
|
||||
return stack;
|
||||
}
|
||||
});
|
||||
BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(Items.DYE, new Bootstrap.BehaviorDispenseOptional()
|
||||
{
|
||||
/**
|
||||
* Dispense the specified stack, play the dispense sound and spawn particles.
|
||||
*/
|
||||
protected ItemStack dispenseStack(IBlockSource source, ItemStack stack)
|
||||
{
|
||||
this.successful = true;
|
||||
|
||||
if (EnumDyeColor.WHITE == EnumDyeColor.byDyeDamage(stack.getMetadata()))
|
||||
{
|
||||
World world = source.getWorld();
|
||||
BlockPos blockpos = source.getBlockPos().offset((EnumFacing)source.getBlockState().getValue(BlockDispenser.FACING));
|
||||
|
||||
if (ItemDye.applyBonemeal(stack, world, blockpos))
|
||||
{
|
||||
if (!world.isRemote)
|
||||
{
|
||||
world.playEvent(2005, blockpos, 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.successful = false;
|
||||
}
|
||||
|
||||
return stack;
|
||||
}
|
||||
else
|
||||
{
|
||||
return super.dispenseStack(source, stack);
|
||||
}
|
||||
}
|
||||
});
|
||||
BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(Item.getItemFromBlock(Blocks.TNT), new BehaviorDefaultDispenseItem()
|
||||
{
|
||||
/**
|
||||
* Dispense the specified stack, play the dispense sound and spawn particles.
|
||||
*/
|
||||
protected ItemStack dispenseStack(IBlockSource source, ItemStack stack)
|
||||
{
|
||||
World world = source.getWorld();
|
||||
BlockPos blockpos = source.getBlockPos().offset((EnumFacing)source.getBlockState().getValue(BlockDispenser.FACING));
|
||||
EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, (double)blockpos.getX() + 0.5D, (double)blockpos.getY(), (double)blockpos.getZ() + 0.5D, (EntityLivingBase)null);
|
||||
world.spawnEntity(entitytntprimed);
|
||||
world.playSound((EntityPlayer)null, entitytntprimed.posX, entitytntprimed.posY, entitytntprimed.posZ, SoundEvents.ENTITY_TNT_PRIMED, SoundCategory.BLOCKS, 1.0F, 1.0F);
|
||||
stack.shrink(1);
|
||||
return stack;
|
||||
}
|
||||
});
|
||||
BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(Items.SKULL, new Bootstrap.BehaviorDispenseOptional()
|
||||
{
|
||||
/**
|
||||
* Dispense the specified stack, play the dispense sound and spawn particles.
|
||||
*/
|
||||
protected ItemStack dispenseStack(IBlockSource source, ItemStack stack)
|
||||
{
|
||||
World world = source.getWorld();
|
||||
EnumFacing enumfacing = (EnumFacing)source.getBlockState().getValue(BlockDispenser.FACING);
|
||||
BlockPos blockpos = source.getBlockPos().offset(enumfacing);
|
||||
BlockSkull blockskull = Blocks.SKULL;
|
||||
this.successful = true;
|
||||
|
||||
if (world.isAirBlock(blockpos) && blockskull.canDispenserPlace(world, blockpos, stack))
|
||||
{
|
||||
if (!world.isRemote)
|
||||
{
|
||||
world.setBlockState(blockpos, blockskull.getDefaultState().withProperty(BlockSkull.FACING, EnumFacing.UP), 3);
|
||||
TileEntity tileentity = world.getTileEntity(blockpos);
|
||||
|
||||
if (tileentity instanceof TileEntitySkull)
|
||||
{
|
||||
if (stack.getMetadata() == 3)
|
||||
{
|
||||
GameProfile gameprofile = null;
|
||||
|
||||
if (stack.hasTagCompound())
|
||||
{
|
||||
NBTTagCompound nbttagcompound = stack.getTagCompound();
|
||||
|
||||
if (nbttagcompound.hasKey("SkullOwner", 10))
|
||||
{
|
||||
gameprofile = NBTUtil.readGameProfileFromNBT(nbttagcompound.getCompoundTag("SkullOwner"));
|
||||
}
|
||||
else if (nbttagcompound.hasKey("SkullOwner", 8))
|
||||
{
|
||||
String s = nbttagcompound.getString("SkullOwner");
|
||||
|
||||
if (!StringUtils.isNullOrEmpty(s))
|
||||
{
|
||||
gameprofile = new GameProfile((UUID)null, s);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
((TileEntitySkull)tileentity).setPlayerProfile(gameprofile);
|
||||
}
|
||||
else
|
||||
{
|
||||
((TileEntitySkull)tileentity).setType(stack.getMetadata());
|
||||
}
|
||||
|
||||
((TileEntitySkull)tileentity).setSkullRotation(enumfacing.getOpposite().getHorizontalIndex() * 4);
|
||||
Blocks.SKULL.checkWitherSpawn(world, blockpos, (TileEntitySkull)tileentity);
|
||||
}
|
||||
|
||||
stack.shrink(1);
|
||||
}
|
||||
}
|
||||
else if (ItemArmor.dispenseArmor(source, stack).isEmpty())
|
||||
{
|
||||
this.successful = false;
|
||||
}
|
||||
|
||||
return stack;
|
||||
}
|
||||
});
|
||||
BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(Item.getItemFromBlock(Blocks.PUMPKIN), new Bootstrap.BehaviorDispenseOptional()
|
||||
{
|
||||
/**
|
||||
* Dispense the specified stack, play the dispense sound and spawn particles.
|
||||
*/
|
||||
protected ItemStack dispenseStack(IBlockSource source, ItemStack stack)
|
||||
{
|
||||
World world = source.getWorld();
|
||||
BlockPos blockpos = source.getBlockPos().offset((EnumFacing)source.getBlockState().getValue(BlockDispenser.FACING));
|
||||
BlockPumpkin blockpumpkin = (BlockPumpkin)Blocks.PUMPKIN;
|
||||
this.successful = true;
|
||||
|
||||
if (world.isAirBlock(blockpos) && blockpumpkin.canDispenserPlace(world, blockpos))
|
||||
{
|
||||
if (!world.isRemote)
|
||||
{
|
||||
world.setBlockState(blockpos, blockpumpkin.getDefaultState(), 3);
|
||||
}
|
||||
|
||||
stack.shrink(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
ItemStack itemstack = ItemArmor.dispenseArmor(source, stack);
|
||||
|
||||
if (itemstack.isEmpty())
|
||||
{
|
||||
this.successful = false;
|
||||
}
|
||||
}
|
||||
|
||||
return stack;
|
||||
}
|
||||
});
|
||||
|
||||
for (EnumDyeColor enumdyecolor : EnumDyeColor.values())
|
||||
{
|
||||
BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(Item.getItemFromBlock(BlockShulkerBox.getBlockByColor(enumdyecolor)), new Bootstrap.BehaviorDispenseShulkerBox());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers blocks, items, stats, etc.
|
||||
*/
|
||||
public static void register()
|
||||
{
|
||||
if (!alreadyRegistered)
|
||||
{
|
||||
alreadyRegistered = true;
|
||||
if (false) // skip redirectOutputToLog, Forge already redirects stdout and stderr output to log so that they print with more context
|
||||
redirectOutputToLog();
|
||||
SoundEvent.registerSounds();
|
||||
Block.registerBlocks();
|
||||
BlockFire.init();
|
||||
Potion.registerPotions();
|
||||
Enchantment.registerEnchantments();
|
||||
Item.registerItems();
|
||||
PotionType.registerPotionTypes();
|
||||
PotionHelper.init();
|
||||
EntityList.init();
|
||||
Biome.registerBiomes();
|
||||
registerDispenserBehaviors();
|
||||
|
||||
if (!CraftingManager.init())
|
||||
{
|
||||
hasErrored = true;
|
||||
LOGGER.error("Errors with built-in recipes!");
|
||||
}
|
||||
|
||||
StatList.init();
|
||||
|
||||
if (LOGGER.isDebugEnabled())
|
||||
{
|
||||
if ((new AdvancementManager((File)null)).hasErrored())
|
||||
{
|
||||
hasErrored = true;
|
||||
LOGGER.error("Errors with built-in advancements!");
|
||||
}
|
||||
|
||||
if (!LootTableList.test())
|
||||
{
|
||||
hasErrored = true;
|
||||
LOGGER.error("Errors with built-in loot tables");
|
||||
}
|
||||
}
|
||||
|
||||
net.minecraftforge.registries.GameData.vanillaSnapshot();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* redirect standard streams to logger
|
||||
*/
|
||||
private static void redirectOutputToLog()
|
||||
{
|
||||
if (LOGGER.isDebugEnabled())
|
||||
{
|
||||
System.setErr(new DebugLoggingPrintStream("STDERR", System.err));
|
||||
System.setOut(new DebugLoggingPrintStream("STDOUT", SYSOUT));
|
||||
}
|
||||
else
|
||||
{
|
||||
System.setErr(new LoggingPrintStream("STDERR", System.err));
|
||||
System.setOut(new LoggingPrintStream("STDOUT", SYSOUT));
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static void printToSYSOUT(String message)
|
||||
{
|
||||
SYSOUT.println(message);
|
||||
}
|
||||
|
||||
public static class BehaviorDispenseBoat extends BehaviorDefaultDispenseItem
|
||||
{
|
||||
private final BehaviorDefaultDispenseItem dispenseBehavior = new BehaviorDefaultDispenseItem();
|
||||
private final EntityBoat.Type boatType;
|
||||
|
||||
public BehaviorDispenseBoat(EntityBoat.Type boatTypeIn)
|
||||
{
|
||||
this.boatType = boatTypeIn;
|
||||
}
|
||||
|
||||
/**
|
||||
* Dispense the specified stack, play the dispense sound and spawn particles.
|
||||
*/
|
||||
public ItemStack dispenseStack(IBlockSource source, ItemStack stack)
|
||||
{
|
||||
EnumFacing enumfacing = (EnumFacing)source.getBlockState().getValue(BlockDispenser.FACING);
|
||||
World world = source.getWorld();
|
||||
double d0 = source.getX() + (double)((float)enumfacing.getFrontOffsetX() * 1.125F);
|
||||
double d1 = source.getY() + (double)((float)enumfacing.getFrontOffsetY() * 1.125F);
|
||||
double d2 = source.getZ() + (double)((float)enumfacing.getFrontOffsetZ() * 1.125F);
|
||||
BlockPos blockpos = source.getBlockPos().offset(enumfacing);
|
||||
Material material = world.getBlockState(blockpos).getMaterial();
|
||||
double d3;
|
||||
|
||||
if (Material.WATER.equals(material))
|
||||
{
|
||||
d3 = 1.0D;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!Material.AIR.equals(material) || !Material.WATER.equals(world.getBlockState(blockpos.down()).getMaterial()))
|
||||
{
|
||||
return this.dispenseBehavior.dispense(source, stack);
|
||||
}
|
||||
|
||||
d3 = 0.0D;
|
||||
}
|
||||
|
||||
EntityBoat entityboat = new EntityBoat(world, d0, d1 + d3, d2);
|
||||
entityboat.setBoatType(this.boatType);
|
||||
entityboat.rotationYaw = enumfacing.getHorizontalAngle();
|
||||
world.spawnEntity(entityboat);
|
||||
stack.shrink(1);
|
||||
return stack;
|
||||
}
|
||||
|
||||
/**
|
||||
* Play the dispense sound from the specified block.
|
||||
*/
|
||||
protected void playDispenseSound(IBlockSource source)
|
||||
{
|
||||
source.getWorld().playEvent(1000, source.getBlockPos(), 0);
|
||||
}
|
||||
}
|
||||
|
||||
public abstract static class BehaviorDispenseOptional extends BehaviorDefaultDispenseItem
|
||||
{
|
||||
protected boolean successful = true;
|
||||
|
||||
/**
|
||||
* Play the dispense sound from the specified block.
|
||||
*/
|
||||
protected void playDispenseSound(IBlockSource source)
|
||||
{
|
||||
source.getWorld().playEvent(this.successful ? 1000 : 1001, source.getBlockPos(), 0);
|
||||
}
|
||||
}
|
||||
|
||||
static class BehaviorDispenseShulkerBox extends Bootstrap.BehaviorDispenseOptional
|
||||
{
|
||||
private BehaviorDispenseShulkerBox()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Dispense the specified stack, play the dispense sound and spawn particles.
|
||||
*/
|
||||
protected ItemStack dispenseStack(IBlockSource source, ItemStack stack)
|
||||
{
|
||||
Block block = Block.getBlockFromItem(stack.getItem());
|
||||
World world = source.getWorld();
|
||||
EnumFacing enumfacing = (EnumFacing)source.getBlockState().getValue(BlockDispenser.FACING);
|
||||
BlockPos blockpos = source.getBlockPos().offset(enumfacing);
|
||||
this.successful = world.mayPlace(block, blockpos, false, EnumFacing.DOWN, (Entity)null);
|
||||
|
||||
if (this.successful)
|
||||
{
|
||||
EnumFacing enumfacing1 = world.isAirBlock(blockpos.down()) ? enumfacing : EnumFacing.UP;
|
||||
IBlockState iblockstate = block.getDefaultState().withProperty(BlockShulkerBox.FACING, enumfacing1);
|
||||
world.setBlockState(blockpos, iblockstate);
|
||||
TileEntity tileentity = world.getTileEntity(blockpos);
|
||||
ItemStack itemstack = stack.splitStack(1);
|
||||
|
||||
if (itemstack.hasTagCompound())
|
||||
{
|
||||
((TileEntityShulkerBox)tileentity).loadFromNbt(itemstack.getTagCompound().getCompoundTag("BlockEntityTag"));
|
||||
}
|
||||
|
||||
if (itemstack.hasDisplayName())
|
||||
{
|
||||
((TileEntityShulkerBox)tileentity).setCustomName(itemstack.getDisplayName());
|
||||
}
|
||||
|
||||
world.updateComparatorOutputLevel(blockpos, iblockstate.getBlock());
|
||||
}
|
||||
|
||||
return stack;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package net.minecraft.init;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class Enchantments
|
||||
{
|
||||
public static final Enchantment PROTECTION = getRegisteredEnchantment("protection");
|
||||
/** Protection against fire */
|
||||
public static final Enchantment FIRE_PROTECTION = getRegisteredEnchantment("fire_protection");
|
||||
public static final Enchantment FEATHER_FALLING = getRegisteredEnchantment("feather_falling");
|
||||
public static final Enchantment BLAST_PROTECTION = getRegisteredEnchantment("blast_protection");
|
||||
public static final Enchantment PROJECTILE_PROTECTION = getRegisteredEnchantment("projectile_protection");
|
||||
public static final Enchantment RESPIRATION = getRegisteredEnchantment("respiration");
|
||||
public static final Enchantment AQUA_AFFINITY = getRegisteredEnchantment("aqua_affinity");
|
||||
public static final Enchantment THORNS = getRegisteredEnchantment("thorns");
|
||||
public static final Enchantment DEPTH_STRIDER = getRegisteredEnchantment("depth_strider");
|
||||
public static final Enchantment FROST_WALKER = getRegisteredEnchantment("frost_walker");
|
||||
public static final Enchantment BINDING_CURSE = getRegisteredEnchantment("binding_curse");
|
||||
public static final Enchantment SHARPNESS = getRegisteredEnchantment("sharpness");
|
||||
public static final Enchantment SMITE = getRegisteredEnchantment("smite");
|
||||
public static final Enchantment BANE_OF_ARTHROPODS = getRegisteredEnchantment("bane_of_arthropods");
|
||||
public static final Enchantment KNOCKBACK = getRegisteredEnchantment("knockback");
|
||||
/** Lights mobs on fire */
|
||||
public static final Enchantment FIRE_ASPECT = getRegisteredEnchantment("fire_aspect");
|
||||
public static final Enchantment LOOTING = getRegisteredEnchantment("looting");
|
||||
public static final Enchantment SWEEPING = getRegisteredEnchantment("sweeping");
|
||||
public static final Enchantment EFFICIENCY = getRegisteredEnchantment("efficiency");
|
||||
public static final Enchantment SILK_TOUCH = getRegisteredEnchantment("silk_touch");
|
||||
public static final Enchantment UNBREAKING = getRegisteredEnchantment("unbreaking");
|
||||
public static final Enchantment FORTUNE = getRegisteredEnchantment("fortune");
|
||||
public static final Enchantment POWER = getRegisteredEnchantment("power");
|
||||
public static final Enchantment PUNCH = getRegisteredEnchantment("punch");
|
||||
public static final Enchantment FLAME = getRegisteredEnchantment("flame");
|
||||
public static final Enchantment INFINITY = getRegisteredEnchantment("infinity");
|
||||
public static final Enchantment LUCK_OF_THE_SEA = getRegisteredEnchantment("luck_of_the_sea");
|
||||
public static final Enchantment LURE = getRegisteredEnchantment("lure");
|
||||
public static final Enchantment MENDING = getRegisteredEnchantment("mending");
|
||||
public static final Enchantment VANISHING_CURSE = getRegisteredEnchantment("vanishing_curse");
|
||||
|
||||
@Nullable
|
||||
private static Enchantment getRegisteredEnchantment(String id)
|
||||
{
|
||||
Enchantment enchantment = Enchantment.REGISTRY.getObject(new ResourceLocation(id));
|
||||
|
||||
if (enchantment == null)
|
||||
{
|
||||
throw new IllegalStateException("Invalid Enchantment requested: " + id);
|
||||
}
|
||||
else
|
||||
{
|
||||
return enchantment;
|
||||
}
|
||||
}
|
||||
|
||||
static
|
||||
{
|
||||
if (!Bootstrap.isRegistered())
|
||||
{
|
||||
throw new RuntimeException("Accessed Enchantments before Bootstrap!");
|
||||
}
|
||||
}
|
||||
}
|
||||
461
build/tmp/recompileMc/sources/net/minecraft/init/Items.java
Normal file
461
build/tmp/recompileMc/sources/net/minecraft/init/Items.java
Normal file
@@ -0,0 +1,461 @@
|
||||
package net.minecraft.init;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
import net.minecraft.item.ItemArmorStand;
|
||||
import net.minecraft.item.ItemBow;
|
||||
import net.minecraft.item.ItemEmptyMap;
|
||||
import net.minecraft.item.ItemFishingRod;
|
||||
import net.minecraft.item.ItemMap;
|
||||
import net.minecraft.item.ItemPotion;
|
||||
import net.minecraft.item.ItemShears;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class Items
|
||||
{
|
||||
public static final Item AIR;
|
||||
public static final Item IRON_SHOVEL;
|
||||
public static final Item IRON_PICKAXE;
|
||||
public static final Item IRON_AXE;
|
||||
public static final Item FLINT_AND_STEEL;
|
||||
public static final Item APPLE;
|
||||
public static final ItemBow BOW;
|
||||
public static final Item ARROW;
|
||||
public static final Item SPECTRAL_ARROW;
|
||||
public static final Item TIPPED_ARROW;
|
||||
public static final Item COAL;
|
||||
public static final Item DIAMOND;
|
||||
public static final Item IRON_INGOT;
|
||||
public static final Item GOLD_INGOT;
|
||||
public static final Item IRON_SWORD;
|
||||
public static final Item WOODEN_SWORD;
|
||||
public static final Item WOODEN_SHOVEL;
|
||||
public static final Item WOODEN_PICKAXE;
|
||||
public static final Item WOODEN_AXE;
|
||||
public static final Item STONE_SWORD;
|
||||
public static final Item STONE_SHOVEL;
|
||||
public static final Item STONE_PICKAXE;
|
||||
public static final Item STONE_AXE;
|
||||
public static final Item DIAMOND_SWORD;
|
||||
public static final Item DIAMOND_SHOVEL;
|
||||
public static final Item DIAMOND_PICKAXE;
|
||||
public static final Item DIAMOND_AXE;
|
||||
public static final Item STICK;
|
||||
public static final Item BOWL;
|
||||
public static final Item MUSHROOM_STEW;
|
||||
public static final Item GOLDEN_SWORD;
|
||||
public static final Item GOLDEN_SHOVEL;
|
||||
public static final Item GOLDEN_PICKAXE;
|
||||
public static final Item GOLDEN_AXE;
|
||||
public static final Item STRING;
|
||||
public static final Item FEATHER;
|
||||
public static final Item GUNPOWDER;
|
||||
public static final Item WOODEN_HOE;
|
||||
public static final Item STONE_HOE;
|
||||
public static final Item IRON_HOE;
|
||||
public static final Item DIAMOND_HOE;
|
||||
public static final Item GOLDEN_HOE;
|
||||
public static final Item WHEAT_SEEDS;
|
||||
public static final Item WHEAT;
|
||||
public static final Item BREAD;
|
||||
public static final ItemArmor LEATHER_HELMET;
|
||||
public static final ItemArmor LEATHER_CHESTPLATE;
|
||||
public static final ItemArmor LEATHER_LEGGINGS;
|
||||
public static final ItemArmor LEATHER_BOOTS;
|
||||
public static final ItemArmor CHAINMAIL_HELMET;
|
||||
public static final ItemArmor CHAINMAIL_CHESTPLATE;
|
||||
public static final ItemArmor CHAINMAIL_LEGGINGS;
|
||||
public static final ItemArmor CHAINMAIL_BOOTS;
|
||||
public static final ItemArmor IRON_HELMET;
|
||||
public static final ItemArmor IRON_CHESTPLATE;
|
||||
public static final ItemArmor IRON_LEGGINGS;
|
||||
public static final ItemArmor IRON_BOOTS;
|
||||
public static final ItemArmor DIAMOND_HELMET;
|
||||
public static final ItemArmor DIAMOND_CHESTPLATE;
|
||||
public static final ItemArmor DIAMOND_LEGGINGS;
|
||||
public static final ItemArmor DIAMOND_BOOTS;
|
||||
public static final ItemArmor GOLDEN_HELMET;
|
||||
public static final ItemArmor GOLDEN_CHESTPLATE;
|
||||
public static final ItemArmor GOLDEN_LEGGINGS;
|
||||
public static final ItemArmor GOLDEN_BOOTS;
|
||||
public static final Item FLINT;
|
||||
public static final Item PORKCHOP;
|
||||
public static final Item COOKED_PORKCHOP;
|
||||
public static final Item PAINTING;
|
||||
public static final Item GOLDEN_APPLE;
|
||||
public static final Item SIGN;
|
||||
public static final Item OAK_DOOR;
|
||||
public static final Item SPRUCE_DOOR;
|
||||
public static final Item BIRCH_DOOR;
|
||||
public static final Item JUNGLE_DOOR;
|
||||
public static final Item ACACIA_DOOR;
|
||||
public static final Item DARK_OAK_DOOR;
|
||||
public static final Item BUCKET;
|
||||
public static final Item WATER_BUCKET;
|
||||
public static final Item LAVA_BUCKET;
|
||||
public static final Item MINECART;
|
||||
public static final Item SADDLE;
|
||||
public static final Item IRON_DOOR;
|
||||
public static final Item REDSTONE;
|
||||
public static final Item SNOWBALL;
|
||||
public static final Item BOAT;
|
||||
public static final Item SPRUCE_BOAT;
|
||||
public static final Item BIRCH_BOAT;
|
||||
public static final Item JUNGLE_BOAT;
|
||||
public static final Item ACACIA_BOAT;
|
||||
public static final Item DARK_OAK_BOAT;
|
||||
public static final Item LEATHER;
|
||||
public static final Item MILK_BUCKET;
|
||||
public static final Item BRICK;
|
||||
public static final Item CLAY_BALL;
|
||||
public static final Item REEDS;
|
||||
public static final Item PAPER;
|
||||
public static final Item BOOK;
|
||||
public static final Item SLIME_BALL;
|
||||
public static final Item CHEST_MINECART;
|
||||
public static final Item FURNACE_MINECART;
|
||||
public static final Item EGG;
|
||||
public static final Item COMPASS;
|
||||
public static final ItemFishingRod FISHING_ROD;
|
||||
public static final Item CLOCK;
|
||||
public static final Item GLOWSTONE_DUST;
|
||||
public static final Item FISH;
|
||||
public static final Item COOKED_FISH;
|
||||
public static final Item DYE;
|
||||
public static final Item BONE;
|
||||
public static final Item SUGAR;
|
||||
public static final Item CAKE;
|
||||
public static final Item BED;
|
||||
public static final Item REPEATER;
|
||||
public static final Item COOKIE;
|
||||
public static final ItemMap FILLED_MAP;
|
||||
public static final ItemShears SHEARS;
|
||||
public static final Item MELON;
|
||||
public static final Item PUMPKIN_SEEDS;
|
||||
public static final Item MELON_SEEDS;
|
||||
public static final Item BEEF;
|
||||
public static final Item COOKED_BEEF;
|
||||
public static final Item CHICKEN;
|
||||
public static final Item COOKED_CHICKEN;
|
||||
public static final Item MUTTON;
|
||||
public static final Item COOKED_MUTTON;
|
||||
public static final Item RABBIT;
|
||||
public static final Item COOKED_RABBIT;
|
||||
public static final Item RABBIT_STEW;
|
||||
public static final Item RABBIT_FOOT;
|
||||
public static final Item RABBIT_HIDE;
|
||||
public static final Item ROTTEN_FLESH;
|
||||
public static final Item ENDER_PEARL;
|
||||
public static final Item BLAZE_ROD;
|
||||
public static final Item GHAST_TEAR;
|
||||
public static final Item GOLD_NUGGET;
|
||||
public static final Item NETHER_WART;
|
||||
public static final ItemPotion POTIONITEM;
|
||||
public static final ItemPotion SPLASH_POTION;
|
||||
public static final ItemPotion LINGERING_POTION;
|
||||
public static final Item GLASS_BOTTLE;
|
||||
public static final Item DRAGON_BREATH;
|
||||
public static final Item SPIDER_EYE;
|
||||
public static final Item FERMENTED_SPIDER_EYE;
|
||||
public static final Item BLAZE_POWDER;
|
||||
public static final Item MAGMA_CREAM;
|
||||
public static final Item BREWING_STAND;
|
||||
public static final Item CAULDRON;
|
||||
public static final Item ENDER_EYE;
|
||||
public static final Item SPECKLED_MELON;
|
||||
public static final Item SPAWN_EGG;
|
||||
public static final Item EXPERIENCE_BOTTLE;
|
||||
public static final Item FIRE_CHARGE;
|
||||
public static final Item WRITABLE_BOOK;
|
||||
public static final Item WRITTEN_BOOK;
|
||||
public static final Item EMERALD;
|
||||
public static final Item ITEM_FRAME;
|
||||
public static final Item FLOWER_POT;
|
||||
public static final Item CARROT;
|
||||
public static final Item POTATO;
|
||||
public static final Item BAKED_POTATO;
|
||||
public static final Item POISONOUS_POTATO;
|
||||
public static final ItemEmptyMap MAP;
|
||||
public static final Item GOLDEN_CARROT;
|
||||
public static final Item SKULL;
|
||||
public static final Item CARROT_ON_A_STICK;
|
||||
public static final Item NETHER_STAR;
|
||||
public static final Item PUMPKIN_PIE;
|
||||
public static final Item FIREWORKS;
|
||||
public static final Item FIREWORK_CHARGE;
|
||||
public static final Item ENCHANTED_BOOK;
|
||||
public static final Item COMPARATOR;
|
||||
public static final Item NETHERBRICK;
|
||||
public static final Item QUARTZ;
|
||||
public static final Item TNT_MINECART;
|
||||
public static final Item HOPPER_MINECART;
|
||||
public static final ItemArmorStand ARMOR_STAND;
|
||||
public static final Item IRON_HORSE_ARMOR;
|
||||
public static final Item GOLDEN_HORSE_ARMOR;
|
||||
public static final Item DIAMOND_HORSE_ARMOR;
|
||||
public static final Item LEAD;
|
||||
public static final Item NAME_TAG;
|
||||
public static final Item COMMAND_BLOCK_MINECART;
|
||||
public static final Item RECORD_13;
|
||||
public static final Item RECORD_CAT;
|
||||
public static final Item RECORD_BLOCKS;
|
||||
public static final Item RECORD_CHIRP;
|
||||
public static final Item RECORD_FAR;
|
||||
public static final Item RECORD_MALL;
|
||||
public static final Item RECORD_MELLOHI;
|
||||
public static final Item RECORD_STAL;
|
||||
public static final Item RECORD_STRAD;
|
||||
public static final Item RECORD_WARD;
|
||||
public static final Item RECORD_11;
|
||||
public static final Item RECORD_WAIT;
|
||||
public static final Item PRISMARINE_SHARD;
|
||||
public static final Item PRISMARINE_CRYSTALS;
|
||||
public static final Item BANNER;
|
||||
public static final Item END_CRYSTAL;
|
||||
public static final Item SHIELD;
|
||||
public static final Item ELYTRA;
|
||||
public static final Item CHORUS_FRUIT;
|
||||
public static final Item CHORUS_FRUIT_POPPED;
|
||||
public static final Item BEETROOT_SEEDS;
|
||||
public static final Item BEETROOT;
|
||||
public static final Item BEETROOT_SOUP;
|
||||
public static final Item TOTEM_OF_UNDYING;
|
||||
public static final Item SHULKER_SHELL;
|
||||
public static final Item IRON_NUGGET;
|
||||
public static final Item KNOWLEDGE_BOOK;
|
||||
|
||||
private static Item getRegisteredItem(String name)
|
||||
{
|
||||
Item item = Item.REGISTRY.getObject(new ResourceLocation(name));
|
||||
|
||||
if (item == null)
|
||||
{
|
||||
throw new IllegalStateException("Invalid Item requested: " + name);
|
||||
}
|
||||
else
|
||||
{
|
||||
return item;
|
||||
}
|
||||
}
|
||||
|
||||
static
|
||||
{
|
||||
if (!Bootstrap.isRegistered())
|
||||
{
|
||||
throw new RuntimeException("Accessed Items before Bootstrap!");
|
||||
}
|
||||
else
|
||||
{
|
||||
AIR = getRegisteredItem("air");
|
||||
IRON_SHOVEL = getRegisteredItem("iron_shovel");
|
||||
IRON_PICKAXE = getRegisteredItem("iron_pickaxe");
|
||||
IRON_AXE = getRegisteredItem("iron_axe");
|
||||
FLINT_AND_STEEL = getRegisteredItem("flint_and_steel");
|
||||
APPLE = getRegisteredItem("apple");
|
||||
BOW = (ItemBow)getRegisteredItem("bow");
|
||||
ARROW = getRegisteredItem("arrow");
|
||||
SPECTRAL_ARROW = getRegisteredItem("spectral_arrow");
|
||||
TIPPED_ARROW = getRegisteredItem("tipped_arrow");
|
||||
COAL = getRegisteredItem("coal");
|
||||
DIAMOND = getRegisteredItem("diamond");
|
||||
IRON_INGOT = getRegisteredItem("iron_ingot");
|
||||
GOLD_INGOT = getRegisteredItem("gold_ingot");
|
||||
IRON_SWORD = getRegisteredItem("iron_sword");
|
||||
WOODEN_SWORD = getRegisteredItem("wooden_sword");
|
||||
WOODEN_SHOVEL = getRegisteredItem("wooden_shovel");
|
||||
WOODEN_PICKAXE = getRegisteredItem("wooden_pickaxe");
|
||||
WOODEN_AXE = getRegisteredItem("wooden_axe");
|
||||
STONE_SWORD = getRegisteredItem("stone_sword");
|
||||
STONE_SHOVEL = getRegisteredItem("stone_shovel");
|
||||
STONE_PICKAXE = getRegisteredItem("stone_pickaxe");
|
||||
STONE_AXE = getRegisteredItem("stone_axe");
|
||||
DIAMOND_SWORD = getRegisteredItem("diamond_sword");
|
||||
DIAMOND_SHOVEL = getRegisteredItem("diamond_shovel");
|
||||
DIAMOND_PICKAXE = getRegisteredItem("diamond_pickaxe");
|
||||
DIAMOND_AXE = getRegisteredItem("diamond_axe");
|
||||
STICK = getRegisteredItem("stick");
|
||||
BOWL = getRegisteredItem("bowl");
|
||||
MUSHROOM_STEW = getRegisteredItem("mushroom_stew");
|
||||
GOLDEN_SWORD = getRegisteredItem("golden_sword");
|
||||
GOLDEN_SHOVEL = getRegisteredItem("golden_shovel");
|
||||
GOLDEN_PICKAXE = getRegisteredItem("golden_pickaxe");
|
||||
GOLDEN_AXE = getRegisteredItem("golden_axe");
|
||||
STRING = getRegisteredItem("string");
|
||||
FEATHER = getRegisteredItem("feather");
|
||||
GUNPOWDER = getRegisteredItem("gunpowder");
|
||||
WOODEN_HOE = getRegisteredItem("wooden_hoe");
|
||||
STONE_HOE = getRegisteredItem("stone_hoe");
|
||||
IRON_HOE = getRegisteredItem("iron_hoe");
|
||||
DIAMOND_HOE = getRegisteredItem("diamond_hoe");
|
||||
GOLDEN_HOE = getRegisteredItem("golden_hoe");
|
||||
WHEAT_SEEDS = getRegisteredItem("wheat_seeds");
|
||||
WHEAT = getRegisteredItem("wheat");
|
||||
BREAD = getRegisteredItem("bread");
|
||||
LEATHER_HELMET = (ItemArmor)getRegisteredItem("leather_helmet");
|
||||
LEATHER_CHESTPLATE = (ItemArmor)getRegisteredItem("leather_chestplate");
|
||||
LEATHER_LEGGINGS = (ItemArmor)getRegisteredItem("leather_leggings");
|
||||
LEATHER_BOOTS = (ItemArmor)getRegisteredItem("leather_boots");
|
||||
CHAINMAIL_HELMET = (ItemArmor)getRegisteredItem("chainmail_helmet");
|
||||
CHAINMAIL_CHESTPLATE = (ItemArmor)getRegisteredItem("chainmail_chestplate");
|
||||
CHAINMAIL_LEGGINGS = (ItemArmor)getRegisteredItem("chainmail_leggings");
|
||||
CHAINMAIL_BOOTS = (ItemArmor)getRegisteredItem("chainmail_boots");
|
||||
IRON_HELMET = (ItemArmor)getRegisteredItem("iron_helmet");
|
||||
IRON_CHESTPLATE = (ItemArmor)getRegisteredItem("iron_chestplate");
|
||||
IRON_LEGGINGS = (ItemArmor)getRegisteredItem("iron_leggings");
|
||||
IRON_BOOTS = (ItemArmor)getRegisteredItem("iron_boots");
|
||||
DIAMOND_HELMET = (ItemArmor)getRegisteredItem("diamond_helmet");
|
||||
DIAMOND_CHESTPLATE = (ItemArmor)getRegisteredItem("diamond_chestplate");
|
||||
DIAMOND_LEGGINGS = (ItemArmor)getRegisteredItem("diamond_leggings");
|
||||
DIAMOND_BOOTS = (ItemArmor)getRegisteredItem("diamond_boots");
|
||||
GOLDEN_HELMET = (ItemArmor)getRegisteredItem("golden_helmet");
|
||||
GOLDEN_CHESTPLATE = (ItemArmor)getRegisteredItem("golden_chestplate");
|
||||
GOLDEN_LEGGINGS = (ItemArmor)getRegisteredItem("golden_leggings");
|
||||
GOLDEN_BOOTS = (ItemArmor)getRegisteredItem("golden_boots");
|
||||
FLINT = getRegisteredItem("flint");
|
||||
PORKCHOP = getRegisteredItem("porkchop");
|
||||
COOKED_PORKCHOP = getRegisteredItem("cooked_porkchop");
|
||||
PAINTING = getRegisteredItem("painting");
|
||||
GOLDEN_APPLE = getRegisteredItem("golden_apple");
|
||||
SIGN = getRegisteredItem("sign");
|
||||
OAK_DOOR = getRegisteredItem("wooden_door");
|
||||
SPRUCE_DOOR = getRegisteredItem("spruce_door");
|
||||
BIRCH_DOOR = getRegisteredItem("birch_door");
|
||||
JUNGLE_DOOR = getRegisteredItem("jungle_door");
|
||||
ACACIA_DOOR = getRegisteredItem("acacia_door");
|
||||
DARK_OAK_DOOR = getRegisteredItem("dark_oak_door");
|
||||
BUCKET = getRegisteredItem("bucket");
|
||||
WATER_BUCKET = getRegisteredItem("water_bucket");
|
||||
LAVA_BUCKET = getRegisteredItem("lava_bucket");
|
||||
MINECART = getRegisteredItem("minecart");
|
||||
SADDLE = getRegisteredItem("saddle");
|
||||
IRON_DOOR = getRegisteredItem("iron_door");
|
||||
REDSTONE = getRegisteredItem("redstone");
|
||||
SNOWBALL = getRegisteredItem("snowball");
|
||||
BOAT = getRegisteredItem("boat");
|
||||
SPRUCE_BOAT = getRegisteredItem("spruce_boat");
|
||||
BIRCH_BOAT = getRegisteredItem("birch_boat");
|
||||
JUNGLE_BOAT = getRegisteredItem("jungle_boat");
|
||||
ACACIA_BOAT = getRegisteredItem("acacia_boat");
|
||||
DARK_OAK_BOAT = getRegisteredItem("dark_oak_boat");
|
||||
LEATHER = getRegisteredItem("leather");
|
||||
MILK_BUCKET = getRegisteredItem("milk_bucket");
|
||||
BRICK = getRegisteredItem("brick");
|
||||
CLAY_BALL = getRegisteredItem("clay_ball");
|
||||
REEDS = getRegisteredItem("reeds");
|
||||
PAPER = getRegisteredItem("paper");
|
||||
BOOK = getRegisteredItem("book");
|
||||
SLIME_BALL = getRegisteredItem("slime_ball");
|
||||
CHEST_MINECART = getRegisteredItem("chest_minecart");
|
||||
FURNACE_MINECART = getRegisteredItem("furnace_minecart");
|
||||
EGG = getRegisteredItem("egg");
|
||||
COMPASS = getRegisteredItem("compass");
|
||||
FISHING_ROD = (ItemFishingRod)getRegisteredItem("fishing_rod");
|
||||
CLOCK = getRegisteredItem("clock");
|
||||
GLOWSTONE_DUST = getRegisteredItem("glowstone_dust");
|
||||
FISH = getRegisteredItem("fish");
|
||||
COOKED_FISH = getRegisteredItem("cooked_fish");
|
||||
DYE = getRegisteredItem("dye");
|
||||
BONE = getRegisteredItem("bone");
|
||||
SUGAR = getRegisteredItem("sugar");
|
||||
CAKE = getRegisteredItem("cake");
|
||||
BED = getRegisteredItem("bed");
|
||||
REPEATER = getRegisteredItem("repeater");
|
||||
COOKIE = getRegisteredItem("cookie");
|
||||
FILLED_MAP = (ItemMap)getRegisteredItem("filled_map");
|
||||
SHEARS = (ItemShears)getRegisteredItem("shears");
|
||||
MELON = getRegisteredItem("melon");
|
||||
PUMPKIN_SEEDS = getRegisteredItem("pumpkin_seeds");
|
||||
MELON_SEEDS = getRegisteredItem("melon_seeds");
|
||||
BEEF = getRegisteredItem("beef");
|
||||
COOKED_BEEF = getRegisteredItem("cooked_beef");
|
||||
CHICKEN = getRegisteredItem("chicken");
|
||||
COOKED_CHICKEN = getRegisteredItem("cooked_chicken");
|
||||
MUTTON = getRegisteredItem("mutton");
|
||||
COOKED_MUTTON = getRegisteredItem("cooked_mutton");
|
||||
RABBIT = getRegisteredItem("rabbit");
|
||||
COOKED_RABBIT = getRegisteredItem("cooked_rabbit");
|
||||
RABBIT_STEW = getRegisteredItem("rabbit_stew");
|
||||
RABBIT_FOOT = getRegisteredItem("rabbit_foot");
|
||||
RABBIT_HIDE = getRegisteredItem("rabbit_hide");
|
||||
ROTTEN_FLESH = getRegisteredItem("rotten_flesh");
|
||||
ENDER_PEARL = getRegisteredItem("ender_pearl");
|
||||
BLAZE_ROD = getRegisteredItem("blaze_rod");
|
||||
GHAST_TEAR = getRegisteredItem("ghast_tear");
|
||||
GOLD_NUGGET = getRegisteredItem("gold_nugget");
|
||||
NETHER_WART = getRegisteredItem("nether_wart");
|
||||
POTIONITEM = (ItemPotion)getRegisteredItem("potion");
|
||||
SPLASH_POTION = (ItemPotion)getRegisteredItem("splash_potion");
|
||||
LINGERING_POTION = (ItemPotion)getRegisteredItem("lingering_potion");
|
||||
GLASS_BOTTLE = getRegisteredItem("glass_bottle");
|
||||
DRAGON_BREATH = getRegisteredItem("dragon_breath");
|
||||
SPIDER_EYE = getRegisteredItem("spider_eye");
|
||||
FERMENTED_SPIDER_EYE = getRegisteredItem("fermented_spider_eye");
|
||||
BLAZE_POWDER = getRegisteredItem("blaze_powder");
|
||||
MAGMA_CREAM = getRegisteredItem("magma_cream");
|
||||
BREWING_STAND = getRegisteredItem("brewing_stand");
|
||||
CAULDRON = getRegisteredItem("cauldron");
|
||||
ENDER_EYE = getRegisteredItem("ender_eye");
|
||||
SPECKLED_MELON = getRegisteredItem("speckled_melon");
|
||||
SPAWN_EGG = getRegisteredItem("spawn_egg");
|
||||
EXPERIENCE_BOTTLE = getRegisteredItem("experience_bottle");
|
||||
FIRE_CHARGE = getRegisteredItem("fire_charge");
|
||||
WRITABLE_BOOK = getRegisteredItem("writable_book");
|
||||
WRITTEN_BOOK = getRegisteredItem("written_book");
|
||||
EMERALD = getRegisteredItem("emerald");
|
||||
ITEM_FRAME = getRegisteredItem("item_frame");
|
||||
FLOWER_POT = getRegisteredItem("flower_pot");
|
||||
CARROT = getRegisteredItem("carrot");
|
||||
POTATO = getRegisteredItem("potato");
|
||||
BAKED_POTATO = getRegisteredItem("baked_potato");
|
||||
POISONOUS_POTATO = getRegisteredItem("poisonous_potato");
|
||||
MAP = (ItemEmptyMap)getRegisteredItem("map");
|
||||
GOLDEN_CARROT = getRegisteredItem("golden_carrot");
|
||||
SKULL = getRegisteredItem("skull");
|
||||
CARROT_ON_A_STICK = getRegisteredItem("carrot_on_a_stick");
|
||||
NETHER_STAR = getRegisteredItem("nether_star");
|
||||
PUMPKIN_PIE = getRegisteredItem("pumpkin_pie");
|
||||
FIREWORKS = getRegisteredItem("fireworks");
|
||||
FIREWORK_CHARGE = getRegisteredItem("firework_charge");
|
||||
ENCHANTED_BOOK = getRegisteredItem("enchanted_book");
|
||||
COMPARATOR = getRegisteredItem("comparator");
|
||||
NETHERBRICK = getRegisteredItem("netherbrick");
|
||||
QUARTZ = getRegisteredItem("quartz");
|
||||
TNT_MINECART = getRegisteredItem("tnt_minecart");
|
||||
HOPPER_MINECART = getRegisteredItem("hopper_minecart");
|
||||
ARMOR_STAND = (ItemArmorStand)getRegisteredItem("armor_stand");
|
||||
IRON_HORSE_ARMOR = getRegisteredItem("iron_horse_armor");
|
||||
GOLDEN_HORSE_ARMOR = getRegisteredItem("golden_horse_armor");
|
||||
DIAMOND_HORSE_ARMOR = getRegisteredItem("diamond_horse_armor");
|
||||
LEAD = getRegisteredItem("lead");
|
||||
NAME_TAG = getRegisteredItem("name_tag");
|
||||
COMMAND_BLOCK_MINECART = getRegisteredItem("command_block_minecart");
|
||||
RECORD_13 = getRegisteredItem("record_13");
|
||||
RECORD_CAT = getRegisteredItem("record_cat");
|
||||
RECORD_BLOCKS = getRegisteredItem("record_blocks");
|
||||
RECORD_CHIRP = getRegisteredItem("record_chirp");
|
||||
RECORD_FAR = getRegisteredItem("record_far");
|
||||
RECORD_MALL = getRegisteredItem("record_mall");
|
||||
RECORD_MELLOHI = getRegisteredItem("record_mellohi");
|
||||
RECORD_STAL = getRegisteredItem("record_stal");
|
||||
RECORD_STRAD = getRegisteredItem("record_strad");
|
||||
RECORD_WARD = getRegisteredItem("record_ward");
|
||||
RECORD_11 = getRegisteredItem("record_11");
|
||||
RECORD_WAIT = getRegisteredItem("record_wait");
|
||||
PRISMARINE_SHARD = getRegisteredItem("prismarine_shard");
|
||||
PRISMARINE_CRYSTALS = getRegisteredItem("prismarine_crystals");
|
||||
BANNER = getRegisteredItem("banner");
|
||||
END_CRYSTAL = getRegisteredItem("end_crystal");
|
||||
SHIELD = getRegisteredItem("shield");
|
||||
ELYTRA = getRegisteredItem("elytra");
|
||||
CHORUS_FRUIT = getRegisteredItem("chorus_fruit");
|
||||
CHORUS_FRUIT_POPPED = getRegisteredItem("chorus_fruit_popped");
|
||||
BEETROOT_SEEDS = getRegisteredItem("beetroot_seeds");
|
||||
BEETROOT = getRegisteredItem("beetroot");
|
||||
BEETROOT_SOUP = getRegisteredItem("beetroot_soup");
|
||||
TOTEM_OF_UNDYING = getRegisteredItem("totem_of_undying");
|
||||
SHULKER_SHELL = getRegisteredItem("shulker_shell");
|
||||
IRON_NUGGET = getRegisteredItem("iron_nugget");
|
||||
KNOWLEDGE_BOOK = getRegisteredItem("knowledge_book");
|
||||
}
|
||||
}
|
||||
}
|
||||
102
build/tmp/recompileMc/sources/net/minecraft/init/MobEffects.java
Normal file
102
build/tmp/recompileMc/sources/net/minecraft/init/MobEffects.java
Normal file
@@ -0,0 +1,102 @@
|
||||
package net.minecraft.init;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class MobEffects
|
||||
{
|
||||
public static final Potion SPEED;
|
||||
public static final Potion SLOWNESS;
|
||||
public static final Potion HASTE;
|
||||
public static final Potion MINING_FATIGUE;
|
||||
public static final Potion STRENGTH;
|
||||
public static final Potion INSTANT_HEALTH;
|
||||
public static final Potion INSTANT_DAMAGE;
|
||||
public static final Potion JUMP_BOOST;
|
||||
public static final Potion NAUSEA;
|
||||
/** The regeneration Potion object. */
|
||||
public static final Potion REGENERATION;
|
||||
public static final Potion RESISTANCE;
|
||||
/** The fire resistance Potion object. */
|
||||
public static final Potion FIRE_RESISTANCE;
|
||||
/** The water breathing Potion object. */
|
||||
public static final Potion WATER_BREATHING;
|
||||
/** The invisibility Potion object. */
|
||||
public static final Potion INVISIBILITY;
|
||||
/** The blindness Potion object. */
|
||||
public static final Potion BLINDNESS;
|
||||
/** The night vision Potion object. */
|
||||
public static final Potion NIGHT_VISION;
|
||||
/** The hunger Potion object. */
|
||||
public static final Potion HUNGER;
|
||||
/** The weakness Potion object. */
|
||||
public static final Potion WEAKNESS;
|
||||
/** The poison Potion object. */
|
||||
public static final Potion POISON;
|
||||
/** The wither Potion object. */
|
||||
public static final Potion WITHER;
|
||||
/** The health boost Potion object. */
|
||||
public static final Potion HEALTH_BOOST;
|
||||
/** The absorption Potion object. */
|
||||
public static final Potion ABSORPTION;
|
||||
/** The saturation Potion object. */
|
||||
public static final Potion SATURATION;
|
||||
public static final Potion GLOWING;
|
||||
public static final Potion LEVITATION;
|
||||
public static final Potion LUCK;
|
||||
public static final Potion UNLUCK;
|
||||
|
||||
@Nullable
|
||||
private static Potion getRegisteredMobEffect(String id)
|
||||
{
|
||||
Potion potion = Potion.REGISTRY.getObject(new ResourceLocation(id));
|
||||
|
||||
if (potion == null)
|
||||
{
|
||||
throw new IllegalStateException("Invalid MobEffect requested: " + id);
|
||||
}
|
||||
else
|
||||
{
|
||||
return potion;
|
||||
}
|
||||
}
|
||||
|
||||
static
|
||||
{
|
||||
if (!Bootstrap.isRegistered())
|
||||
{
|
||||
throw new RuntimeException("Accessed MobEffects before Bootstrap!");
|
||||
}
|
||||
else
|
||||
{
|
||||
SPEED = getRegisteredMobEffect("speed");
|
||||
SLOWNESS = getRegisteredMobEffect("slowness");
|
||||
HASTE = getRegisteredMobEffect("haste");
|
||||
MINING_FATIGUE = getRegisteredMobEffect("mining_fatigue");
|
||||
STRENGTH = getRegisteredMobEffect("strength");
|
||||
INSTANT_HEALTH = getRegisteredMobEffect("instant_health");
|
||||
INSTANT_DAMAGE = getRegisteredMobEffect("instant_damage");
|
||||
JUMP_BOOST = getRegisteredMobEffect("jump_boost");
|
||||
NAUSEA = getRegisteredMobEffect("nausea");
|
||||
REGENERATION = getRegisteredMobEffect("regeneration");
|
||||
RESISTANCE = getRegisteredMobEffect("resistance");
|
||||
FIRE_RESISTANCE = getRegisteredMobEffect("fire_resistance");
|
||||
WATER_BREATHING = getRegisteredMobEffect("water_breathing");
|
||||
INVISIBILITY = getRegisteredMobEffect("invisibility");
|
||||
BLINDNESS = getRegisteredMobEffect("blindness");
|
||||
NIGHT_VISION = getRegisteredMobEffect("night_vision");
|
||||
HUNGER = getRegisteredMobEffect("hunger");
|
||||
WEAKNESS = getRegisteredMobEffect("weakness");
|
||||
POISON = getRegisteredMobEffect("poison");
|
||||
WITHER = getRegisteredMobEffect("wither");
|
||||
HEALTH_BOOST = getRegisteredMobEffect("health_boost");
|
||||
ABSORPTION = getRegisteredMobEffect("absorption");
|
||||
SATURATION = getRegisteredMobEffect("saturation");
|
||||
GLOWING = getRegisteredMobEffect("glowing");
|
||||
LEVITATION = getRegisteredMobEffect("levitation");
|
||||
LUCK = getRegisteredMobEffect("luck");
|
||||
UNLUCK = getRegisteredMobEffect("unluck");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
package net.minecraft.init;
|
||||
|
||||
import com.google.common.collect.Sets;
|
||||
import java.util.Set;
|
||||
import net.minecraft.potion.PotionType;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class PotionTypes
|
||||
{
|
||||
private static final Set<PotionType> CACHE;
|
||||
public static final PotionType EMPTY;
|
||||
public static final PotionType WATER;
|
||||
public static final PotionType MUNDANE;
|
||||
public static final PotionType THICK;
|
||||
public static final PotionType AWKWARD;
|
||||
public static final PotionType NIGHT_VISION;
|
||||
public static final PotionType LONG_NIGHT_VISION;
|
||||
public static final PotionType INVISIBILITY;
|
||||
public static final PotionType LONG_INVISIBILITY;
|
||||
public static final PotionType LEAPING;
|
||||
public static final PotionType LONG_LEAPING;
|
||||
public static final PotionType STRONG_LEAPING;
|
||||
public static final PotionType FIRE_RESISTANCE;
|
||||
public static final PotionType LONG_FIRE_RESISTANCE;
|
||||
public static final PotionType SWIFTNESS;
|
||||
public static final PotionType LONG_SWIFTNESS;
|
||||
public static final PotionType STRONG_SWIFTNESS;
|
||||
public static final PotionType SLOWNESS;
|
||||
public static final PotionType LONG_SLOWNESS;
|
||||
public static final PotionType WATER_BREATHING;
|
||||
public static final PotionType LONG_WATER_BREATHING;
|
||||
public static final PotionType HEALING;
|
||||
public static final PotionType STRONG_HEALING;
|
||||
public static final PotionType HARMING;
|
||||
public static final PotionType STRONG_HARMING;
|
||||
public static final PotionType POISON;
|
||||
public static final PotionType LONG_POISON;
|
||||
public static final PotionType STRONG_POISON;
|
||||
public static final PotionType REGENERATION;
|
||||
public static final PotionType LONG_REGENERATION;
|
||||
public static final PotionType STRONG_REGENERATION;
|
||||
public static final PotionType STRENGTH;
|
||||
public static final PotionType LONG_STRENGTH;
|
||||
public static final PotionType STRONG_STRENGTH;
|
||||
public static final PotionType WEAKNESS;
|
||||
public static final PotionType LONG_WEAKNESS;
|
||||
|
||||
private static PotionType getRegisteredPotionType(String id)
|
||||
{
|
||||
PotionType potiontype = PotionType.REGISTRY.getObject(new ResourceLocation(id));
|
||||
|
||||
if (!CACHE.add(potiontype))
|
||||
{
|
||||
throw new IllegalStateException("Invalid Potion requested: " + id);
|
||||
}
|
||||
else
|
||||
{
|
||||
return potiontype;
|
||||
}
|
||||
}
|
||||
|
||||
static
|
||||
{
|
||||
if (!Bootstrap.isRegistered())
|
||||
{
|
||||
throw new RuntimeException("Accessed Potions before Bootstrap!");
|
||||
}
|
||||
else
|
||||
{
|
||||
CACHE = Sets.<PotionType>newHashSet();
|
||||
EMPTY = getRegisteredPotionType("empty");
|
||||
WATER = getRegisteredPotionType("water");
|
||||
MUNDANE = getRegisteredPotionType("mundane");
|
||||
THICK = getRegisteredPotionType("thick");
|
||||
AWKWARD = getRegisteredPotionType("awkward");
|
||||
NIGHT_VISION = getRegisteredPotionType("night_vision");
|
||||
LONG_NIGHT_VISION = getRegisteredPotionType("long_night_vision");
|
||||
INVISIBILITY = getRegisteredPotionType("invisibility");
|
||||
LONG_INVISIBILITY = getRegisteredPotionType("long_invisibility");
|
||||
LEAPING = getRegisteredPotionType("leaping");
|
||||
LONG_LEAPING = getRegisteredPotionType("long_leaping");
|
||||
STRONG_LEAPING = getRegisteredPotionType("strong_leaping");
|
||||
FIRE_RESISTANCE = getRegisteredPotionType("fire_resistance");
|
||||
LONG_FIRE_RESISTANCE = getRegisteredPotionType("long_fire_resistance");
|
||||
SWIFTNESS = getRegisteredPotionType("swiftness");
|
||||
LONG_SWIFTNESS = getRegisteredPotionType("long_swiftness");
|
||||
STRONG_SWIFTNESS = getRegisteredPotionType("strong_swiftness");
|
||||
SLOWNESS = getRegisteredPotionType("slowness");
|
||||
LONG_SLOWNESS = getRegisteredPotionType("long_slowness");
|
||||
WATER_BREATHING = getRegisteredPotionType("water_breathing");
|
||||
LONG_WATER_BREATHING = getRegisteredPotionType("long_water_breathing");
|
||||
HEALING = getRegisteredPotionType("healing");
|
||||
STRONG_HEALING = getRegisteredPotionType("strong_healing");
|
||||
HARMING = getRegisteredPotionType("harming");
|
||||
STRONG_HARMING = getRegisteredPotionType("strong_harming");
|
||||
POISON = getRegisteredPotionType("poison");
|
||||
LONG_POISON = getRegisteredPotionType("long_poison");
|
||||
STRONG_POISON = getRegisteredPotionType("strong_poison");
|
||||
REGENERATION = getRegisteredPotionType("regeneration");
|
||||
LONG_REGENERATION = getRegisteredPotionType("long_regeneration");
|
||||
STRONG_REGENERATION = getRegisteredPotionType("strong_regeneration");
|
||||
STRENGTH = getRegisteredPotionType("strength");
|
||||
LONG_STRENGTH = getRegisteredPotionType("long_strength");
|
||||
STRONG_STRENGTH = getRegisteredPotionType("strong_strength");
|
||||
WEAKNESS = getRegisteredPotionType("weakness");
|
||||
LONG_WEAKNESS = getRegisteredPotionType("long_weakness");
|
||||
CACHE.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
1131
build/tmp/recompileMc/sources/net/minecraft/init/SoundEvents.java
Normal file
1131
build/tmp/recompileMc/sources/net/minecraft/init/SoundEvents.java
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,7 @@
|
||||
// Auto generated package-info by MCP
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
package net.minecraft.init;
|
||||
|
||||
import mcp.MethodsReturnNonnullByDefault;
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
Reference in New Issue
Block a user