public ItemSlab(int p_i1907_1_, BlockHalfSlab p_i1907_2_, BlockHalfSlab p_i1907_3_, boolean p_i1907_4_) { super(p_i1907_1_); this.field_77889_b = p_i1907_2_; this.field_77890_c = p_i1907_3_; this.field_77891_a = p_i1907_4_; this.func_77656_e(0); this.func_77627_a(true); }
private static boolean func_72140_j(int p_72140_0_) { if(p_72140_0_ <= 0) { return false; } else { Block var1 = Block.field_71973_m[p_72140_0_]; return var1 != null && var1.field_72018_cp.func_76218_k() && var1.func_71886_c() || var1 == Block.field_72014_bd || var1 instanceof BlockHalfSlab || var1 instanceof BlockStairs; } }
/** * Performs check to see if the block is a normal, solid block, or if the metadata of the block indicates that its * facing puts its solid side upwards. (inverted stairs, for example) */ @Deprecated //DO NOT USE THIS!!! USE doesBlockHaveSolidTopSurface public boolean isBlockTopFacingSurfaceSolid(Block par1Block, int par2) { // -.- Mojang PLEASE make this location sensitive, you have no reason not to. return par1Block == null ? false : (par1Block.blockMaterial.isOpaque() && par1Block.renderAsNormalBlock() ? true : (par1Block instanceof BlockStairs ? (par2 & 4) == 4 : (par1Block instanceof BlockHalfSlab ? (par2 & 8) == 8 : (par1Block instanceof BlockHopper ? true : (par1Block instanceof BlockSnow ? (par2 & 7) == 7 : false))))); }
public ItemSlab(int par1, BlockHalfSlab par2BlockHalfSlab, BlockHalfSlab par3BlockHalfSlab, boolean par4) { super(par1); this.theHalfSlab = par2BlockHalfSlab; this.doubleSlab = par3BlockHalfSlab; this.isFullBlock = par4; this.setMaxDamage(0); this.setHasSubtypes(true); }
@EventHandler public void init(FMLInitializationEvent event) { //Block Declares go here! blastblock = new BlockBlastBlock(3974, "blastblock").setUnlocalizedName("blastblock:blast").setCreativeTab(tabBlastBlock).setTextureName("blastblock:concrete"); blastlight = new BlockBlastLight(3975, "blastblock").setUnlocalizedName("blastblock:blastlight").setCreativeTab(tabBlastBlock).setLightValue(1.0F).setTextureName("blastblock:light"); blastdouble = (BlockHalfSlab)(new BlockBlastSlab(3976, true)).setHardness(5.0F).setResistance(2000.0F).setStepSound(Block.soundStoneFootstep).setUnlocalizedName("rubydouble").setTextureName("blastblock:concrete"); blastsingle = (BlockHalfSlab)(new BlockBlastSlab(3977, false)).setHardness(5.0F).setResistance(2000.0F).setStepSound(Block.soundStoneFootstep).setUnlocalizedName("rubysingle").setCreativeTab(tabBlastBlock).setTextureName("blastblock:concrete"); blastLampOn = new BlockBlastLamp(3978, true).setHardness(5.0F).setResistance(2000.0F).setLightValue(1.0F).setUnlocalizedName("blastblock:blastlampActive").setTextureName("blastblock:lampActive").setStepSound(Block.soundGlassFootstep); blastLampOff = new BlockBlastLamp(3979, false).setHardness(5.0F).setResistance(2000.0F).setCreativeTab(tabBlastBlock).setUnlocalizedName("blastblock:blastlampIdle").setTextureName("blastblock:lampIdle").setStepSound(Block.soundGlassFootstep); //Block Registry GameRegistry.registerBlock(blastblock, "blastblock"); GameRegistry.registerBlock(blastlight, "blastlight"); GameRegistry.registerBlock(blastLampOn, "blastLampOn"); GameRegistry.registerBlock(blastLampOff, "blastLampOff"); //Language Registry LanguageRegistry.addName(blastblock, "Blast Resistant Stone"); LanguageRegistry.addName(blastlight, "Blast Resistant Light"); LanguageRegistry.addName(blastLampOff, "Blast Resistant Powered Light"); LanguageRegistry.addName(blastLampOn, "Blast Resistant Powered Light"); //Non-Block/Item Related Language Registry LanguageRegistry.instance().addStringLocalization("itemGroup.tabCustom", "en_US", "BlastBlock"); //Crafting Recipes GameRegistry.addRecipe(new ItemStack(blastblock), "xxx", "iii", "xxx" , 'x', Block.stone, 'i', Block.obsidian); GameRegistry.addRecipe(new ItemStack(blastlight, 8), "xxx", "xix", "xxx" , 'x', Block.glowStone, 'i', blastblock); GameRegistry.addRecipe(new ItemStack(blastLampOff, 1), " x ","xyx"," x ", 'y', Block.redstoneLampIdle, 'x', blastblock); //Slab Recipe GameRegistry.addRecipe(new ItemStack(blastsingle,6), "xxx" , 'x', blastblock); //Slab Language LanguageRegistry.instance().addStringLocalization(((BlockHalfSlab)blastsingle).getFullSlabName(0)+".name", "Blast Resistant Slab"); }
public ItemWoodSlabMF(int id, BlockHalfSlab half, BlockHalfSlab full, boolean isFull) { super(id, half, full, isFull); }
public ItemStoneSlabMF(int id, BlockHalfSlab half, BlockHalfSlab full, boolean isFull) { super(id, half, full, isFull); }
public ItemBlockSlateSlab(int id, BlockHalfSlab half, BlockHalfSlab full, boolean isFull) { super(id, half, full, isFull); }
@EventHandler public void PostInit(FMLPostInitializationEvent event) { Item.itemsList[DirtSlab.blockID] = (new ItemSlab(DirtSlab.blockID - 256, (BlockHalfSlab)DirtSlab, (BlockHalfSlab)DirtDoubleSlab, false)); Item.itemsList[CherrySlab.blockID] = (new ItemSlab(CherrySlab.blockID - 256, (BlockHalfSlab)CherrySlab, (BlockHalfSlab)CherryDoubleSlab, false)); }
public boolean func_102026_a(Block p_102026_1_, int p_102026_2_) { return p_102026_1_ == null?false:(p_102026_1_.field_72018_cp.func_76218_k() && p_102026_1_.func_71886_c()?true:(p_102026_1_ instanceof BlockStairs?(p_102026_2_ & 4) == 4:(p_102026_1_ instanceof BlockHalfSlab?(p_102026_2_ & 8) == 8:(p_102026_1_ instanceof BlockHopper?true:(p_102026_1_ instanceof BlockSnow?(p_102026_2_ & 7) == 7:false))))); }
private boolean func_98216_b(int p_98216_1_) { return Block.field_71973_m[p_98216_1_] != null && (Block.field_71973_m[p_98216_1_].func_71857_b() == 10 || Block.field_71973_m[p_98216_1_] instanceof BlockHalfSlab); }
private boolean func_98216_b(int par1) { return Block.blocksList[par1] != null && (Block.blocksList[par1].getRenderType() == 10 || Block.blocksList[par1] instanceof BlockHalfSlab); }
@EventHandler public static void postInit( FMLPostInitializationEvent event ) { Item.itemsList[blastsingle.blockID] = (new ItemSlab(blastsingle.blockID - 256, (BlockHalfSlab)blastsingle, (BlockHalfSlab)blastdouble, false)).setUnlocalizedName("rubyMod:decor"); }