mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-26 00:38:35 +01:00
Made directional breaker need energy in pulse mode.
Duh.
This commit is contained in:
parent
5f3e8fc748
commit
b3729703b7
1 changed files with 25 additions and 26 deletions
|
@ -26,7 +26,6 @@ import net.minecraftforge.event.ForgeEventFactory;
|
|||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class TileEntityDirectionalBreaker extends TileEntityInventoryBase implements IEnergyReceiver, IEnergySaver, IRedstoneToggle{
|
||||
|
@ -62,7 +61,6 @@ public class TileEntityDirectionalBreaker extends TileEntityInventoryBase implem
|
|||
super.updateEntity();
|
||||
if(!this.worldObj.isRemote){
|
||||
if(!this.isRedstonePowered && !this.activateOnceWithSignal){
|
||||
if(this.storage.getEnergyStored() >= ENERGY_USE*RANGE){
|
||||
if(this.currentTime > 0){
|
||||
this.currentTime--;
|
||||
if(this.currentTime <= 0){
|
||||
|
@ -73,7 +71,6 @@ public class TileEntityDirectionalBreaker extends TileEntityInventoryBase implem
|
|||
this.currentTime = 15;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(this.storage.getEnergyStored() != this.lastEnergy && this.sendUpdateWithInterval()){
|
||||
this.lastEnergy = this.storage.getEnergyStored();
|
||||
|
@ -82,6 +79,7 @@ public class TileEntityDirectionalBreaker extends TileEntityInventoryBase implem
|
|||
}
|
||||
|
||||
private void doWork(){
|
||||
if(this.storage.getEnergyStored() >= ENERGY_USE*RANGE){
|
||||
EnumFacing sideToManipulate = WorldUtil.getDirectionByPistonRotation(PosUtil.getMetadata(this.pos, this.worldObj));
|
||||
|
||||
for(int i = 0; i < RANGE; i++){
|
||||
|
@ -107,6 +105,7 @@ public class TileEntityDirectionalBreaker extends TileEntityInventoryBase implem
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int i, ItemStack stack){
|
||||
|
|
Loading…
Reference in a new issue