parent
140b03960e
commit
e71953dc2a
2 changed files with 13 additions and 62 deletions
|
@ -7,6 +7,9 @@ import net.minecraft.init.Blocks;
|
|||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.*;
|
||||
import net.minecraft.item.crafting.FurnaceRecipes;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.tileentity.TileEntityFurnace;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import reborncore.api.tile.IInventoryProvider;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
|
@ -27,60 +30,6 @@ public class TileIronFurnace extends TileMachineBase implements IInventoryProvid
|
|||
int fuelslot = 2;
|
||||
boolean active = false;
|
||||
|
||||
public static int getItemBurnTime(ItemStack stack)
|
||||
{
|
||||
if (stack == null)
|
||||
{
|
||||
return 0;
|
||||
} else
|
||||
{
|
||||
Item item = stack.getItem();
|
||||
|
||||
if (stack.getItem() instanceof ItemBlock && Block.getBlockFromItem(item) != null)
|
||||
{
|
||||
Block block = Block.getBlockFromItem(item);
|
||||
|
||||
if (block == Blocks.WOODEN_SLAB)
|
||||
{
|
||||
return 150;
|
||||
}
|
||||
|
||||
if (block == Blocks.LOG)
|
||||
{
|
||||
return 1200;
|
||||
}
|
||||
|
||||
if (block.getMaterial(block.getDefaultState()) == Material.WOOD)
|
||||
{
|
||||
return 300;
|
||||
}
|
||||
|
||||
if (block == Blocks.COAL_BLOCK)
|
||||
{
|
||||
return 16000;
|
||||
}
|
||||
}
|
||||
|
||||
if (item instanceof ItemTool && ((ItemTool) item).getToolMaterialName().equals("WOOD"))
|
||||
return 200;
|
||||
if (item instanceof ItemSword && ((ItemSword) item).getToolMaterialName().equals("WOOD"))
|
||||
return 200;
|
||||
if (item instanceof ItemHoe && ((ItemHoe) item).getMaterialName().equals("WOOD"))
|
||||
return 200;
|
||||
if (item == Items.STICK)
|
||||
return 100;
|
||||
if (item == Items.COAL)
|
||||
return 1600;
|
||||
if (item == Items.LAVA_BUCKET)
|
||||
return 20000;
|
||||
if (item == new ItemStack(Blocks.SAPLING).getItem())
|
||||
return 100;
|
||||
if (item == Items.BLAZE_ROD)
|
||||
return 2400;
|
||||
return GameRegistry.getFuelValue(stack);
|
||||
}
|
||||
}
|
||||
|
||||
public int gaugeProgressScaled(int scale)
|
||||
{
|
||||
return (progress * scale) / fuelScale;
|
||||
|
@ -111,7 +60,7 @@ public class TileIronFurnace extends TileMachineBase implements IInventoryProvid
|
|||
}
|
||||
if (fuel <= 0 && canSmelt())
|
||||
{
|
||||
fuel = fuelGague = getItemBurnTime(getStackInSlot(fuelslot));
|
||||
fuel = fuelGague = (int) (TileEntityFurnace.getItemBurnTime(getStackInSlot(fuelslot)) * 1.25);
|
||||
if (fuel > 0)
|
||||
{
|
||||
if (getStackInSlot(fuelslot).getItem().hasContainerItem()) // Fuel
|
||||
|
|
|
@ -213,6 +213,7 @@ public class TechRebornWorldGen implements IWorldGenerator
|
|||
for (OreConfig ore : list)
|
||||
{
|
||||
WorldGenMinable worldGenMinable = new WorldGenMinable(ore.state, ore.veinSize);
|
||||
if(ore.state != null){
|
||||
for (int i = 0; i < ore.veinsPerChunk; i++)
|
||||
{
|
||||
xPos = chunkX * 16 + random.nextInt(16);
|
||||
|
@ -223,6 +224,7 @@ public class TechRebornWorldGen implements IWorldGenerator
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (genTree && config.rubberTreeConfig.shouldSpawn)
|
||||
{
|
||||
int chance = config.rubberTreeConfig.chance;
|
||||
|
|
Loading…
Reference in a new issue