Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 69.68 KB | None | 0 0
  1. package net.minecraft.block;
  2.  
  3. import java.util.Iterator;
  4. import java.util.List;
  5. import java.util.Random;
  6. import net.minecraft.block.material.MapColor;
  7. import net.minecraft.block.material.Material;
  8. import net.minecraft.client.renderer.texture.IIconRegister;
  9. import net.minecraft.creativetab.CreativeTabs;
  10. import net.minecraft.enchantment.EnchantmentHelper;
  11. import net.minecraft.entity.Entity;
  12. import net.minecraft.entity.EntityLivingBase;
  13. import net.minecraft.entity.item.EntityItem;
  14. import net.minecraft.entity.item.EntityXPOrb;
  15. import net.minecraft.entity.player.EntityPlayer;
  16. import net.minecraft.item.Item;
  17. import net.minecraft.item.ItemStack;
  18. import net.minecraft.stats.StatList;
  19. import net.minecraft.tileentity.TileEntitySign;
  20. import net.minecraft.util.AxisAlignedBB;
  21. import net.minecraft.util.IIcon;
  22. import net.minecraft.util.MovingObjectPosition;
  23. import net.minecraft.util.RegistryNamespaced;
  24. import net.minecraft.util.RegistryNamespacedDefaultedByKey;
  25. import net.minecraft.util.StatCollector;
  26. import net.minecraft.util.Vec3;
  27. import net.minecraft.world.Explosion;
  28. import net.minecraft.world.IBlockAccess;
  29. import net.minecraft.world.World;
  30.  
  31. public class Block
  32. {
  33.     public static final RegistryNamespaced blockRegistry = new RegistryNamespacedDefaultedByKey("air");
  34.     private CreativeTabs displayOnCreativeTab;
  35.     protected String textureName;
  36.     public static final Block.SoundType soundTypeStone = new Block.SoundType("stone", 1.0F, 1.0F);
  37.  
  38.     /** the wood sound type */
  39.     public static final Block.SoundType soundTypeWood = new Block.SoundType("wood", 1.0F, 1.0F);
  40.  
  41.     /** the gravel sound type */
  42.     public static final Block.SoundType soundTypeGravel = new Block.SoundType("gravel", 1.0F, 1.0F);
  43.     public static final Block.SoundType soundTypeGrass = new Block.SoundType("grass", 1.0F, 1.0F);
  44.  
  45.     /** The piston step sound */
  46.     public static final Block.SoundType soundTypePiston = new Block.SoundType("stone", 1.0F, 1.0F);
  47.  
  48.     /** The metal sound type */
  49.     public static final Block.SoundType soundTypeMetal = new Block.SoundType("stone", 1.0F, 1.5F);
  50.  
  51.     /** Glass footsteps */
  52.     public static final Block.SoundType soundTypeGlass = new Block.SoundType("stone", 1.0F, 1.0F)
  53.     {
  54.         private static final String __OBFID = "CL_00000200";
  55.         public String func_150495_a()
  56.         {
  57.             return "dig.glass";
  58.         }
  59.         public String func_150496_b()
  60.         {
  61.             return "step.stone";
  62.         }
  63.     };
  64.  
  65.     /** Sound for cloth and carpets */
  66.     public static final Block.SoundType soundTypeCloth = new Block.SoundType("cloth", 1.0F, 1.0F);
  67.     public static final Block.SoundType field_149776_m = new Block.SoundType("sand", 1.0F, 1.0F);
  68.     public static final Block.SoundType soundTypeSnow = new Block.SoundType("snow", 1.0F, 1.0F);
  69.  
  70.     /** The ladder sound type */
  71.     public static final Block.SoundType soundTypeLadder = new Block.SoundType("ladder", 1.0F, 1.0F)
  72.     {
  73.         private static final String __OBFID = "CL_00000201";
  74.         public String func_150495_a()
  75.         {
  76.             return "dig.wood";
  77.         }
  78.     };
  79.  
  80.     /** The anvil sound type */
  81.     public static final Block.SoundType soundTypeAnvil = new Block.SoundType("anvil", 0.3F, 1.0F)
  82.     {
  83.         private static final String __OBFID = "CL_00000202";
  84.         public String func_150495_a()
  85.         {
  86.             return "dig.stone";
  87.         }
  88.         public String func_150496_b()
  89.         {
  90.             return "random.anvil_land";
  91.         }
  92.     };
  93.     protected boolean opaque;
  94.  
  95.     /** How much light is subtracted for going through this block */
  96.     protected int lightOpacity;
  97.     protected boolean canBlockGrass;
  98.  
  99.     /** Amount of light emitted */
  100.     protected int lightValue;
  101.     protected boolean field_149783_u;
  102.  
  103.     /** Indicates how many hits it takes to break a block. */
  104.     protected float blockHardness;
  105.     protected float blockResistance;
  106.     protected boolean field_149791_x = true;
  107.     protected boolean enableStats = true;
  108.  
  109.     /**
  110.      * Flags whether or not this block is of a type that needs random ticking. Ref-counted by ExtendedBlockStorage in
  111.      * order to broadly cull a chunk from the random chunk update list for efficiency's sake.
  112.      */
  113.     protected boolean needsRandomTick;
  114.  
  115.     /** true if the Block contains a Tile Entity */
  116.     protected boolean isBlockContainer;
  117.     protected double field_149759_B;
  118.     protected double field_149760_C;
  119.     protected double field_149754_D;
  120.     protected double field_149755_E;
  121.     protected double field_149756_F;
  122.     protected double field_149757_G;
  123.  
  124.     /** Sound of stepping on the block */
  125.     public Block.SoundType stepSound;
  126.     public float blockParticleGravity;
  127.     protected final Material blockMaterial;
  128.  
  129.     /**
  130.      * Determines how much velocity is maintained while moving on top of this block
  131.      */
  132.     public float slipperiness;
  133.     private String unlocalizedNameBlock;
  134.     protected IIcon blockIcon;
  135.     private static final String __OBFID = "CL_00000199";
  136.  
  137.     public static int getIdFromBlock(Block p_149682_0_)
  138.     {
  139.         return blockRegistry.getIDForObject(p_149682_0_);
  140.     }
  141.  
  142.     public static Block getBlockById(int p_149729_0_)
  143.     {
  144.         return (Block)blockRegistry.getObjectForID(p_149729_0_);
  145.     }
  146.  
  147.     public static Block getBlockFromItem(Item p_149634_0_)
  148.     {
  149.         return getBlockById(Item.getIdFromItem(p_149634_0_));
  150.     }
  151.  
  152.     public static Block getBlockFromName(String p_149684_0_)
  153.     {
  154.         if (blockRegistry.containsKey(p_149684_0_))
  155.         {
  156.             return (Block)blockRegistry.getObject(p_149684_0_);
  157.         }
  158.         else
  159.         {
  160.             try
  161.             {
  162.                 return (Block)blockRegistry.getObjectForID(Integer.parseInt(p_149684_0_));
  163.             }
  164.             catch (NumberFormatException var2)
  165.             {
  166.                 return null;
  167.             }
  168.         }
  169.     }
  170.  
  171.     public boolean func_149730_j()
  172.     {
  173.         return this.opaque;
  174.     }
  175.  
  176.     public int getLightOpacity()
  177.     {
  178.         return this.lightOpacity;
  179.     }
  180.  
  181.     public boolean getCanBlockGrass()
  182.     {
  183.         return this.canBlockGrass;
  184.     }
  185.  
  186.     public int getLightValue()
  187.     {
  188.         return this.lightValue;
  189.     }
  190.  
  191.     public boolean func_149710_n()
  192.     {
  193.         return this.field_149783_u;
  194.     }
  195.  
  196.     public Material getMaterial()
  197.     {
  198.         return this.blockMaterial;
  199.     }
  200.  
  201.     public MapColor getMapColor(int p_149728_1_)
  202.     {
  203.         return this.getMaterial().getMaterialMapColor();
  204.     }
  205.  
  206.     public static void registerBlocks()
  207.     {
  208.         blockRegistry.addObject(0, "air", (new BlockAir()).setBlockName("air"));
  209.         blockRegistry.addObject(1, "stone", (new BlockStone()).setHardness(1.5F).setResistance(10.0F).setStepSound(soundTypePiston).setBlockName("stone").setBlockTextureName("stone"));
  210.         blockRegistry.addObject(2, "grass", (new BlockGrass()).setHardness(0.6F).setStepSound(soundTypeGrass).setBlockName("grass").setBlockTextureName("grass"));
  211.         blockRegistry.addObject(3, "dirt", (new BlockDirt()).setHardness(0.5F).setStepSound(soundTypeGravel).setBlockName("dirt").setBlockTextureName("dirt"));
  212.         Block var0 = (new Block(Material.rock)).setHardness(2.0F).setResistance(10.0F).setStepSound(soundTypePiston).setBlockName("stonebrick").setCreativeTab(CreativeTabs.tabBlock).setBlockTextureName("cobblestone");
  213.         blockRegistry.addObject(4, "cobblestone", var0);
  214.         Block var1 = (new BlockWood()).setHardness(2.0F).setResistance(5.0F).setStepSound(soundTypeWood).setBlockName("wood").setBlockTextureName("planks");
  215.         blockRegistry.addObject(5, "planks", var1);
  216.         blockRegistry.addObject(6, "sapling", (new BlockSapling()).setHardness(0.0F).setStepSound(soundTypeGrass).setBlockName("sapling").setBlockTextureName("sapling"));
  217.         blockRegistry.addObject(7, "bedrock", (new Block(Material.rock)).setBlockUnbreakable().setResistance(6000000.0F).setStepSound(soundTypePiston).setBlockName("bedrock").disableStats().setCreativeTab(CreativeTabs.tabBlock).setBlockTextureName("bedrock"));
  218.         blockRegistry.addObject(8, "flowing_water", (new BlockDynamicLiquid(Material.water)).setHardness(100.0F).setLightOpacity(3).setBlockName("water").disableStats().setBlockTextureName("water_flow"));
  219.         blockRegistry.addObject(9, "water", (new BlockStaticLiquid(Material.water)).setHardness(100.0F).setLightOpacity(3).setBlockName("water").disableStats().setBlockTextureName("water_still"));
  220.         blockRegistry.addObject(10, "flowing_lava", (new BlockDynamicLiquid(Material.lava)).setHardness(100.0F).setLightLevel(1.0F).setBlockName("lava").disableStats().setBlockTextureName("lava_flow"));
  221.         blockRegistry.addObject(11, "lava", (new BlockStaticLiquid(Material.lava)).setHardness(100.0F).setLightLevel(1.0F).setBlockName("lava").disableStats().setBlockTextureName("lava_still"));
  222.         blockRegistry.addObject(12, "sand", (new BlockSand()).setHardness(0.5F).setStepSound(field_149776_m).setBlockName("sand").setBlockTextureName("sand"));
  223.         blockRegistry.addObject(13, "gravel", (new BlockGravel()).setHardness(0.6F).setStepSound(soundTypeGravel).setBlockName("gravel").setBlockTextureName("gravel"));
  224.         blockRegistry.addObject(14, "gold_ore", (new BlockOre()).setHardness(3.0F).setResistance(5.0F).setStepSound(soundTypePiston).setBlockName("oreGold").setBlockTextureName("gold_ore"));
  225.         blockRegistry.addObject(15, "iron_ore", (new BlockOre()).setHardness(3.0F).setResistance(5.0F).setStepSound(soundTypePiston).setBlockName("oreIron").setBlockTextureName("iron_ore"));
  226.         blockRegistry.addObject(16, "coal_ore", (new BlockOre()).setHardness(3.0F).setResistance(5.0F).setStepSound(soundTypePiston).setBlockName("oreCoal").setBlockTextureName("coal_ore"));
  227.         blockRegistry.addObject(17, "log", (new BlockOldLog()).setBlockName("log").setBlockTextureName("log"));
  228.         blockRegistry.addObject(18, "leaves", (new BlockOldLeaf()).setBlockName("leaves").setBlockTextureName("leaves"));
  229.         blockRegistry.addObject(19, "sponge", (new BlockSponge()).setHardness(0.6F).setStepSound(soundTypeGrass).setBlockName("sponge").setBlockTextureName("sponge"));
  230.         blockRegistry.addObject(20, "glass", (new BlockGlass(Material.glass, false)).setHardness(0.3F).setStepSound(soundTypeGlass).setBlockName("glass").setBlockTextureName("glass"));
  231.         blockRegistry.addObject(21, "lapis_ore", (new BlockOre()).setHardness(3.0F).setResistance(5.0F).setStepSound(soundTypePiston).setBlockName("oreLapis").setBlockTextureName("lapis_ore"));
  232.         blockRegistry.addObject(22, "lapis_block", (new BlockCompressed(MapColor.field_151652_H)).setHardness(3.0F).setResistance(5.0F).setStepSound(soundTypePiston).setBlockName("blockLapis").setCreativeTab(CreativeTabs.tabBlock).setBlockTextureName("lapis_block"));
  233.         blockRegistry.addObject(23, "dispenser", (new BlockDispenser()).setHardness(3.5F).setStepSound(soundTypePiston).setBlockName("dispenser").setBlockTextureName("dispenser"));
  234.         Block var2 = (new BlockSandStone()).setStepSound(soundTypePiston).setHardness(0.8F).setBlockName("sandStone").setBlockTextureName("sandstone");
  235.         blockRegistry.addObject(24, "sandstone", var2);
  236.         blockRegistry.addObject(25, "noteblock", (new BlockNote()).setHardness(0.8F).setBlockName("musicBlock").setBlockTextureName("noteblock"));
  237.         blockRegistry.addObject(26, "bed", (new BlockBed()).setHardness(0.2F).setBlockName("bed").disableStats().setBlockTextureName("bed"));
  238.         blockRegistry.addObject(27, "golden_rail", (new BlockRailPowered()).setHardness(0.7F).setStepSound(soundTypeMetal).setBlockName("goldenRail").setBlockTextureName("rail_golden"));
  239.         blockRegistry.addObject(28, "detector_rail", (new BlockRailDetector()).setHardness(0.7F).setStepSound(soundTypeMetal).setBlockName("detectorRail").setBlockTextureName("rail_detector"));
  240.         blockRegistry.addObject(29, "sticky_piston", (new BlockPistonBase(true)).setBlockName("pistonStickyBase"));
  241.         blockRegistry.addObject(30, "web", (new BlockWeb()).setLightOpacity(1).setHardness(4.0F).setBlockName("web").setBlockTextureName("web"));
  242.         blockRegistry.addObject(31, "tallgrass", (new BlockTallGrass()).setHardness(0.0F).setStepSound(soundTypeGrass).setBlockName("tallgrass"));
  243.         blockRegistry.addObject(32, "deadbush", (new BlockDeadBush()).setHardness(0.0F).setStepSound(soundTypeGrass).setBlockName("deadbush").setBlockTextureName("deadbush"));
  244.         blockRegistry.addObject(33, "piston", (new BlockPistonBase(false)).setBlockName("pistonBase"));
  245.         blockRegistry.addObject(34, "piston_head", new BlockPistonExtension());
  246.         blockRegistry.addObject(35, "wool", (new BlockColored(Material.cloth)).setHardness(0.8F).setStepSound(soundTypeCloth).setBlockName("cloth").setBlockTextureName("wool_colored"));
  247.         blockRegistry.addObject(36, "piston_extension", new BlockPistonMoving());
  248.         blockRegistry.addObject(37, "yellow_flower", (new BlockFlower(0)).setHardness(0.0F).setStepSound(soundTypeGrass).setBlockName("flower1").setBlockTextureName("flower_dandelion"));
  249.         blockRegistry.addObject(38, "red_flower", (new BlockFlower(1)).setHardness(0.0F).setStepSound(soundTypeGrass).setBlockName("flower2").setBlockTextureName("flower_rose"));
  250.         blockRegistry.addObject(39, "brown_mushroom", (new BlockMushroom()).setHardness(0.0F).setStepSound(soundTypeGrass).setLightLevel(0.125F).setBlockName("mushroom").setBlockTextureName("mushroom_brown"));
  251.         blockRegistry.addObject(40, "red_mushroom", (new BlockMushroom()).setHardness(0.0F).setStepSound(soundTypeGrass).setBlockName("mushroom").setBlockTextureName("mushroom_red"));
  252.         blockRegistry.addObject(41, "gold_block", (new BlockCompressed(MapColor.field_151647_F)).setHardness(3.0F).setResistance(10.0F).setStepSound(soundTypeMetal).setBlockName("blockGold").setBlockTextureName("gold_block"));
  253.         blockRegistry.addObject(42, "iron_block", (new BlockCompressed(MapColor.field_151668_h)).setHardness(5.0F).setResistance(10.0F).setStepSound(soundTypeMetal).setBlockName("blockIron").setBlockTextureName("iron_block"));
  254.         blockRegistry.addObject(43, "double_stone_slab", (new BlockStoneSlab(true)).setHardness(2.0F).setResistance(10.0F).setStepSound(soundTypePiston).setBlockName("stoneSlab"));
  255.         blockRegistry.addObject(44, "stone_slab", (new BlockStoneSlab(false)).setHardness(2.0F).setResistance(10.0F).setStepSound(soundTypePiston).setBlockName("stoneSlab"));
  256.         Block var3 = (new Block(Material.rock)).setHardness(2.0F).setResistance(10.0F).setStepSound(soundTypePiston).setBlockName("brick").setCreativeTab(CreativeTabs.tabBlock).setBlockTextureName("brick");
  257.         blockRegistry.addObject(45, "brick_block", var3);
  258.         blockRegistry.addObject(46, "tnt", (new BlockTNT()).setHardness(0.0F).setStepSound(soundTypeGrass).setBlockName("tnt").setBlockTextureName("tnt"));
  259.         blockRegistry.addObject(47, "bookshelf", (new BlockBookshelf()).setHardness(1.5F).setStepSound(soundTypeWood).setBlockName("bookshelf").setBlockTextureName("bookshelf"));
  260.         blockRegistry.addObject(48, "mossy_cobblestone", (new Block(Material.rock)).setHardness(2.0F).setResistance(10.0F).setStepSound(soundTypePiston).setBlockName("stoneMoss").setCreativeTab(CreativeTabs.tabBlock).setBlockTextureName("cobblestone_mossy"));
  261.         blockRegistry.addObject(49, "obsidian", (new BlockObsidian()).setHardness(50.0F).setResistance(2000.0F).setStepSound(soundTypePiston).setBlockName("obsidian").setBlockTextureName("obsidian"));
  262.         blockRegistry.addObject(50, "torch", (new BlockTorch()).setHardness(0.0F).setLightLevel(0.9375F).setStepSound(soundTypeWood).setBlockName("torch").setBlockTextureName("torch_on"));
  263.         blockRegistry.addObject(51, "fire", (new BlockFire()).setHardness(0.0F).setLightLevel(1.0F).setStepSound(soundTypeWood).setBlockName("fire").disableStats().setBlockTextureName("fire"));
  264.         blockRegistry.addObject(52, "mob_spawner", (new BlockMobSpawner()).setHardness(5.0F).setStepSound(soundTypeMetal).setBlockName("mobSpawner").disableStats().setBlockTextureName("mob_spawner"));
  265.         blockRegistry.addObject(53, "oak_stairs", (new BlockStairs(var1, 0)).setBlockName("stairsWood"));
  266.         blockRegistry.addObject(54, "chest", (new BlockChest(0)).setHardness(2.5F).setStepSound(soundTypeWood).setBlockName("chest"));
  267.         blockRegistry.addObject(55, "redstone_wire", (new BlockRedstoneWire()).setHardness(0.0F).setStepSound(soundTypeStone).setBlockName("redstoneDust").disableStats().setBlockTextureName("redstone_dust"));
  268.         blockRegistry.addObject(56, "diamond_ore", (new BlockOre()).setHardness(3.0F).setResistance(5.0F).setStepSound(soundTypePiston).setBlockName("oreDiamond").setBlockTextureName("diamond_ore"));
  269.         blockRegistry.addObject(57, "diamond_block", (new BlockCompressed(MapColor.field_151648_G)).setHardness(5.0F).setResistance(10.0F).setStepSound(soundTypeMetal).setBlockName("blockDiamond").setBlockTextureName("diamond_block"));
  270.         blockRegistry.addObject(58, "crafting_table", (new BlockWorkbench()).setHardness(2.5F).setStepSound(soundTypeWood).setBlockName("workbench").setBlockTextureName("crafting_table"));
  271.         blockRegistry.addObject(59, "wheat", (new BlockCrops()).setBlockName("crops").setBlockTextureName("wheat"));
  272.         Block var4 = (new BlockFarmland()).setHardness(0.6F).setStepSound(soundTypeGravel).setBlockName("farmland").setBlockTextureName("farmland");
  273.         blockRegistry.addObject(60, "farmland", var4);
  274.         blockRegistry.addObject(61, "furnace", (new BlockFurnace(false)).setHardness(3.5F).setStepSound(soundTypePiston).setBlockName("furnace").setCreativeTab(CreativeTabs.tabDecorations));
  275.         blockRegistry.addObject(62, "lit_furnace", (new BlockFurnace(true)).setHardness(3.5F).setStepSound(soundTypePiston).setLightLevel(0.875F).setBlockName("furnace"));
  276.         blockRegistry.addObject(63, "standing_sign", (new BlockSign(TileEntitySign.class, true)).setHardness(1.0F).setStepSound(soundTypeWood).setBlockName("sign").disableStats());
  277.         blockRegistry.addObject(64, "wooden_door", (new BlockDoor(Material.wood)).setHardness(3.0F).setStepSound(soundTypeWood).setBlockName("doorWood").disableStats().setBlockTextureName("door_wood"));
  278.         blockRegistry.addObject(65, "ladder", (new BlockLadder()).setHardness(0.4F).setStepSound(soundTypeLadder).setBlockName("ladder").setBlockTextureName("ladder"));
  279.         blockRegistry.addObject(66, "rail", (new BlockRail()).setHardness(0.7F).setStepSound(soundTypeMetal).setBlockName("rail").setBlockTextureName("rail_normal"));
  280.         blockRegistry.addObject(67, "stone_stairs", (new BlockStairs(var0, 0)).setBlockName("stairsStone"));
  281.         blockRegistry.addObject(68, "wall_sign", (new BlockSign(TileEntitySign.class, false)).setHardness(1.0F).setStepSound(soundTypeWood).setBlockName("sign").disableStats());
  282.         blockRegistry.addObject(69, "lever", (new BlockLever()).setHardness(0.5F).setStepSound(soundTypeWood).setBlockName("lever").setBlockTextureName("lever"));
  283.         blockRegistry.addObject(70, "stone_pressure_plate", (new BlockPressurePlate("stone", Material.rock, BlockPressurePlate.Sensitivity.mobs)).setHardness(0.5F).setStepSound(soundTypePiston).setBlockName("pressurePlate"));
  284.         blockRegistry.addObject(71, "iron_door", (new BlockDoor(Material.iron)).setHardness(5.0F).setStepSound(soundTypeMetal).setBlockName("doorIron").disableStats().setBlockTextureName("door_iron"));
  285.         blockRegistry.addObject(72, "wooden_pressure_plate", (new BlockPressurePlate("planks_oak", Material.wood, BlockPressurePlate.Sensitivity.everything)).setHardness(0.5F).setStepSound(soundTypeWood).setBlockName("pressurePlate"));
  286.         blockRegistry.addObject(73, "redstone_ore", (new BlockRedstoneOre(false)).setHardness(3.0F).setResistance(5.0F).setStepSound(soundTypePiston).setBlockName("oreRedstone").setCreativeTab(CreativeTabs.tabBlock).setBlockTextureName("redstone_ore"));
  287.         blockRegistry.addObject(74, "lit_redstone_ore", (new BlockRedstoneOre(true)).setLightLevel(0.625F).setHardness(3.0F).setResistance(5.0F).setStepSound(soundTypePiston).setBlockName("oreRedstone").setBlockTextureName("redstone_ore"));
  288.         blockRegistry.addObject(75, "unlit_redstone_torch", (new BlockRedstoneTorch(false)).setHardness(0.0F).setStepSound(soundTypeWood).setBlockName("notGate").setBlockTextureName("redstone_torch_off"));
  289.         blockRegistry.addObject(76, "redstone_torch", (new BlockRedstoneTorch(true)).setHardness(0.0F).setLightLevel(0.5F).setStepSound(soundTypeWood).setBlockName("notGate").setCreativeTab(CreativeTabs.tabRedstone).setBlockTextureName("redstone_torch_on"));
  290.         blockRegistry.addObject(77, "stone_button", (new BlockButtonStone()).setHardness(0.5F).setStepSound(soundTypePiston).setBlockName("button"));
  291.         blockRegistry.addObject(78, "snow_layer", (new BlockSnow()).setHardness(0.1F).setStepSound(soundTypeSnow).setBlockName("snow").setLightOpacity(0).setBlockTextureName("snow"));
  292.         blockRegistry.addObject(79, "ice", (new BlockIce()).setHardness(0.5F).setLightOpacity(3).setStepSound(soundTypeGlass).setBlockName("ice").setBlockTextureName("ice"));
  293.         blockRegistry.addObject(80, "snow", (new BlockSnowBlock()).setHardness(0.2F).setStepSound(soundTypeSnow).setBlockName("snow").setBlockTextureName("snow"));
  294.         blockRegistry.addObject(81, "cactus", (new BlockCactus()).setHardness(0.4F).setStepSound(soundTypeCloth).setBlockName("cactus").setBlockTextureName("cactus"));
  295.         blockRegistry.addObject(82, "clay", (new BlockClay()).setHardness(0.6F).setStepSound(soundTypeGravel).setBlockName("clay").setBlockTextureName("clay"));
  296.         blockRegistry.addObject(83, "reeds", (new BlockReed()).setHardness(0.0F).setStepSound(soundTypeGrass).setBlockName("reeds").disableStats().setBlockTextureName("reeds"));
  297.         blockRegistry.addObject(84, "jukebox", (new BlockJukebox()).setHardness(2.0F).setResistance(10.0F).setStepSound(soundTypePiston).setBlockName("jukebox").setBlockTextureName("jukebox"));
  298.         blockRegistry.addObject(85, "fence", (new BlockFence("planks_oak", Material.wood)).setHardness(2.0F).setResistance(5.0F).setStepSound(soundTypeWood).setBlockName("fence"));
  299.         Block var5 = (new BlockPumpkin(false)).setHardness(1.0F).setStepSound(soundTypeWood).setBlockName("pumpkin").setBlockTextureName("pumpkin");
  300.         blockRegistry.addObject(86, "pumpkin", var5);
  301.         blockRegistry.addObject(87, "netherrack", (new BlockNetherrack()).setHardness(0.4F).setStepSound(soundTypePiston).setBlockName("hellrock").setBlockTextureName("netherrack"));
  302.         blockRegistry.addObject(88, "soul_sand", (new BlockSoulSand()).setHardness(0.5F).setStepSound(field_149776_m).setBlockName("hellsand").setBlockTextureName("soul_sand"));
  303.         blockRegistry.addObject(89, "glowstone", (new BlockGlowstone(Material.glass)).setHardness(0.3F).setStepSound(soundTypeGlass).setLightLevel(1.0F).setBlockName("lightgem").setBlockTextureName("glowstone"));
  304.         blockRegistry.addObject(90, "portal", (new BlockPortal()).setHardness(-1.0F).setStepSound(soundTypeGlass).setLightLevel(0.75F).setBlockName("portal").setBlockTextureName("portal"));
  305.         blockRegistry.addObject(91, "lit_pumpkin", (new BlockPumpkin(true)).setHardness(1.0F).setStepSound(soundTypeWood).setLightLevel(1.0F).setBlockName("litpumpkin").setBlockTextureName("pumpkin"));
  306.         blockRegistry.addObject(92, "cake", (new BlockCake()).setHardness(0.5F).setStepSound(soundTypeCloth).setBlockName("cake").disableStats().setBlockTextureName("cake"));
  307.         blockRegistry.addObject(93, "unpowered_repeater", (new BlockRedstoneRepeater(false)).setHardness(0.0F).setStepSound(soundTypeWood).setBlockName("diode").disableStats().setBlockTextureName("repeater_off"));
  308.         blockRegistry.addObject(94, "powered_repeater", (new BlockRedstoneRepeater(true)).setHardness(0.0F).setLightLevel(0.625F).setStepSound(soundTypeWood).setBlockName("diode").disableStats().setBlockTextureName("repeater_on"));
  309.         blockRegistry.addObject(95, "stained_glass", (new BlockStainedGlass(Material.glass)).setHardness(0.3F).setStepSound(soundTypeGlass).setBlockName("stainedGlass").setBlockTextureName("glass"));
  310.         blockRegistry.addObject(96, "trapdoor", (new BlockTrapDoor(Material.wood)).setHardness(3.0F).setStepSound(soundTypeWood).setBlockName("trapdoor").disableStats().setBlockTextureName("trapdoor"));
  311.         blockRegistry.addObject(97, "monster_egg", (new BlockSilverfish()).setHardness(0.75F).setBlockName("monsterStoneEgg"));
  312.         Block var6 = (new BlockStoneBrick()).setHardness(1.5F).setResistance(10.0F).setStepSound(soundTypePiston).setBlockName("stonebricksmooth").setBlockTextureName("stonebrick");
  313.         blockRegistry.addObject(98, "stonebrick", var6);
  314.         blockRegistry.addObject(99, "brown_mushroom_block", (new BlockHugeMushroom(Material.wood, 0)).setHardness(0.2F).setStepSound(soundTypeWood).setBlockName("mushroom").setBlockTextureName("mushroom_block"));
  315.         blockRegistry.addObject(100, "red_mushroom_block", (new BlockHugeMushroom(Material.wood, 1)).setHardness(0.2F).setStepSound(soundTypeWood).setBlockName("mushroom").setBlockTextureName("mushroom_block"));
  316.         blockRegistry.addObject(101, "iron_bars", (new BlockPane("iron_bars", "iron_bars", Material.iron, true)).setHardness(5.0F).setResistance(10.0F).setStepSound(soundTypeMetal).setBlockName("fenceIron"));
  317.         blockRegistry.addObject(102, "glass_pane", (new BlockPane("glass", "glass_pane_top", Material.glass, false)).setHardness(0.3F).setStepSound(soundTypeGlass).setBlockName("thinGlass"));
  318.         Block var7 = (new BlockMelon()).setHardness(1.0F).setStepSound(soundTypeWood).setBlockName("melon").setBlockTextureName("melon");
  319.         blockRegistry.addObject(103, "melon_block", var7);
  320.         blockRegistry.addObject(104, "pumpkin_stem", (new BlockStem(var5)).setHardness(0.0F).setStepSound(soundTypeWood).setBlockName("pumpkinStem").setBlockTextureName("pumpkin_stem"));
  321.         blockRegistry.addObject(105, "melon_stem", (new BlockStem(var7)).setHardness(0.0F).setStepSound(soundTypeWood).setBlockName("pumpkinStem").setBlockTextureName("melon_stem"));
  322.         blockRegistry.addObject(106, "vine", (new BlockVine()).setHardness(0.2F).setStepSound(soundTypeGrass).setBlockName("vine").setBlockTextureName("vine"));
  323.         blockRegistry.addObject(107, "fence_gate", (new BlockFenceGate()).setHardness(2.0F).setResistance(5.0F).setStepSound(soundTypeWood).setBlockName("fenceGate"));
  324.         blockRegistry.addObject(108, "brick_stairs", (new BlockStairs(var3, 0)).setBlockName("stairsBrick"));
  325.         blockRegistry.addObject(109, "stone_brick_stairs", (new BlockStairs(var6, 0)).setBlockName("stairsStoneBrickSmooth"));
  326.         blockRegistry.addObject(110, "mycelium", (new BlockMycelium()).setHardness(0.6F).setStepSound(soundTypeGrass).setBlockName("mycel").setBlockTextureName("mycelium"));
  327.         blockRegistry.addObject(111, "waterlily", (new BlockLilyPad()).setHardness(0.0F).setStepSound(soundTypeGrass).setBlockName("waterlily").setBlockTextureName("waterlily"));
  328.         Block var8 = (new Block(Material.rock)).setHardness(2.0F).setResistance(10.0F).setStepSound(soundTypePiston).setBlockName("netherBrick").setCreativeTab(CreativeTabs.tabBlock).setBlockTextureName("nether_brick");
  329.         blockRegistry.addObject(112, "nether_brick", var8);
  330.         blockRegistry.addObject(113, "nether_brick_fence", (new BlockFence("nether_brick", Material.rock)).setHardness(2.0F).setResistance(10.0F).setStepSound(soundTypePiston).setBlockName("netherFence"));
  331.         blockRegistry.addObject(114, "nether_brick_stairs", (new BlockStairs(var8, 0)).setBlockName("stairsNetherBrick"));
  332.         blockRegistry.addObject(115, "nether_wart", (new BlockNetherWart()).setBlockName("netherStalk").setBlockTextureName("nether_wart"));
  333.         blockRegistry.addObject(116, "enchanting_table", (new BlockEnchantmentTable()).setHardness(5.0F).setResistance(2000.0F).setBlockName("enchantmentTable").setBlockTextureName("enchanting_table"));
  334.         blockRegistry.addObject(117, "brewing_stand", (new BlockBrewingStand()).setHardness(0.5F).setLightLevel(0.125F).setBlockName("brewingStand").setBlockTextureName("brewing_stand"));
  335.         blockRegistry.addObject(118, "cauldron", (new BlockCauldron()).setHardness(2.0F).setBlockName("cauldron").setBlockTextureName("cauldron"));
  336.         blockRegistry.addObject(119, "end_portal", (new BlockEndPortal(Material.Portal)).setHardness(-1.0F).setResistance(6000000.0F));
  337.         blockRegistry.addObject(120, "end_portal_frame", (new BlockEndPortalFrame()).setStepSound(soundTypeGlass).setLightLevel(0.125F).setHardness(-1.0F).setBlockName("endPortalFrame").setResistance(6000000.0F).setCreativeTab(CreativeTabs.tabDecorations).setBlockTextureName("endframe"));
  338.         blockRegistry.addObject(121, "end_stone", (new Block(Material.rock)).setHardness(3.0F).setResistance(15.0F).setStepSound(soundTypePiston).setBlockName("whiteStone").setCreativeTab(CreativeTabs.tabBlock).setBlockTextureName("end_stone"));
  339.         blockRegistry.addObject(122, "dragon_egg", (new BlockDragonEgg()).setHardness(3.0F).setResistance(15.0F).setStepSound(soundTypePiston).setLightLevel(0.125F).setBlockName("dragonEgg").setBlockTextureName("dragon_egg"));
  340.         blockRegistry.addObject(123, "redstone_lamp", (new BlockRedstoneLight(false)).setHardness(0.3F).setStepSound(soundTypeGlass).setBlockName("redstoneLight").setCreativeTab(CreativeTabs.tabRedstone).setBlockTextureName("redstone_lamp_off"));
  341.         blockRegistry.addObject(124, "lit_redstone_lamp", (new BlockRedstoneLight(true)).setHardness(0.3F).setStepSound(soundTypeGlass).setBlockName("redstoneLight").setBlockTextureName("redstone_lamp_on"));
  342.         blockRegistry.addObject(125, "double_wooden_slab", (new BlockWoodSlab(true)).setHardness(2.0F).setResistance(5.0F).setStepSound(soundTypeWood).setBlockName("woodSlab"));
  343.         blockRegistry.addObject(126, "wooden_slab", (new BlockWoodSlab(false)).setHardness(2.0F).setResistance(5.0F).setStepSound(soundTypeWood).setBlockName("woodSlab"));
  344.         blockRegistry.addObject(127, "cocoa", (new BlockCocoa()).setHardness(0.2F).setResistance(5.0F).setStepSound(soundTypeWood).setBlockName("cocoa").setBlockTextureName("cocoa"));
  345.         blockRegistry.addObject(128, "sandstone_stairs", (new BlockStairs(var2, 0)).setBlockName("stairsSandStone"));
  346.         blockRegistry.addObject(129, "emerald_ore", (new BlockOre()).setHardness(3.0F).setResistance(5.0F).setStepSound(soundTypePiston).setBlockName("oreEmerald").setBlockTextureName("emerald_ore"));
  347.         blockRegistry.addObject(130, "ender_chest", (new BlockEnderChest()).setHardness(22.5F).setResistance(1000.0F).setStepSound(soundTypePiston).setBlockName("enderChest").setLightLevel(0.5F));
  348.         blockRegistry.addObject(131, "tripwire_hook", (new BlockTripWireHook()).setBlockName("tripWireSource").setBlockTextureName("trip_wire_source"));
  349.         blockRegistry.addObject(132, "tripwire", (new BlockTripWire()).setBlockName("tripWire").setBlockTextureName("trip_wire"));
  350.         blockRegistry.addObject(133, "emerald_block", (new BlockCompressed(MapColor.field_151653_I)).setHardness(5.0F).setResistance(10.0F).setStepSound(soundTypeMetal).setBlockName("blockEmerald").setBlockTextureName("emerald_block"));
  351.         blockRegistry.addObject(134, "spruce_stairs", (new BlockStairs(var1, 1)).setBlockName("stairsWoodSpruce"));
  352.         blockRegistry.addObject(135, "birch_stairs", (new BlockStairs(var1, 2)).setBlockName("stairsWoodBirch"));
  353.         blockRegistry.addObject(136, "jungle_stairs", (new BlockStairs(var1, 3)).setBlockName("stairsWoodJungle"));
  354.         blockRegistry.addObject(137, "command_block", (new BlockCommandBlock()).setBlockUnbreakable().setResistance(6000000.0F).setBlockName("commandBlock").setBlockTextureName("command_block"));
  355.         blockRegistry.addObject(138, "beacon", (new BlockBeacon()).setBlockName("beacon").setLightLevel(1.0F).setBlockTextureName("beacon"));
  356.         blockRegistry.addObject(139, "cobblestone_wall", (new BlockWall(var0)).setBlockName("cobbleWall"));
  357.         blockRegistry.addObject(140, "flower_pot", (new BlockFlowerPot()).setHardness(0.0F).setStepSound(soundTypeStone).setBlockName("flowerPot").setBlockTextureName("flower_pot"));
  358.         blockRegistry.addObject(141, "carrots", (new BlockCarrot()).setBlockName("carrots").setBlockTextureName("carrots"));
  359.         blockRegistry.addObject(142, "potatoes", (new BlockPotato()).setBlockName("potatoes").setBlockTextureName("potatoes"));
  360.         blockRegistry.addObject(143, "wooden_button", (new BlockButtonWood()).setHardness(0.5F).setStepSound(soundTypeWood).setBlockName("button"));
  361.         blockRegistry.addObject(144, "skull", (new BlockSkull()).setHardness(1.0F).setStepSound(soundTypePiston).setBlockName("skull").setBlockTextureName("skull"));
  362.         blockRegistry.addObject(145, "anvil", (new BlockAnvil()).setHardness(5.0F).setStepSound(soundTypeAnvil).setResistance(2000.0F).setBlockName("anvil"));
  363.         blockRegistry.addObject(146, "trapped_chest", (new BlockChest(1)).setHardness(2.5F).setStepSound(soundTypeWood).setBlockName("chestTrap"));
  364.         blockRegistry.addObject(147, "light_weighted_pressure_plate", (new BlockPressurePlateWeighted("gold_block", Material.iron, 15)).setHardness(0.5F).setStepSound(soundTypeWood).setBlockName("weightedPlate_light"));
  365.         blockRegistry.addObject(148, "heavy_weighted_pressure_plate", (new BlockPressurePlateWeighted("iron_block", Material.iron, 150)).setHardness(0.5F).setStepSound(soundTypeWood).setBlockName("weightedPlate_heavy"));
  366.         blockRegistry.addObject(149, "unpowered_comparator", (new BlockRedstoneComparator(false)).setHardness(0.0F).setStepSound(soundTypeWood).setBlockName("comparator").disableStats().setBlockTextureName("comparator_off"));
  367.         blockRegistry.addObject(150, "powered_comparator", (new BlockRedstoneComparator(true)).setHardness(0.0F).setLightLevel(0.625F).setStepSound(soundTypeWood).setBlockName("comparator").disableStats().setBlockTextureName("comparator_on"));
  368.         blockRegistry.addObject(151, "daylight_detector", (new BlockDaylightDetector()).setHardness(0.2F).setStepSound(soundTypeWood).setBlockName("daylightDetector").setBlockTextureName("daylight_detector"));
  369.         blockRegistry.addObject(152, "redstone_block", (new BlockCompressedPowered(MapColor.field_151656_f)).setHardness(5.0F).setResistance(10.0F).setStepSound(soundTypeMetal).setBlockName("blockRedstone").setBlockTextureName("redstone_block"));
  370.         blockRegistry.addObject(153, "quartz_ore", (new BlockOre()).setHardness(3.0F).setResistance(5.0F).setStepSound(soundTypePiston).setBlockName("netherquartz").setBlockTextureName("quartz_ore"));
  371.         blockRegistry.addObject(154, "hopper", (new BlockHopper()).setHardness(3.0F).setResistance(8.0F).setStepSound(soundTypeWood).setBlockName("hopper").setBlockTextureName("hopper"));
  372.         Block var9 = (new BlockQuartz()).setStepSound(soundTypePiston).setHardness(0.8F).setBlockName("quartzBlock").setBlockTextureName("quartz_block");
  373.         blockRegistry.addObject(155, "quartz_block", var9);
  374.         blockRegistry.addObject(156, "quartz_stairs", (new BlockStairs(var9, 0)).setBlockName("stairsQuartz"));
  375.         blockRegistry.addObject(157, "activator_rail", (new BlockRailPowered()).setHardness(0.7F).setStepSound(soundTypeMetal).setBlockName("activatorRail").setBlockTextureName("rail_activator"));
  376.         blockRegistry.addObject(158, "dropper", (new BlockDropper()).setHardness(3.5F).setStepSound(soundTypePiston).setBlockName("dropper").setBlockTextureName("dropper"));
  377.         blockRegistry.addObject(159, "stained_hardened_clay", (new BlockColored(Material.rock)).setHardness(1.25F).setResistance(7.0F).setStepSound(soundTypePiston).setBlockName("clayHardenedStained").setBlockTextureName("hardened_clay_stained"));
  378.         blockRegistry.addObject(160, "stained_glass_pane", (new BlockStainedGlassPane()).setHardness(0.3F).setStepSound(soundTypeGlass).setBlockName("thinStainedGlass").setBlockTextureName("glass"));
  379.         blockRegistry.addObject(161, "leaves2", (new BlockNewLeaf()).setBlockName("leaves").setBlockTextureName("leaves"));
  380.         blockRegistry.addObject(162, "log2", (new BlockNewLog()).setBlockName("log").setBlockTextureName("log"));
  381.         blockRegistry.addObject(163, "acacia_stairs", (new BlockStairs(var1, 4)).setBlockName("stairsWoodAcacia"));
  382.         blockRegistry.addObject(164, "dark_oak_stairs", (new BlockStairs(var1, 5)).setBlockName("stairsWoodDarkOak"));
  383.         blockRegistry.addObject(170, "hay_block", (new BlockHay()).setHardness(0.5F).setStepSound(soundTypeGrass).setBlockName("hayBlock").setCreativeTab(CreativeTabs.tabBlock).setBlockTextureName("hay_block"));
  384.         blockRegistry.addObject(171, "carpet", (new BlockCarpet()).setHardness(0.1F).setStepSound(soundTypeCloth).setBlockName("woolCarpet").setLightOpacity(0));
  385.         blockRegistry.addObject(172, "hardened_clay", (new BlockHardenedClay()).setHardness(1.25F).setResistance(7.0F).setStepSound(soundTypePiston).setBlockName("clayHardened").setBlockTextureName("hardened_clay"));
  386.         blockRegistry.addObject(173, "coal_block", (new Block(Material.rock)).setHardness(5.0F).setResistance(10.0F).setStepSound(soundTypePiston).setBlockName("blockCoal").setCreativeTab(CreativeTabs.tabBlock).setBlockTextureName("coal_block"));
  387.         blockRegistry.addObject(174, "packed_ice", (new BlockPackedIce()).setHardness(0.5F).setStepSound(soundTypeGlass).setBlockName("icePacked").setBlockTextureName("ice_packed"));
  388.         blockRegistry.addObject(175, "double_plant", new BlockDoublePlant());
  389.        
  390.         // Karyx - Minerais
  391.        
  392.         blockRegistry.addObject(176, "citrine_ore", (new BlockOre()).setHardness(3.0F).setResistance(5.0F).setStepSound(soundTypePiston).setBlockName("oreCitrine").setBlockTextureName("citrine_ore"));
  393.         blockRegistry.addObject(177, "saphir_ore", (new BlockOre()).setHardness(3.0F).setResistance(5.0F).setStepSound(soundTypePiston).setBlockName("oreSaphir").setBlockTextureName("saphir_ore"));
  394.         blockRegistry.addObject(178, "cobalt_ore", (new BlockOre()).setHardness(3.0F).setResistance(5.0F).setStepSound(soundTypePiston).setBlockName("oreCobalt").setBlockTextureName("cobalt_ore"));
  395.         blockRegistry.addObject(179, "onyx_ore", (new BlockOre()).setHardness(3.0F).setResistance(5.0F).setStepSound(soundTypePiston).setBlockName("oreOnyx").setBlockTextureName("onyx_ore"));
  396.        
  397.         Iterator var10 = blockRegistry.iterator();
  398.  
  399.         while (var10.hasNext())
  400.         {
  401.             Block var11 = (Block)var10.next();
  402.  
  403.             if (var11.blockMaterial == Material.air)
  404.             {
  405.                 var11.field_149783_u = false;
  406.             }
  407.             else
  408.             {
  409.                 boolean var12 = false;
  410.                 boolean var13 = var11.getRenderType() == 10;
  411.                 boolean var14 = var11 instanceof BlockSlab;
  412.                 boolean var15 = var11 == var4;
  413.                 boolean var16 = var11.canBlockGrass;
  414.                 boolean var17 = var11.lightOpacity == 0;
  415.  
  416.                 if (var13 || var14 || var15 || var16 || var17)
  417.                 {
  418.                     var12 = true;
  419.                 }
  420.  
  421.                 var11.field_149783_u = var12;
  422.             }
  423.         }
  424.     }
  425.  
  426.     protected Block(Material p_i45394_1_)
  427.     {
  428.         this.stepSound = soundTypeStone;
  429.         this.blockParticleGravity = 1.0F;
  430.         this.slipperiness = 0.6F;
  431.         this.blockMaterial = p_i45394_1_;
  432.         this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
  433.         this.opaque = this.isOpaqueCube();
  434.         this.lightOpacity = this.isOpaqueCube() ? 255 : 0;
  435.         this.canBlockGrass = !p_i45394_1_.getCanBlockGrass();
  436.     }
  437.  
  438.     /**
  439.      * Sets the footstep sound for the block. Returns the object for convenience in constructing.
  440.      */
  441.     protected Block setStepSound(Block.SoundType p_149672_1_)
  442.     {
  443.         this.stepSound = p_149672_1_;
  444.         return this;
  445.     }
  446.  
  447.     /**
  448.      * Sets how much light is blocked going through this block. Returns the object for convenience in constructing.
  449.      */
  450.     protected Block setLightOpacity(int p_149713_1_)
  451.     {
  452.         this.lightOpacity = p_149713_1_;
  453.         return this;
  454.     }
  455.  
  456.     /**
  457.      * Sets the light value that the block emits. Returns resulting block instance for constructing convenience. Args:
  458.      * level
  459.      */
  460.     protected Block setLightLevel(float p_149715_1_)
  461.     {
  462.         this.lightValue = (int)(15.0F * p_149715_1_);
  463.         return this;
  464.     }
  465.  
  466.     /**
  467.      * Sets the the blocks resistance to explosions. Returns the object for convenience in constructing.
  468.      */
  469.     protected Block setResistance(float p_149752_1_)
  470.     {
  471.         this.blockResistance = p_149752_1_ * 3.0F;
  472.         return this;
  473.     }
  474.  
  475.     /**
  476.      * Indicate if a material is a normal solid opaque cube
  477.      */
  478.     public boolean isBlockNormalCube()
  479.     {
  480.         return this.blockMaterial.blocksMovement() && this.renderAsNormalBlock();
  481.     }
  482.  
  483.     public boolean isNormalCube()
  484.     {
  485.         return this.blockMaterial.isOpaque() && this.renderAsNormalBlock() && !this.canProvidePower();
  486.     }
  487.  
  488.     public boolean renderAsNormalBlock()
  489.     {
  490.         return true;
  491.     }
  492.  
  493.     public boolean getBlocksMovement(IBlockAccess p_149655_1_, int p_149655_2_, int p_149655_3_, int p_149655_4_)
  494.     {
  495.         return !this.blockMaterial.blocksMovement();
  496.     }
  497.  
  498.     /**
  499.      * The type of render function that is called for this block
  500.      */
  501.     public int getRenderType()
  502.     {
  503.         return 0;
  504.     }
  505.  
  506.     /**
  507.      * Sets how many hits it takes to break a block.
  508.      */
  509.     protected Block setHardness(float p_149711_1_)
  510.     {
  511.         this.blockHardness = p_149711_1_;
  512.  
  513.         if (this.blockResistance < p_149711_1_ * 5.0F)
  514.         {
  515.             this.blockResistance = p_149711_1_ * 5.0F;
  516.         }
  517.  
  518.         return this;
  519.     }
  520.  
  521.     protected Block setBlockUnbreakable()
  522.     {
  523.         this.setHardness(-1.0F);
  524.         return this;
  525.     }
  526.  
  527.     public float getBlockHardness(World p_149712_1_, int p_149712_2_, int p_149712_3_, int p_149712_4_)
  528.     {
  529.         return this.blockHardness;
  530.     }
  531.  
  532.     /**
  533.      * Sets whether this block type will receive random update ticks
  534.      */
  535.     protected Block setTickRandomly(boolean p_149675_1_)
  536.     {
  537.         this.needsRandomTick = p_149675_1_;
  538.         return this;
  539.     }
  540.  
  541.     /**
  542.      * Returns whether or not this block is of a type that needs random ticking. Called for ref-counting purposes by
  543.      * ExtendedBlockStorage in order to broadly cull a chunk from the random chunk update list for efficiency's sake.
  544.      */
  545.     public boolean getTickRandomly()
  546.     {
  547.         return this.needsRandomTick;
  548.     }
  549.  
  550.     public boolean hasTileEntity()
  551.     {
  552.         return this.isBlockContainer;
  553.     }
  554.  
  555.     protected final void setBlockBounds(float p_149676_1_, float p_149676_2_, float p_149676_3_, float p_149676_4_, float p_149676_5_, float p_149676_6_)
  556.     {
  557.         this.field_149759_B = (double)p_149676_1_;
  558.         this.field_149760_C = (double)p_149676_2_;
  559.         this.field_149754_D = (double)p_149676_3_;
  560.         this.field_149755_E = (double)p_149676_4_;
  561.         this.field_149756_F = (double)p_149676_5_;
  562.         this.field_149757_G = (double)p_149676_6_;
  563.     }
  564.  
  565.     public int getBlockBrightness(IBlockAccess p_149677_1_, int p_149677_2_, int p_149677_3_, int p_149677_4_)
  566.     {
  567.         Block var5 = p_149677_1_.getBlock(p_149677_2_, p_149677_3_, p_149677_4_);
  568.         int var6 = p_149677_1_.getLightBrightnessForSkyBlocks(p_149677_2_, p_149677_3_, p_149677_4_, var5.getLightValue());
  569.  
  570.         if (var6 == 0 && var5 instanceof BlockSlab)
  571.         {
  572.             --p_149677_3_;
  573.             var5 = p_149677_1_.getBlock(p_149677_2_, p_149677_3_, p_149677_4_);
  574.             return p_149677_1_.getLightBrightnessForSkyBlocks(p_149677_2_, p_149677_3_, p_149677_4_, var5.getLightValue());
  575.         }
  576.         else
  577.         {
  578.             return var6;
  579.         }
  580.     }
  581.  
  582.     public boolean shouldSideBeRendered(IBlockAccess p_149646_1_, int p_149646_2_, int p_149646_3_, int p_149646_4_, int p_149646_5_)
  583.     {
  584.         return p_149646_5_ == 0 && this.field_149760_C > 0.0D ? true : (p_149646_5_ == 1 && this.field_149756_F < 1.0D ? true : (p_149646_5_ == 2 && this.field_149754_D > 0.0D ? true : (p_149646_5_ == 3 && this.field_149757_G < 1.0D ? true : (p_149646_5_ == 4 && this.field_149759_B > 0.0D ? true : (p_149646_5_ == 5 && this.field_149755_E < 1.0D ? true : !p_149646_1_.getBlock(p_149646_2_, p_149646_3_, p_149646_4_).isOpaqueCube())))));
  585.     }
  586.  
  587.     public boolean isBlockSolid(IBlockAccess p_149747_1_, int p_149747_2_, int p_149747_3_, int p_149747_4_, int p_149747_5_)
  588.     {
  589.         return p_149747_1_.getBlock(p_149747_2_, p_149747_3_, p_149747_4_).getMaterial().isSolid();
  590.     }
  591.  
  592.     public IIcon getIcon(IBlockAccess p_149673_1_, int p_149673_2_, int p_149673_3_, int p_149673_4_, int p_149673_5_)
  593.     {
  594.         return this.getIcon(p_149673_5_, p_149673_1_.getBlockMetadata(p_149673_2_, p_149673_3_, p_149673_4_));
  595.     }
  596.  
  597.     /**
  598.      * Gets the block's texture. Args: side, meta
  599.      */
  600.     public IIcon getIcon(int p_149691_1_, int p_149691_2_)
  601.     {
  602.         return this.blockIcon;
  603.     }
  604.  
  605.     /**
  606.      * Returns the block texture based on the side being looked at.  Args: side
  607.      */
  608.     public final IIcon getBlockTextureFromSide(int p_149733_1_)
  609.     {
  610.         return this.getIcon(p_149733_1_, 0);
  611.     }
  612.  
  613.     /**
  614.      * Returns the bounding box of the wired rectangular prism to render.
  615.      */
  616.     public AxisAlignedBB getSelectedBoundingBoxFromPool(World p_149633_1_, int p_149633_2_, int p_149633_3_, int p_149633_4_)
  617.     {
  618.         return AxisAlignedBB.getBoundingBox((double)p_149633_2_ + this.field_149759_B, (double)p_149633_3_ + this.field_149760_C, (double)p_149633_4_ + this.field_149754_D, (double)p_149633_2_ + this.field_149755_E, (double)p_149633_3_ + this.field_149756_F, (double)p_149633_4_ + this.field_149757_G);
  619.     }
  620.  
  621.     public void addCollisionBoxesToList(World p_149743_1_, int p_149743_2_, int p_149743_3_, int p_149743_4_, AxisAlignedBB p_149743_5_, List p_149743_6_, Entity p_149743_7_)
  622.     {
  623.         AxisAlignedBB var8 = this.getCollisionBoundingBoxFromPool(p_149743_1_, p_149743_2_, p_149743_3_, p_149743_4_);
  624.  
  625.         if (var8 != null && p_149743_5_.intersectsWith(var8))
  626.         {
  627.             p_149743_6_.add(var8);
  628.         }
  629.     }
  630.  
  631.     /**
  632.      * Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been
  633.      * cleared to be reused)
  634.      */
  635.     public AxisAlignedBB getCollisionBoundingBoxFromPool(World p_149668_1_, int p_149668_2_, int p_149668_3_, int p_149668_4_)
  636.     {
  637.         return AxisAlignedBB.getBoundingBox((double)p_149668_2_ + this.field_149759_B, (double)p_149668_3_ + this.field_149760_C, (double)p_149668_4_ + this.field_149754_D, (double)p_149668_2_ + this.field_149755_E, (double)p_149668_3_ + this.field_149756_F, (double)p_149668_4_ + this.field_149757_G);
  638.     }
  639.  
  640.     public boolean isOpaqueCube()
  641.     {
  642.         return true;
  643.     }
  644.  
  645.     /**
  646.      * Returns whether this block is collideable based on the arguments passed in \n@param par1 block metaData \n@param
  647.      * par2 whether the player right-clicked while holding a boat
  648.      */
  649.     public boolean canCollideCheck(int p_149678_1_, boolean p_149678_2_)
  650.     {
  651.         return this.isCollidable();
  652.     }
  653.  
  654.     public boolean isCollidable()
  655.     {
  656.         return true;
  657.     }
  658.  
  659.     /**
  660.      * Ticks the block if it's been scheduled
  661.      */
  662.     public void updateTick(World p_149674_1_, int p_149674_2_, int p_149674_3_, int p_149674_4_, Random p_149674_5_) {}
  663.  
  664.     /**
  665.      * A randomly called display update to be able to add particles or other items for display
  666.      */
  667.     public void randomDisplayTick(World p_149734_1_, int p_149734_2_, int p_149734_3_, int p_149734_4_, Random p_149734_5_) {}
  668.  
  669.     public void onBlockDestroyedByPlayer(World p_149664_1_, int p_149664_2_, int p_149664_3_, int p_149664_4_, int p_149664_5_) {}
  670.  
  671.     public void onNeighborBlockChange(World p_149695_1_, int p_149695_2_, int p_149695_3_, int p_149695_4_, Block p_149695_5_) {}
  672.  
  673.     public int func_149738_a(World p_149738_1_)
  674.     {
  675.         return 10;
  676.     }
  677.  
  678.     public void onBlockAdded(World p_149726_1_, int p_149726_2_, int p_149726_3_, int p_149726_4_) {}
  679.  
  680.     public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_) {}
  681.  
  682.     /**
  683.      * Returns the quantity of items to drop on block destruction.
  684.      */
  685.     public int quantityDropped(Random p_149745_1_)
  686.     {
  687.         return 1;
  688.     }
  689.  
  690.     public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
  691.     {
  692.         return Item.getItemFromBlock(this);
  693.     }
  694.  
  695.     public float getPlayerRelativeBlockHardness(EntityPlayer p_149737_1_, World p_149737_2_, int p_149737_3_, int p_149737_4_, int p_149737_5_)
  696.     {
  697.         float var6 = this.getBlockHardness(p_149737_2_, p_149737_3_, p_149737_4_, p_149737_5_);
  698.         return var6 < 0.0F ? 0.0F : (!p_149737_1_.canHarvestBlock(this) ? p_149737_1_.getCurrentPlayerStrVsBlock(this, false) / var6 / 100.0F : p_149737_1_.getCurrentPlayerStrVsBlock(this, true) / var6 / 30.0F);
  699.     }
  700.  
  701.     /**
  702.      * Drops the specified block items
  703.      */
  704.     public final void dropBlockAsItem(World p_149697_1_, int p_149697_2_, int p_149697_3_, int p_149697_4_, int p_149697_5_, int p_149697_6_)
  705.     {
  706.         this.dropBlockAsItemWithChance(p_149697_1_, p_149697_2_, p_149697_3_, p_149697_4_, p_149697_5_, 1.0F, p_149697_6_);
  707.     }
  708.  
  709.     /**
  710.      * Drops the block items with a specified chance of dropping the specified items
  711.      */
  712.     public void dropBlockAsItemWithChance(World p_149690_1_, int p_149690_2_, int p_149690_3_, int p_149690_4_, int p_149690_5_, float p_149690_6_, int p_149690_7_)
  713.     {
  714.         if (!p_149690_1_.isClient)
  715.         {
  716.             int var8 = this.quantityDroppedWithBonus(p_149690_7_, p_149690_1_.rand);
  717.  
  718.             for (int var9 = 0; var9 < var8; ++var9)
  719.             {
  720.                 if (p_149690_1_.rand.nextFloat() <= p_149690_6_)
  721.                 {
  722.                     Item var10 = this.getItemDropped(p_149690_5_, p_149690_1_.rand, p_149690_7_);
  723.  
  724.                     if (var10 != null)
  725.                     {
  726.                         this.dropBlockAsItem_do(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, new ItemStack(var10, 1, this.damageDropped(p_149690_5_)));
  727.                     }
  728.                 }
  729.             }
  730.         }
  731.     }
  732.  
  733.     /**
  734.      * Spawns EntityItem in the world for the given ItemStack if the world is not remote.
  735.      */
  736.     protected void dropBlockAsItem_do(World p_149642_1_, int p_149642_2_, int p_149642_3_, int p_149642_4_, ItemStack p_149642_5_)
  737.     {
  738.         if (!p_149642_1_.isClient && p_149642_1_.getGameRules().getGameRuleBooleanValue("doTileDrops"))
  739.         {
  740.             float var6 = 0.7F;
  741.             double var7 = (double)(p_149642_1_.rand.nextFloat() * var6) + (double)(1.0F - var6) * 0.5D;
  742.             double var9 = (double)(p_149642_1_.rand.nextFloat() * var6) + (double)(1.0F - var6) * 0.5D;
  743.             double var11 = (double)(p_149642_1_.rand.nextFloat() * var6) + (double)(1.0F - var6) * 0.5D;
  744.             EntityItem var13 = new EntityItem(p_149642_1_, (double)p_149642_2_ + var7, (double)p_149642_3_ + var9, (double)p_149642_4_ + var11, p_149642_5_);
  745.             var13.delayBeforeCanPickup = 10;
  746.             p_149642_1_.spawnEntityInWorld(var13);
  747.         }
  748.     }
  749.  
  750.     protected void dropXpOnBlockBreak(World p_149657_1_, int p_149657_2_, int p_149657_3_, int p_149657_4_, int p_149657_5_)
  751.     {
  752.         if (!p_149657_1_.isClient)
  753.         {
  754.             while (p_149657_5_ > 0)
  755.             {
  756.                 int var6 = EntityXPOrb.getXPSplit(p_149657_5_);
  757.                 p_149657_5_ -= var6;
  758.                 p_149657_1_.spawnEntityInWorld(new EntityXPOrb(p_149657_1_, (double)p_149657_2_ + 0.5D, (double)p_149657_3_ + 0.5D, (double)p_149657_4_ + 0.5D, var6));
  759.             }
  760.         }
  761.     }
  762.  
  763.     /**
  764.      * Determines the damage on the item the block drops. Used in cloth and wood.
  765.      */
  766.     public int damageDropped(int p_149692_1_)
  767.     {
  768.         return 0;
  769.     }
  770.  
  771.     /**
  772.      * Returns how much this block can resist explosions from the passed in entity.
  773.      */
  774.     public float getExplosionResistance(Entity p_149638_1_)
  775.     {
  776.         return this.blockResistance / 5.0F;
  777.     }
  778.  
  779.     public MovingObjectPosition collisionRayTrace(World p_149731_1_, int p_149731_2_, int p_149731_3_, int p_149731_4_, Vec3 p_149731_5_, Vec3 p_149731_6_)
  780.     {
  781.         this.setBlockBoundsBasedOnState(p_149731_1_, p_149731_2_, p_149731_3_, p_149731_4_);
  782.         p_149731_5_ = p_149731_5_.addVector((double)(-p_149731_2_), (double)(-p_149731_3_), (double)(-p_149731_4_));
  783.         p_149731_6_ = p_149731_6_.addVector((double)(-p_149731_2_), (double)(-p_149731_3_), (double)(-p_149731_4_));
  784.         Vec3 var7 = p_149731_5_.getIntermediateWithXValue(p_149731_6_, this.field_149759_B);
  785.         Vec3 var8 = p_149731_5_.getIntermediateWithXValue(p_149731_6_, this.field_149755_E);
  786.         Vec3 var9 = p_149731_5_.getIntermediateWithYValue(p_149731_6_, this.field_149760_C);
  787.         Vec3 var10 = p_149731_5_.getIntermediateWithYValue(p_149731_6_, this.field_149756_F);
  788.         Vec3 var11 = p_149731_5_.getIntermediateWithZValue(p_149731_6_, this.field_149754_D);
  789.         Vec3 var12 = p_149731_5_.getIntermediateWithZValue(p_149731_6_, this.field_149757_G);
  790.  
  791.         if (!this.isVecInsideYZBounds(var7))
  792.         {
  793.             var7 = null;
  794.         }
  795.  
  796.         if (!this.isVecInsideYZBounds(var8))
  797.         {
  798.             var8 = null;
  799.         }
  800.  
  801.         if (!this.isVecInsideXZBounds(var9))
  802.         {
  803.             var9 = null;
  804.         }
  805.  
  806.         if (!this.isVecInsideXZBounds(var10))
  807.         {
  808.             var10 = null;
  809.         }
  810.  
  811.         if (!this.isVecInsideXYBounds(var11))
  812.         {
  813.             var11 = null;
  814.         }
  815.  
  816.         if (!this.isVecInsideXYBounds(var12))
  817.         {
  818.             var12 = null;
  819.         }
  820.  
  821.         Vec3 var13 = null;
  822.  
  823.         if (var7 != null && (var13 == null || p_149731_5_.squareDistanceTo(var7) < p_149731_5_.squareDistanceTo(var13)))
  824.         {
  825.             var13 = var7;
  826.         }
  827.  
  828.         if (var8 != null && (var13 == null || p_149731_5_.squareDistanceTo(var8) < p_149731_5_.squareDistanceTo(var13)))
  829.         {
  830.             var13 = var8;
  831.         }
  832.  
  833.         if (var9 != null && (var13 == null || p_149731_5_.squareDistanceTo(var9) < p_149731_5_.squareDistanceTo(var13)))
  834.         {
  835.             var13 = var9;
  836.         }
  837.  
  838.         if (var10 != null && (var13 == null || p_149731_5_.squareDistanceTo(var10) < p_149731_5_.squareDistanceTo(var13)))
  839.         {
  840.             var13 = var10;
  841.         }
  842.  
  843.         if (var11 != null && (var13 == null || p_149731_5_.squareDistanceTo(var11) < p_149731_5_.squareDistanceTo(var13)))
  844.         {
  845.             var13 = var11;
  846.         }
  847.  
  848.         if (var12 != null && (var13 == null || p_149731_5_.squareDistanceTo(var12) < p_149731_5_.squareDistanceTo(var13)))
  849.         {
  850.             var13 = var12;
  851.         }
  852.  
  853.         if (var13 == null)
  854.         {
  855.             return null;
  856.         }
  857.         else
  858.         {
  859.             byte var14 = -1;
  860.  
  861.             if (var13 == var7)
  862.             {
  863.                 var14 = 4;
  864.             }
  865.  
  866.             if (var13 == var8)
  867.             {
  868.                 var14 = 5;
  869.             }
  870.  
  871.             if (var13 == var9)
  872.             {
  873.                 var14 = 0;
  874.             }
  875.  
  876.             if (var13 == var10)
  877.             {
  878.                 var14 = 1;
  879.             }
  880.  
  881.             if (var13 == var11)
  882.             {
  883.                 var14 = 2;
  884.             }
  885.  
  886.             if (var13 == var12)
  887.             {
  888.                 var14 = 3;
  889.             }
  890.  
  891.             return new MovingObjectPosition(p_149731_2_, p_149731_3_, p_149731_4_, var14, var13.addVector((double)p_149731_2_, (double)p_149731_3_, (double)p_149731_4_));
  892.         }
  893.     }
  894.  
  895.     /**
  896.      * Checks if a vector is within the Y and Z bounds of the block.
  897.      */
  898.     private boolean isVecInsideYZBounds(Vec3 p_149654_1_)
  899.     {
  900.         return p_149654_1_ == null ? false : p_149654_1_.yCoord >= this.field_149760_C && p_149654_1_.yCoord <= this.field_149756_F && p_149654_1_.zCoord >= this.field_149754_D && p_149654_1_.zCoord <= this.field_149757_G;
  901.     }
  902.  
  903.     /**
  904.      * Checks if a vector is within the X and Z bounds of the block.
  905.      */
  906.     private boolean isVecInsideXZBounds(Vec3 p_149687_1_)
  907.     {
  908.         return p_149687_1_ == null ? false : p_149687_1_.xCoord >= this.field_149759_B && p_149687_1_.xCoord <= this.field_149755_E && p_149687_1_.zCoord >= this.field_149754_D && p_149687_1_.zCoord <= this.field_149757_G;
  909.     }
  910.  
  911.     /**
  912.      * Checks if a vector is within the X and Y bounds of the block.
  913.      */
  914.     private boolean isVecInsideXYBounds(Vec3 p_149661_1_)
  915.     {
  916.         return p_149661_1_ == null ? false : p_149661_1_.xCoord >= this.field_149759_B && p_149661_1_.xCoord <= this.field_149755_E && p_149661_1_.yCoord >= this.field_149760_C && p_149661_1_.yCoord <= this.field_149756_F;
  917.     }
  918.  
  919.     /**
  920.      * Called upon the block being destroyed by an explosion
  921.      */
  922.     public void onBlockDestroyedByExplosion(World p_149723_1_, int p_149723_2_, int p_149723_3_, int p_149723_4_, Explosion p_149723_5_) {}
  923.  
  924.     /**
  925.      * Returns which pass should this block be rendered on. 0 for solids and 1 for alpha
  926.      */
  927.     public int getRenderBlockPass()
  928.     {
  929.         return 0;
  930.     }
  931.  
  932.     public boolean canReplace(World p_149705_1_, int p_149705_2_, int p_149705_3_, int p_149705_4_, int p_149705_5_, ItemStack p_149705_6_)
  933.     {
  934.         return this.canPlaceBlockOnSide(p_149705_1_, p_149705_2_, p_149705_3_, p_149705_4_, p_149705_5_);
  935.     }
  936.  
  937.     /**
  938.      * checks to see if you can place this block can be placed on that side of a block: BlockLever overrides
  939.      */
  940.     public boolean canPlaceBlockOnSide(World p_149707_1_, int p_149707_2_, int p_149707_3_, int p_149707_4_, int p_149707_5_)
  941.     {
  942.         return this.canPlaceBlockAt(p_149707_1_, p_149707_2_, p_149707_3_, p_149707_4_);
  943.     }
  944.  
  945.     public boolean canPlaceBlockAt(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_)
  946.     {
  947.         return p_149742_1_.getBlock(p_149742_2_, p_149742_3_, p_149742_4_).blockMaterial.isReplaceable();
  948.     }
  949.  
  950.     /**
  951.      * Called upon block activation (right click on the block.)
  952.      */
  953.     public boolean onBlockActivated(World p_149727_1_, int p_149727_2_, int p_149727_3_, int p_149727_4_, EntityPlayer p_149727_5_, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_)
  954.     {
  955.         return false;
  956.     }
  957.  
  958.     public void onEntityWalking(World p_149724_1_, int p_149724_2_, int p_149724_3_, int p_149724_4_, Entity p_149724_5_) {}
  959.  
  960.     public int onBlockPlaced(World p_149660_1_, int p_149660_2_, int p_149660_3_, int p_149660_4_, int p_149660_5_, float p_149660_6_, float p_149660_7_, float p_149660_8_, int p_149660_9_)
  961.     {
  962.         return p_149660_9_;
  963.     }
  964.  
  965.     /**
  966.      * Called when a player hits the block. Args: world, x, y, z, player
  967.      */
  968.     public void onBlockClicked(World p_149699_1_, int p_149699_2_, int p_149699_3_, int p_149699_4_, EntityPlayer p_149699_5_) {}
  969.  
  970.     public void velocityToAddToEntity(World p_149640_1_, int p_149640_2_, int p_149640_3_, int p_149640_4_, Entity p_149640_5_, Vec3 p_149640_6_) {}
  971.  
  972.     public void setBlockBoundsBasedOnState(IBlockAccess p_149719_1_, int p_149719_2_, int p_149719_3_, int p_149719_4_) {}
  973.  
  974.     /**
  975.      * returns the block bounderies minX value
  976.      */
  977.     public final double getBlockBoundsMinX()
  978.     {
  979.         return this.field_149759_B;
  980.     }
  981.  
  982.     /**
  983.      * returns the block bounderies maxX value
  984.      */
  985.     public final double getBlockBoundsMaxX()
  986.     {
  987.         return this.field_149755_E;
  988.     }
  989.  
  990.     /**
  991.      * returns the block bounderies minY value
  992.      */
  993.     public final double getBlockBoundsMinY()
  994.     {
  995.         return this.field_149760_C;
  996.     }
  997.  
  998.     /**
  999.      * returns the block bounderies maxY value
  1000.      */
  1001.     public final double getBlockBoundsMaxY()
  1002.     {
  1003.         return this.field_149756_F;
  1004.     }
  1005.  
  1006.     /**
  1007.      * returns the block bounderies minZ value
  1008.      */
  1009.     public final double getBlockBoundsMinZ()
  1010.     {
  1011.         return this.field_149754_D;
  1012.     }
  1013.  
  1014.     /**
  1015.      * returns the block bounderies maxZ value
  1016.      */
  1017.     public final double getBlockBoundsMaxZ()
  1018.     {
  1019.         return this.field_149757_G;
  1020.     }
  1021.  
  1022.     public int getBlockColor()
  1023.     {
  1024.         return 16777215;
  1025.     }
  1026.  
  1027.     /**
  1028.      * Returns the color this block should be rendered. Used by leaves.
  1029.      */
  1030.     public int getRenderColor(int p_149741_1_)
  1031.     {
  1032.         return 16777215;
  1033.     }
  1034.  
  1035.     /**
  1036.      * Returns a integer with hex for 0xrrggbb with this color multiplied against the blocks color. Note only called
  1037.      * when first determining what to render.
  1038.      */
  1039.     public int colorMultiplier(IBlockAccess p_149720_1_, int p_149720_2_, int p_149720_3_, int p_149720_4_)
  1040.     {
  1041.         return 16777215;
  1042.     }
  1043.  
  1044.     public int isProvidingWeakPower(IBlockAccess p_149709_1_, int p_149709_2_, int p_149709_3_, int p_149709_4_, int p_149709_5_)
  1045.     {
  1046.         return 0;
  1047.     }
  1048.  
  1049.     /**
  1050.      * Can this block provide power. Only wire currently seems to have this change based on its state.
  1051.      */
  1052.     public boolean canProvidePower()
  1053.     {
  1054.         return false;
  1055.     }
  1056.  
  1057.     public void onEntityCollidedWithBlock(World p_149670_1_, int p_149670_2_, int p_149670_3_, int p_149670_4_, Entity p_149670_5_) {}
  1058.  
  1059.     public int isProvidingStrongPower(IBlockAccess p_149748_1_, int p_149748_2_, int p_149748_3_, int p_149748_4_, int p_149748_5_)
  1060.     {
  1061.         return 0;
  1062.     }
  1063.  
  1064.     /**
  1065.      * Sets the block's bounds for rendering it as an item
  1066.      */
  1067.     public void setBlockBoundsForItemRender() {}
  1068.  
  1069.     public void harvestBlock(World p_149636_1_, EntityPlayer p_149636_2_, int p_149636_3_, int p_149636_4_, int p_149636_5_, int p_149636_6_)
  1070.     {
  1071.         p_149636_2_.addStat(StatList.mineBlockStatArray[getIdFromBlock(this)], 1);
  1072.         p_149636_2_.addExhaustion(0.025F);
  1073.  
  1074.         if (this.canSilkHarvest() && EnchantmentHelper.getSilkTouchModifier(p_149636_2_))
  1075.         {
  1076.             ItemStack var8 = this.createStackedBlock(p_149636_6_);
  1077.  
  1078.             if (var8 != null)
  1079.             {
  1080.                 this.dropBlockAsItem_do(p_149636_1_, p_149636_3_, p_149636_4_, p_149636_5_, var8);
  1081.             }
  1082.         }
  1083.         else
  1084.         {
  1085.             int var7 = EnchantmentHelper.getFortuneModifier(p_149636_2_);
  1086.             this.dropBlockAsItem(p_149636_1_, p_149636_3_, p_149636_4_, p_149636_5_, p_149636_6_, var7);
  1087.         }
  1088.     }
  1089.  
  1090.     protected boolean canSilkHarvest()
  1091.     {
  1092.         return this.renderAsNormalBlock() && !this.isBlockContainer;
  1093.     }
  1094.  
  1095.     /**
  1096.      * Returns an item stack containing a single instance of the current block type. 'i' is the block's subtype/damage
  1097.      * and is ignored for blocks which do not support subtypes. Blocks which cannot be harvested should return null.
  1098.      */
  1099.     protected ItemStack createStackedBlock(int p_149644_1_)
  1100.     {
  1101.         int var2 = 0;
  1102.         Item var3 = Item.getItemFromBlock(this);
  1103.  
  1104.         if (var3 != null && var3.getHasSubtypes())
  1105.         {
  1106.             var2 = p_149644_1_;
  1107.         }
  1108.  
  1109.         return new ItemStack(var3, 1, var2);
  1110.     }
  1111.  
  1112.     /**
  1113.      * Returns the usual quantity dropped by the block plus a bonus of 1 to 'i' (inclusive).
  1114.      */
  1115.     public int quantityDroppedWithBonus(int p_149679_1_, Random p_149679_2_)
  1116.     {
  1117.         return this.quantityDropped(p_149679_2_);
  1118.     }
  1119.  
  1120.     /**
  1121.      * Can this block stay at this position.  Similar to canPlaceBlockAt except gets checked often with plants.
  1122.      */
  1123.     public boolean canBlockStay(World p_149718_1_, int p_149718_2_, int p_149718_3_, int p_149718_4_)
  1124.     {
  1125.         return true;
  1126.     }
  1127.  
  1128.     /**
  1129.      * Called when the block is placed in the world.
  1130.      */
  1131.     public void onBlockPlacedBy(World p_149689_1_, int p_149689_2_, int p_149689_3_, int p_149689_4_, EntityLivingBase p_149689_5_, ItemStack p_149689_6_) {}
  1132.  
  1133.     /**
  1134.      * Called after a block is placed
  1135.      */
  1136.     public void onPostBlockPlaced(World p_149714_1_, int p_149714_2_, int p_149714_3_, int p_149714_4_, int p_149714_5_) {}
  1137.  
  1138.     /**
  1139.      * Sets the mod-specific block name
  1140.      */
  1141.     public Block setBlockName(String p_149663_1_)
  1142.     {
  1143.         this.unlocalizedNameBlock = p_149663_1_;
  1144.         return this;
  1145.     }
  1146.  
  1147.     /**
  1148.      * Gets the localized name of this block. Used for the statistics page.
  1149.      */
  1150.     public String getLocalizedName()
  1151.     {
  1152.         return StatCollector.translateToLocal(this.getUnlocalizedName() + ".name");
  1153.     }
  1154.  
  1155.     /**
  1156.      * Returns the unlocalized name of the block with "tile." appended to the front.
  1157.      */
  1158.     public String getUnlocalizedName()
  1159.     {
  1160.         return "tile." + this.unlocalizedNameBlock;
  1161.     }
  1162.  
  1163.     public boolean onBlockEventReceived(World p_149696_1_, int p_149696_2_, int p_149696_3_, int p_149696_4_, int p_149696_5_, int p_149696_6_)
  1164.     {
  1165.         return false;
  1166.     }
  1167.  
  1168.     /**
  1169.      * Return the state of blocks statistics flags - if the block is counted for mined and placed.
  1170.      */
  1171.     public boolean getEnableStats()
  1172.     {
  1173.         return this.enableStats;
  1174.     }
  1175.  
  1176.     protected Block disableStats()
  1177.     {
  1178.         this.enableStats = false;
  1179.         return this;
  1180.     }
  1181.  
  1182.     public int getMobilityFlag()
  1183.     {
  1184.         return this.blockMaterial.getMaterialMobility();
  1185.     }
  1186.  
  1187.     /**
  1188.      * Returns the default ambient occlusion value based on block opacity
  1189.      */
  1190.     public float getAmbientOcclusionLightValue()
  1191.     {
  1192.         return this.isBlockNormalCube() ? 0.2F : 1.0F;
  1193.     }
  1194.  
  1195.     /**
  1196.      * Block's chance to react to an entity falling on it.
  1197.      */
  1198.     public void onFallenUpon(World p_149746_1_, int p_149746_2_, int p_149746_3_, int p_149746_4_, Entity p_149746_5_, float p_149746_6_) {}
  1199.  
  1200.     /**
  1201.      * Gets an item for the block being called on. Args: world, x, y, z
  1202.      */
  1203.     public Item getItem(World p_149694_1_, int p_149694_2_, int p_149694_3_, int p_149694_4_)
  1204.     {
  1205.         return Item.getItemFromBlock(this);
  1206.     }
  1207.  
  1208.     /**
  1209.      * Get the block's damage value (for use with pick block).
  1210.      */
  1211.     public int getDamageValue(World p_149643_1_, int p_149643_2_, int p_149643_3_, int p_149643_4_)
  1212.     {
  1213.         return this.damageDropped(p_149643_1_.getBlockMetadata(p_149643_2_, p_149643_3_, p_149643_4_));
  1214.     }
  1215.  
  1216.     public void getSubBlocks(Item p_149666_1_, CreativeTabs p_149666_2_, List p_149666_3_)
  1217.     {
  1218.         p_149666_3_.add(new ItemStack(p_149666_1_, 1, 0));
  1219.     }
  1220.  
  1221.     /**
  1222.      * Returns the CreativeTab to display the given block on.
  1223.      */
  1224.     public CreativeTabs getCreativeTabToDisplayOn()
  1225.     {
  1226.         return this.displayOnCreativeTab;
  1227.     }
  1228.  
  1229.     public Block setCreativeTab(CreativeTabs p_149647_1_)
  1230.     {
  1231.         this.displayOnCreativeTab = p_149647_1_;
  1232.         return this;
  1233.     }
  1234.  
  1235.     /**
  1236.      * Called when the block is attempted to be harvested
  1237.      */
  1238.     public void onBlockHarvested(World p_149681_1_, int p_149681_2_, int p_149681_3_, int p_149681_4_, int p_149681_5_, EntityPlayer p_149681_6_) {}
  1239.  
  1240.     public void onBlockPreDestroy(World p_149725_1_, int p_149725_2_, int p_149725_3_, int p_149725_4_, int p_149725_5_) {}
  1241.  
  1242.     /**
  1243.      * currently only used by BlockCauldron to incrament meta-data during rain
  1244.      */
  1245.     public void fillWithRain(World p_149639_1_, int p_149639_2_, int p_149639_3_, int p_149639_4_) {}
  1246.  
  1247.     /**
  1248.      * Returns true only if block is flowerPot
  1249.      */
  1250.     public boolean isFlowerPot()
  1251.     {
  1252.         return false;
  1253.     }
  1254.  
  1255.     public boolean func_149698_L()
  1256.     {
  1257.         return true;
  1258.     }
  1259.  
  1260.     /**
  1261.      * Return whether this block can drop from an explosion.
  1262.      */
  1263.     public boolean canDropFromExplosion(Explosion p_149659_1_)
  1264.     {
  1265.         return true;
  1266.     }
  1267.  
  1268.     public boolean func_149667_c(Block p_149667_1_)
  1269.     {
  1270.         return this == p_149667_1_;
  1271.     }
  1272.  
  1273.     public static boolean isEqualTo(Block p_149680_0_, Block p_149680_1_)
  1274.     {
  1275.         return p_149680_0_ != null && p_149680_1_ != null ? (p_149680_0_ == p_149680_1_ ? true : p_149680_0_.func_149667_c(p_149680_1_)) : false;
  1276.     }
  1277.  
  1278.     public boolean hasComparatorInputOverride()
  1279.     {
  1280.         return false;
  1281.     }
  1282.  
  1283.     public int getComparatorInputOverride(World p_149736_1_, int p_149736_2_, int p_149736_3_, int p_149736_4_, int p_149736_5_)
  1284.     {
  1285.         return 0;
  1286.     }
  1287.  
  1288.     protected Block setBlockTextureName(String p_149658_1_)
  1289.     {
  1290.         this.textureName = p_149658_1_;
  1291.         return this;
  1292.     }
  1293.  
  1294.     protected String getTextureName()
  1295.     {
  1296.         return this.textureName == null ? "MISSING_ICON_BLOCK_" + getIdFromBlock(this) + "_" + this.unlocalizedNameBlock : this.textureName;
  1297.     }
  1298.  
  1299.     public IIcon func_149735_b(int p_149735_1_, int p_149735_2_)
  1300.     {
  1301.         return this.getIcon(p_149735_1_, p_149735_2_);
  1302.     }
  1303.  
  1304.     public void registerBlockIcons(IIconRegister p_149651_1_)
  1305.     {
  1306.         this.blockIcon = p_149651_1_.registerIcon(this.getTextureName());
  1307.     }
  1308.  
  1309.     /**
  1310.      * Gets the icon name of the ItemBlock corresponding to this block. Used by hoppers.
  1311.      */
  1312.     public String getItemIconName()
  1313.     {
  1314.         return null;
  1315.     }
  1316.  
  1317.     public static class SoundType
  1318.     {
  1319.         public final String field_150501_a;
  1320.         public final float field_150499_b;
  1321.         public final float field_150500_c;
  1322.         private static final String __OBFID = "CL_00000203";
  1323.  
  1324.         public SoundType(String p_i45393_1_, float p_i45393_2_, float p_i45393_3_)
  1325.         {
  1326.             this.field_150501_a = p_i45393_1_;
  1327.             this.field_150499_b = p_i45393_2_;
  1328.             this.field_150500_c = p_i45393_3_;
  1329.         }
  1330.  
  1331.         public float func_150497_c()
  1332.         {
  1333.             return this.field_150499_b;
  1334.         }
  1335.  
  1336.         public float func_150494_d()
  1337.         {
  1338.             return this.field_150500_c;
  1339.         }
  1340.  
  1341.         public String func_150495_a()
  1342.         {
  1343.             return "dig." + this.field_150501_a;
  1344.         }
  1345.  
  1346.         public String func_150498_e()
  1347.         {
  1348.             return "step." + this.field_150501_a;
  1349.         }
  1350.  
  1351.         public String func_150496_b()
  1352.         {
  1353.             return this.func_150495_a();
  1354.         }
  1355.     }
  1356. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement