Merge branch 'buildcraft131' of github.com:SirSengir/BuildCraft into buildcraft131
This commit is contained in:
commit
38fe0d4081
2 changed files with 13 additions and 80 deletions
|
@ -366,7 +366,7 @@ public class TileEngine extends TileBuildCraft implements IPowerReceptor, IInven
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
engine.addEnergy((int) (provider.useEnergy(1, engine.maxEnergyReceived(), true) * 0.95F));
|
engine.addEnergy(provider.useEnergy(1, engine.maxEnergyReceived(), true) * 0.95F);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isPoweredTile(TileEntity tile) {
|
public boolean isPoweredTile(TileEntity tile) {
|
||||||
|
|
|
@ -32,6 +32,7 @@ public class ItemFacade extends ItemBuildCraft {
|
||||||
|
|
||||||
setHasSubtypes(true);
|
setHasSubtypes(true);
|
||||||
setMaxDamage(0);
|
setMaxDamage(0);
|
||||||
|
this.setTabToDisplayOn(CreativeTabs.tabMisc);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -43,7 +44,7 @@ public class ItemFacade extends ItemBuildCraft {
|
||||||
if (Item.itemsList[decodedBlockId] != null){
|
if (Item.itemsList[decodedBlockId] != null){
|
||||||
name += ": " + ProxyCore.proxy.getItemDisplayName(newStack);
|
name += ": " + ProxyCore.proxy.getItemDisplayName(newStack);
|
||||||
} else {
|
} else {
|
||||||
name += " < BROKEN >";
|
name += " < BROKEN (" + decodedBlockId + ":"+ decodedMeta +" )>";
|
||||||
}
|
}
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
@ -57,11 +58,10 @@ public class ItemFacade extends ItemBuildCraft {
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List itemList) {
|
public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List itemList) {
|
||||||
super.getSubItems(par1, par2CreativeTabs, itemList);
|
//Do not call super, that would add a 0:0 facade
|
||||||
for (ItemStack stack : allFacades){
|
for (ItemStack stack : allFacades){
|
||||||
itemList.add(stack.copy());
|
itemList.add(stack.copy());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -94,13 +94,13 @@ public class ItemFacade extends ItemBuildCraft {
|
||||||
if (stack.getItem() instanceof ItemBlock){
|
if (stack.getItem() instanceof ItemBlock){
|
||||||
ItemBlock itemBlock = (ItemBlock) stack.getItem();
|
ItemBlock itemBlock = (ItemBlock) stack.getItem();
|
||||||
int blockId = itemBlock.getBlockID();
|
int blockId = itemBlock.getBlockID();
|
||||||
//Block certain IDs
|
//Block certain IDs (Bedrock, leaves and spunge)
|
||||||
if (blockId == 7 || blockId == 18 || blockId == 19) continue;
|
if (blockId == 7 || blockId == 18 || blockId == 19) continue;
|
||||||
|
|
||||||
if (Block.blocksList[blockId] != null
|
if (Block.blocksList[blockId] != null
|
||||||
&& Block.blocksList[blockId].isOpaqueCube()
|
&& Block.blocksList[blockId].isOpaqueCube()
|
||||||
&& Block.blocksList[blockId].getBlockName() != null
|
&& Block.blocksList[blockId].getBlockName() != null
|
||||||
&& !Block.blocksList[blockId].hasTileEntity()
|
&& !Block.blocksList[blockId].hasTileEntity(0)
|
||||||
&& Block.blocksList[blockId].renderAsNormalBlock())
|
&& Block.blocksList[blockId].renderAsNormalBlock())
|
||||||
{
|
{
|
||||||
allFacades.add(new ItemStack(BuildCraftTransport.facadeItem, 1, ItemFacade.encode(blockId, stack.getItemDamage())));
|
allFacades.add(new ItemStack(BuildCraftTransport.facadeItem, 1, ItemFacade.encode(blockId, stack.getItemDamage())));
|
||||||
|
@ -120,80 +120,13 @@ public class ItemFacade extends ItemBuildCraft {
|
||||||
private static List getCreativeContents(){
|
private static List getCreativeContents(){
|
||||||
List itemList = new ArrayList();
|
List itemList = new ArrayList();
|
||||||
|
|
||||||
// Block[] var2 = new Block[] {Block.cobblestone, Block.stone, Block.oreDiamond, Block.oreGold, Block.oreIron, Block.oreCoal, Block.oreLapis, Block.oreRedstone, Block.stoneBrick, Block.stoneBrick, Block.stoneBrick, Block.stoneBrick, Block.blockClay, Block.blockDiamond, Block.blockGold, Block.blockSteel, Block.bedrock, Block.blockLapis, Block.brick, Block.cobblestoneMossy, Block.stairSingle, Block.stairSingle, Block.stairSingle, Block.stairSingle, Block.stairSingle, Block.stairSingle, Block.obsidian, Block.netherrack, Block.slowSand, Block.glowStone, Block.wood, Block.wood, Block.wood, Block.wood, Block.leaves, Block.leaves, Block.leaves, Block.leaves, Block.dirt, Block.grass, Block.sand, Block.sandStone, Block.sandStone, Block.sandStone, Block.gravel, Block.web, Block.planks, Block.planks, Block.planks, Block.planks, Block.sapling, Block.sapling, Block.sapling, Block.sapling, Block.deadBush, Block.sponge, Block.ice, Block.blockSnow, Block.plantYellow, Block.plantRed, Block.mushroomBrown, Block.mushroomRed, Block.cactus, Block.melon, Block.pumpkin, Block.pumpkinLantern, Block.vine, Block.fenceIron, Block.thinGlass, Block.netherBrick, Block.netherFence, Block.stairsNetherBrick, Block.whiteStone, Block.mycelium, Block.waterlily, Block.tallGrass, Block.tallGrass, Block.chest, Block.workbench, Block.glass, Block.tnt, Block.bookShelf, Block.cloth, Block.cloth, Block.cloth, Block.cloth, Block.cloth, Block.cloth, Block.cloth, Block.cloth, Block.cloth, Block.cloth, Block.cloth, Block.cloth, Block.cloth, Block.cloth, Block.cloth, Block.cloth, Block.dispenser, Block.stoneOvenIdle, Block.music, Block.jukebox, Block.pistonStickyBase, Block.pistonBase, Block.fence, Block.fenceGate, Block.ladder, Block.rail, Block.railPowered, Block.railDetector, Block.torchWood, Block.stairCompactPlanks, Block.stairCompactCobblestone, Block.stairsBrick, Block.stairsStoneBrickSmooth, Block.lever, Block.pressurePlateStone, Block.pressurePlatePlanks, Block.torchRedstoneActive, Block.button, Block.trapdoor, Block.enchantmentTable, Block.redstoneLampIdle};
|
for (Block block : Block.blocksList)
|
||||||
// int var3 = 0;
|
{
|
||||||
// int var4 = 0;
|
if (block != null)
|
||||||
// int var5 = 0;
|
{
|
||||||
// int var6 = 0;
|
block.getSubBlocks(block.blockID, null, itemList);
|
||||||
// int var7 = 0;
|
}
|
||||||
// int var8 = 0;
|
}
|
||||||
// int var9 = 0;
|
|
||||||
// int var10 = 0;
|
|
||||||
// int var11 = 1;
|
|
||||||
// int var12;
|
|
||||||
// int var13;
|
|
||||||
//
|
|
||||||
// for (var12 = 0; var12 < var2.length; ++var12)
|
|
||||||
// {
|
|
||||||
// var13 = 0;
|
|
||||||
//
|
|
||||||
// if (var2[var12] == Block.cloth)
|
|
||||||
// {
|
|
||||||
// var13 = var3++;
|
|
||||||
// }
|
|
||||||
// else if (var2[var12] == Block.stairSingle)
|
|
||||||
// {
|
|
||||||
// var13 = var4++;
|
|
||||||
// }
|
|
||||||
// else if (var2[var12] == Block.wood)
|
|
||||||
// {
|
|
||||||
// var13 = var5++;
|
|
||||||
// }
|
|
||||||
// else if (var2[var12] == Block.planks)
|
|
||||||
// {
|
|
||||||
// var13 = var6++;
|
|
||||||
// }
|
|
||||||
// else if (var2[var12] == Block.sapling)
|
|
||||||
// {
|
|
||||||
// var13 = var7++;
|
|
||||||
// }
|
|
||||||
// else if (var2[var12] == Block.stoneBrick)
|
|
||||||
// {
|
|
||||||
// var13 = var8++;
|
|
||||||
// }
|
|
||||||
// else if (var2[var12] == Block.sandStone)
|
|
||||||
// {
|
|
||||||
// var13 = var9++;
|
|
||||||
// }
|
|
||||||
// else if (var2[var12] == Block.tallGrass)
|
|
||||||
// {
|
|
||||||
// var13 = var11++;
|
|
||||||
// }
|
|
||||||
// else if (var2[var12] == Block.leaves)
|
|
||||||
// {
|
|
||||||
// var13 = var10++;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// itemList.add(new ItemStack(var2[var12], 1, var13));
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// for (Block block : Block.blocksList)
|
|
||||||
// {
|
|
||||||
// if (block != null)
|
|
||||||
// {
|
|
||||||
// block.addCreativeItems((ArrayList) itemList);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// int x = 0;
|
|
||||||
// for (Item item : Item.itemsList)
|
|
||||||
// {
|
|
||||||
// if (x++ >= 256 && item != null)
|
|
||||||
// {
|
|
||||||
// item.addCreativeItems((ArrayList) itemList);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
return itemList;
|
return itemList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue