mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 23:28:35 +01:00
Whoops.
This commit is contained in:
parent
067aa31504
commit
861bcb0141
1 changed files with 55 additions and 51 deletions
|
@ -56,6 +56,28 @@ public class TileEntityOreMagnet extends TileEntityInventoryBase implements IEne
|
||||||
currentWorkTimer--;
|
currentWorkTimer--;
|
||||||
|
|
||||||
if(currentWorkTimer <= 0){
|
if(currentWorkTimer <= 0){
|
||||||
|
this.mine();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else this.currentWorkTimer = maxWorkTimer+MathHelper.getRandomIntegerInRange(worldObj.rand, 0, maxWorkTimer);
|
||||||
|
|
||||||
|
//Extract energy
|
||||||
|
this.storage.extractEnergy(energyUsePerTick, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Update Clients
|
||||||
|
if(this.lastEnergy != this.storage.getEnergyStored() || this.lastTankAmount != this.tank.getFluidAmount()){
|
||||||
|
this.lastEnergy = this.storage.getEnergyStored();
|
||||||
|
this.lastTankAmount = this.tank.getFluidAmount();
|
||||||
|
this.sendUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
//Empty Oil Bucket
|
||||||
|
WorldUtil.emptyBucket(this.tank, this.slots, SLOT_OIL_INPUT, SLOT_OIL_OUTPUT);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void mine(){
|
||||||
//The possible positions where ores can be mined up in RELATIVE COORDINATES!!
|
//The possible positions where ores can be mined up in RELATIVE COORDINATES!!
|
||||||
ArrayList<WorldPos> possiblePlacingPositions = new ArrayList<WorldPos>();
|
ArrayList<WorldPos> possiblePlacingPositions = new ArrayList<WorldPos>();
|
||||||
|
|
||||||
|
@ -108,24 +130,6 @@ public class TileEntityOreMagnet extends TileEntityInventoryBase implements IEne
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else this.currentWorkTimer = maxWorkTimer+MathHelper.getRandomIntegerInRange(worldObj.rand, 0, maxWorkTimer);
|
|
||||||
|
|
||||||
//Extract energy
|
|
||||||
this.storage.extractEnergy(energyUsePerTick, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
//Update Clients
|
|
||||||
if(this.lastEnergy != this.storage.getEnergyStored() || this.lastTankAmount != this.tank.getFluidAmount()){
|
|
||||||
this.lastEnergy = this.storage.getEnergyStored();
|
|
||||||
this.lastTankAmount = this.tank.getFluidAmount();
|
|
||||||
this.sendUpdate();
|
|
||||||
}
|
|
||||||
|
|
||||||
//Empty Oil Bucket
|
|
||||||
WorldUtil.emptyBucket(this.tank, this.slots, SLOT_OIL_INPUT, SLOT_OIL_OUTPUT);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void removeBlock(int x, int y, int z, Block block, int meta, int toPlaceY){
|
private void removeBlock(int x, int y, int z, Block block, int meta, int toPlaceY){
|
||||||
//Remove the Block
|
//Remove the Block
|
||||||
|
|
Loading…
Reference in a new issue