Fix random world gen crash - Fix electric furnace and version bump
This commit is contained in:
parent
207d42d81b
commit
d80280b110
4 changed files with 10 additions and 15 deletions
|
@ -60,7 +60,7 @@ configurations {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
version = "1.3.0"
|
version = "1.3.1"
|
||||||
|
|
||||||
def ENV = System.getenv()
|
def ENV = System.getenv()
|
||||||
if (ENV.BUILD_NUMBER) {
|
if (ENV.BUILD_NUMBER) {
|
||||||
|
|
|
@ -15,7 +15,7 @@ import techreborn.init.ModBlocks;
|
||||||
|
|
||||||
public class TileGenerator extends TilePowerAcceptor implements IWrenchable,IInventoryProvider
|
public class TileGenerator extends TilePowerAcceptor implements IWrenchable,IInventoryProvider
|
||||||
{
|
{
|
||||||
public static int outputAmount = 5; // This is in line with BC engines rf,
|
public static int outputAmount = 10; // This is in line with BC engines rf,
|
||||||
public Inventory inventory = new Inventory(2, "TileGenerator", 64, this);
|
public Inventory inventory = new Inventory(2, "TileGenerator", 64, this);
|
||||||
public int fuelSlot = 0;
|
public int fuelSlot = 0;
|
||||||
public int burnTime;
|
public int burnTime;
|
||||||
|
@ -33,7 +33,7 @@ public class TileGenerator extends TilePowerAcceptor implements IWrenchable,IInv
|
||||||
|
|
||||||
public static int getItemBurnTime(ItemStack stack)
|
public static int getItemBurnTime(ItemStack stack)
|
||||||
{
|
{
|
||||||
return TileEntityFurnace.getItemBurnTime(stack) / 2;
|
return TileEntityFurnace.getItemBurnTime(stack) / 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -21,7 +21,7 @@ public class TileElectricFurnace extends TilePowerAcceptor implements IWrenchabl
|
||||||
public int capacity = 1000;
|
public int capacity = 1000;
|
||||||
public int progress;
|
public int progress;
|
||||||
public int fuelScale = 100;
|
public int fuelScale = 100;
|
||||||
public int cost = 10;
|
public int cost = 8;
|
||||||
int input1 = 0;
|
int input1 = 0;
|
||||||
int output = 1;
|
int output = 1;
|
||||||
private static final int[] SLOTS_TOP = new int[] {0};
|
private static final int[] SLOTS_TOP = new int[] {0};
|
||||||
|
@ -43,18 +43,14 @@ public class TileElectricFurnace extends TilePowerAcceptor implements IWrenchabl
|
||||||
{
|
{
|
||||||
boolean burning = isBurning();
|
boolean burning = isBurning();
|
||||||
boolean updateInventory = false;
|
boolean updateInventory = false;
|
||||||
if (getEnergy() <= cost && canSmelt())
|
|
||||||
{
|
|
||||||
if (getEnergy() > cost)
|
|
||||||
{
|
|
||||||
updateInventory = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (isBurning() && canSmelt())
|
if (isBurning() && canSmelt())
|
||||||
{
|
{
|
||||||
updateState();
|
updateState();
|
||||||
|
|
||||||
progress++;
|
progress++;
|
||||||
|
if(progress % 10 == 0){
|
||||||
|
useEnergy(cost);
|
||||||
|
}
|
||||||
if (progress >= fuelScale)
|
if (progress >= fuelScale)
|
||||||
{
|
{
|
||||||
progress = 0;
|
progress = 0;
|
||||||
|
@ -84,20 +80,16 @@ public class TileElectricFurnace extends TilePowerAcceptor implements IWrenchabl
|
||||||
|
|
||||||
if (getStackInSlot(output) == null)
|
if (getStackInSlot(output) == null)
|
||||||
{
|
{
|
||||||
useEnergy(cost);
|
|
||||||
setInventorySlotContents(output, itemstack.copy());
|
setInventorySlotContents(output, itemstack.copy());
|
||||||
} else if (getStackInSlot(output).isItemEqual(itemstack))
|
} else if (getStackInSlot(output).isItemEqual(itemstack))
|
||||||
{
|
{
|
||||||
useEnergy(cost);
|
|
||||||
getStackInSlot(output).stackSize += itemstack.stackSize;
|
getStackInSlot(output).stackSize += itemstack.stackSize;
|
||||||
}
|
}
|
||||||
if (getStackInSlot(input1).stackSize > 1)
|
if (getStackInSlot(input1).stackSize > 1)
|
||||||
{
|
{
|
||||||
useEnergy(cost);
|
|
||||||
this.decrStackSize(input1, 1);
|
this.decrStackSize(input1, 1);
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
useEnergy(cost);
|
|
||||||
setInventorySlotContents(input1, null);
|
setInventorySlotContents(input1, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -259,6 +259,9 @@ public class TechRebornWorldGen implements IWorldGenerator
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(chance <0){
|
||||||
|
chance = 0;
|
||||||
|
}
|
||||||
if (random.nextInt(chance) == 0)
|
if (random.nextInt(chance) == 0)
|
||||||
{
|
{
|
||||||
int x = (chunkX * 16) + random.nextInt(15);
|
int x = (chunkX * 16) + random.nextInt(15);
|
||||||
|
|
Loading…
Add table
Reference in a new issue