Balancing power requirements. Refactored tile entity package.
parent
b3a4e617dc
commit
77ef188fac
|
@ -1,7 +1,7 @@
|
|||
package com.droog71.prospect.blocks.energy;
|
||||
|
||||
import com.droog71.prospect.blocks.ProspectBlock;
|
||||
import com.droog71.prospect.tilentity.CableTileEntity;
|
||||
import com.droog71.prospect.tile_entity.CableTileEntity;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
|
|
|
@ -5,7 +5,8 @@ import java.util.Random;
|
|||
import com.droog71.prospect.Prospect;
|
||||
import com.droog71.prospect.blocks.ProspectBlockContainer;
|
||||
import com.droog71.prospect.init.ProspectBlocks;
|
||||
import com.droog71.prospect.tilentity.ExtruderTileEntity;
|
||||
import com.droog71.prospect.tile_entity.ExtruderTileEntity;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
|
|
@ -5,7 +5,8 @@ import java.util.Random;
|
|||
import com.droog71.prospect.Prospect;
|
||||
import com.droog71.prospect.blocks.ProspectBlockContainer;
|
||||
import com.droog71.prospect.init.ProspectBlocks;
|
||||
import com.droog71.prospect.tilentity.FabricatorTileEntity;
|
||||
import com.droog71.prospect.tile_entity.FabricatorTileEntity;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
|
|
@ -5,7 +5,8 @@ import java.util.Random;
|
|||
import com.droog71.prospect.Prospect;
|
||||
import com.droog71.prospect.blocks.ProspectBlockContainer;
|
||||
import com.droog71.prospect.init.ProspectBlocks;
|
||||
import com.droog71.prospect.tilentity.LaunchPadTileEntity;
|
||||
import com.droog71.prospect.tile_entity.LaunchPadTileEntity;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
|
|
@ -5,7 +5,8 @@ import java.util.Random;
|
|||
import com.droog71.prospect.Prospect;
|
||||
import com.droog71.prospect.blocks.ProspectBlockContainer;
|
||||
import com.droog71.prospect.init.ProspectBlocks;
|
||||
import com.droog71.prospect.tilentity.PressTileEntity;
|
||||
import com.droog71.prospect.tile_entity.PressTileEntity;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
package com.droog71.prospect.blocks.energy;
|
||||
|
||||
import com.droog71.prospect.blocks.ProspectBlock;
|
||||
import com.droog71.prospect.tilentity.PurifierTileEntity;
|
||||
import com.droog71.prospect.tile_entity.PurifierTileEntity;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
package com.droog71.prospect.blocks.energy;
|
||||
|
||||
import com.droog71.prospect.blocks.ProspectBlock;
|
||||
import com.droog71.prospect.tilentity.QuarryTileEntity;
|
||||
import com.droog71.prospect.tile_entity.QuarryTileEntity;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
|
|
@ -4,7 +4,8 @@ import java.util.Random;
|
|||
import com.droog71.prospect.Prospect;
|
||||
import com.droog71.prospect.blocks.ProspectBlockContainer;
|
||||
import com.droog71.prospect.init.ProspectBlocks;
|
||||
import com.droog71.prospect.tilentity.ReplicatorTileEntity;
|
||||
import com.droog71.prospect.tile_entity.ReplicatorTileEntity;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
package com.droog71.prospect.blocks.energy;
|
||||
|
||||
import com.droog71.prospect.blocks.ProspectBlock;
|
||||
import com.droog71.prospect.tilentity.SolarPanelTileEntity;
|
||||
import com.droog71.prospect.tile_entity.SolarPanelTileEntity;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package com.droog71.prospect.blocks.energy;
|
||||
|
||||
import com.droog71.prospect.blocks.ProspectBlock;
|
||||
import com.droog71.prospect.tilentity.TransformerTileEntity;
|
||||
import com.droog71.prospect.tile_entity.TransformerTileEntity;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
package com.droog71.prospect.gui;
|
||||
|
||||
import com.droog71.prospect.inventory.ExtruderContainer;
|
||||
import com.droog71.prospect.tilentity.ExtruderTileEntity;
|
||||
import com.droog71.prospect.tile_entity.ExtruderTileEntity;
|
||||
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
package com.droog71.prospect.gui;
|
||||
|
||||
import com.droog71.prospect.inventory.LaunchPadContainer;
|
||||
import com.droog71.prospect.tilentity.LaunchPadTileEntity;
|
||||
import com.droog71.prospect.tile_entity.LaunchPadTileEntity;
|
||||
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package com.droog71.prospect.gui;
|
||||
|
||||
import com.droog71.prospect.inventory.PressContainer;
|
||||
import com.droog71.prospect.tilentity.PressTileEntity;
|
||||
import com.droog71.prospect.tile_entity.PressTileEntity;
|
||||
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package com.droog71.prospect.gui;
|
||||
|
||||
import com.droog71.prospect.inventory.FabricatorContainer;
|
||||
import com.droog71.prospect.tilentity.FabricatorTileEntity;
|
||||
import com.droog71.prospect.tile_entity.FabricatorTileEntity;
|
||||
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
|
|
|
@ -5,11 +5,12 @@ import com.droog71.prospect.inventory.LaunchPadContainer;
|
|||
import com.droog71.prospect.inventory.PressContainer;
|
||||
import com.droog71.prospect.inventory.FabricatorContainer;
|
||||
import com.droog71.prospect.inventory.ReplicatorContainer;
|
||||
import com.droog71.prospect.tilentity.ExtruderTileEntity;
|
||||
import com.droog71.prospect.tilentity.LaunchPadTileEntity;
|
||||
import com.droog71.prospect.tilentity.PressTileEntity;
|
||||
import com.droog71.prospect.tilentity.FabricatorTileEntity;
|
||||
import com.droog71.prospect.tilentity.ReplicatorTileEntity;
|
||||
import com.droog71.prospect.tile_entity.ExtruderTileEntity;
|
||||
import com.droog71.prospect.tile_entity.FabricatorTileEntity;
|
||||
import com.droog71.prospect.tile_entity.LaunchPadTileEntity;
|
||||
import com.droog71.prospect.tile_entity.PressTileEntity;
|
||||
import com.droog71.prospect.tile_entity.ReplicatorTileEntity;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package com.droog71.prospect.gui;
|
||||
|
||||
import com.droog71.prospect.inventory.ReplicatorContainer;
|
||||
import com.droog71.prospect.tilentity.ReplicatorTileEntity;
|
||||
import com.droog71.prospect.tile_entity.ReplicatorTileEntity;
|
||||
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
|
|
|
@ -13,16 +13,16 @@ import com.droog71.prospect.blocks.energy.Replicator;
|
|||
import com.droog71.prospect.blocks.energy.SolarPanel;
|
||||
import com.droog71.prospect.blocks.energy.Transformer;
|
||||
import com.droog71.prospect.blocks.ore.LivingOre;
|
||||
import com.droog71.prospect.tilentity.CableTileEntity;
|
||||
import com.droog71.prospect.tilentity.ExtruderTileEntity;
|
||||
import com.droog71.prospect.tilentity.LaunchPadTileEntity;
|
||||
import com.droog71.prospect.tilentity.PressTileEntity;
|
||||
import com.droog71.prospect.tilentity.FabricatorTileEntity;
|
||||
import com.droog71.prospect.tilentity.PurifierTileEntity;
|
||||
import com.droog71.prospect.tilentity.QuarryTileEntity;
|
||||
import com.droog71.prospect.tilentity.ReplicatorTileEntity;
|
||||
import com.droog71.prospect.tilentity.SolarPanelTileEntity;
|
||||
import com.droog71.prospect.tilentity.TransformerTileEntity;
|
||||
import com.droog71.prospect.tile_entity.CableTileEntity;
|
||||
import com.droog71.prospect.tile_entity.ExtruderTileEntity;
|
||||
import com.droog71.prospect.tile_entity.FabricatorTileEntity;
|
||||
import com.droog71.prospect.tile_entity.LaunchPadTileEntity;
|
||||
import com.droog71.prospect.tile_entity.PressTileEntity;
|
||||
import com.droog71.prospect.tile_entity.PurifierTileEntity;
|
||||
import com.droog71.prospect.tile_entity.QuarryTileEntity;
|
||||
import com.droog71.prospect.tile_entity.ReplicatorTileEntity;
|
||||
import com.droog71.prospect.tile_entity.SolarPanelTileEntity;
|
||||
import com.droog71.prospect.tile_entity.TransformerTileEntity;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package com.droog71.prospect.tilentity;
|
||||
package com.droog71.prospect.tile_entity;
|
||||
|
||||
import com.droog71.prospect.fe.ProspectEnergyStorage;
|
||||
import net.minecraft.util.EnumFacing;
|
|
@ -1,4 +1,4 @@
|
|||
package com.droog71.prospect.tilentity;
|
||||
package com.droog71.prospect.tile_entity;
|
||||
|
||||
import com.droog71.prospect.fe.ProspectEnergyStorage;
|
||||
import com.droog71.prospect.init.ProspectItems;
|
|
@ -1,4 +1,4 @@
|
|||
package com.droog71.prospect.tilentity;
|
||||
package com.droog71.prospect.tile_entity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -350,24 +350,24 @@ public class FabricatorTileEntity extends TileEntity implements ITickable, ISide
|
|||
{
|
||||
if (Loader.isModLoaded("ic2"))
|
||||
{
|
||||
if (((BasicSink) ic2EnergySink).useEnergy(128))
|
||||
if (((BasicSink) ic2EnergySink).useEnergy(64))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (energyStorage != null)
|
||||
{
|
||||
if (energyStorage.getEnergyStored() >= 512)
|
||||
if (energyStorage.getEnergyStored() >= 256)
|
||||
{
|
||||
energyStorage.useEnergy(512);
|
||||
energyStorage.useEnergy(256);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (energyStorage != null)
|
||||
{
|
||||
if (energyStorage.getEnergyStored() >= 512)
|
||||
if (energyStorage.getEnergyStored() >= 256)
|
||||
{
|
||||
energyStorage.useEnergy(512);
|
||||
energyStorage.useEnergy(256);
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package com.droog71.prospect.tilentity;
|
||||
package com.droog71.prospect.tile_entity;
|
||||
|
||||
import com.droog71.prospect.fe.ProspectEnergyStorage;
|
||||
import com.droog71.prospect.init.ProspectBlocks;
|
||||
|
@ -384,24 +384,24 @@ public class LaunchPadTileEntity extends TileEntity implements ITickable, ISided
|
|||
{
|
||||
if (Loader.isModLoaded("ic2"))
|
||||
{
|
||||
if (((BasicSink) ic2EnergySink).useEnergy(10))
|
||||
if (((BasicSink) ic2EnergySink).useEnergy(8))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (energyStorage != null)
|
||||
{
|
||||
if (energyStorage.getEnergyStored() >= 40)
|
||||
if (energyStorage.getEnergyStored() >= 32)
|
||||
{
|
||||
energyStorage.useEnergy(40);
|
||||
energyStorage.useEnergy(32);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (energyStorage != null)
|
||||
{
|
||||
if (energyStorage.getEnergyStored() >= 40)
|
||||
if (energyStorage.getEnergyStored() >= 32)
|
||||
{
|
||||
energyStorage.useEnergy(40);
|
||||
energyStorage.useEnergy(32);
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package com.droog71.prospect.tilentity;
|
||||
package com.droog71.prospect.tile_entity;
|
||||
|
||||
import com.droog71.prospect.fe.ProspectEnergyStorage;
|
||||
import com.droog71.prospect.init.ProspectItems;
|
|
@ -1,4 +1,4 @@
|
|||
package com.droog71.prospect.tilentity;
|
||||
package com.droog71.prospect.tile_entity;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.NoSuchElementException;
|
||||
|
@ -152,20 +152,20 @@ public class PurifierTileEntity extends TileEntity implements ITickable
|
|||
|
||||
private boolean useEnergy()
|
||||
{
|
||||
if (energyStorage.getEnergyStored() >= 40)
|
||||
if (energyStorage.getEnergyStored() >= 32)
|
||||
{
|
||||
if (Loader.isModLoaded("ic2"))
|
||||
{
|
||||
((BasicSink) ic2EnergySink).setEnergyStored(0);
|
||||
((BasicSink) ic2EnergySink).setCapacity(0);
|
||||
}
|
||||
energyStorage.useEnergy(40);
|
||||
energyStorage.useEnergy(32);
|
||||
return true;
|
||||
}
|
||||
else if (Loader.isModLoaded("ic2"))
|
||||
{
|
||||
((BasicSink) ic2EnergySink).setCapacity(5000);
|
||||
if (((BasicSink) ic2EnergySink).useEnergy(10))
|
||||
if (((BasicSink) ic2EnergySink).useEnergy(8))
|
||||
{
|
||||
return true;
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package com.droog71.prospect.tilentity;
|
||||
package com.droog71.prospect.tile_entity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -487,14 +487,14 @@ public class QuarryTileEntity extends TileEntity implements ITickable
|
|||
}
|
||||
|
||||
//Speed of quarry scales with the amount of power received.
|
||||
if (getEnergyStored() >= 1024)
|
||||
{
|
||||
useEnergy(1024);
|
||||
quarryTimer += 32;
|
||||
}
|
||||
else if (getEnergyStored() >= 512)
|
||||
if (getEnergyStored() >= 512)
|
||||
{
|
||||
useEnergy(512);
|
||||
quarryTimer += 32;
|
||||
}
|
||||
else if (getEnergyStored() >= 256)
|
||||
{
|
||||
useEnergy(256);
|
||||
quarryTimer += 16;
|
||||
}
|
||||
else if (getEnergyStored() >= 128)
|
|
@ -1,4 +1,4 @@
|
|||
package com.droog71.prospect.tilentity;
|
||||
package com.droog71.prospect.tile_entity;
|
||||
|
||||
import com.droog71.prospect.fe.ProspectEnergyStorage;
|
||||
import com.droog71.prospect.init.ProspectItems;
|
||||
|
@ -52,12 +52,12 @@ public class ReplicatorTileEntity extends TileEntity implements ITickable, ISide
|
|||
{
|
||||
if (((BasicSink) ic2EnergySink == null))
|
||||
{
|
||||
ic2EnergySink = new BasicSink(this,256000,4);
|
||||
ic2EnergySink = new BasicSink(this,64000,3);
|
||||
}
|
||||
((BasicSink) ic2EnergySink).onLoad(); // notify the energy sink
|
||||
}
|
||||
energyStorage.capacity = 80000;
|
||||
energyStorage.maxReceive = 16000;
|
||||
energyStorage.capacity = 45000;
|
||||
energyStorage.maxReceive = 9000;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -198,7 +198,7 @@ public class ReplicatorTileEntity extends TileEntity implements ITickable, ISide
|
|||
{
|
||||
if ((BasicSink) ic2EnergySink == null)
|
||||
{
|
||||
ic2EnergySink = new BasicSink(this,256000,4);
|
||||
ic2EnergySink = new BasicSink(this,64000,3);
|
||||
}
|
||||
((BasicSink) ic2EnergySink).readFromNBT(compound);
|
||||
}
|
||||
|
@ -218,7 +218,7 @@ public class ReplicatorTileEntity extends TileEntity implements ITickable, ISide
|
|||
{
|
||||
if ((BasicSink) ic2EnergySink == null)
|
||||
{
|
||||
ic2EnergySink = new BasicSink(this,256000,4);
|
||||
ic2EnergySink = new BasicSink(this,64000,3);
|
||||
}
|
||||
((BasicSink) ic2EnergySink).writeToNBT(compound);
|
||||
}
|
||||
|
@ -359,7 +359,7 @@ public class ReplicatorTileEntity extends TileEntity implements ITickable, ISide
|
|||
{
|
||||
if (Loader.isModLoaded("ic2"))
|
||||
{
|
||||
((BasicSink) ic2EnergySink).setCapacity(256000);
|
||||
((BasicSink) ic2EnergySink).setCapacity(64000);
|
||||
if (((BasicSink) ic2EnergySink).getEnergyStored() > 0)
|
||||
{
|
||||
energyStored = (int) ((BasicSink) ic2EnergySink).getEnergyStored();
|
||||
|
@ -373,24 +373,24 @@ public class ReplicatorTileEntity extends TileEntity implements ITickable, ISide
|
|||
{
|
||||
if (Loader.isModLoaded("ic2"))
|
||||
{
|
||||
if (((BasicSink) ic2EnergySink).useEnergy(512))
|
||||
if (((BasicSink) ic2EnergySink).useEnergy(128))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (energyStorage != null)
|
||||
{
|
||||
if (energyStorage.getEnergyStored() >= 2048)
|
||||
if (energyStorage.getEnergyStored() >= 512)
|
||||
{
|
||||
energyStorage.useEnergy(2048);
|
||||
energyStorage.useEnergy(512);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (energyStorage != null)
|
||||
{
|
||||
if (energyStorage.getEnergyStored() >= 2048)
|
||||
if (energyStorage.getEnergyStored() >= 512)
|
||||
{
|
||||
energyStorage.useEnergy(2048);
|
||||
energyStorage.useEnergy(512);
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package com.droog71.prospect.tilentity;
|
||||
package com.droog71.prospect.tile_entity;
|
||||
|
||||
import com.droog71.prospect.fe.ProspectEnergyStorage;
|
||||
import ic2.api.energy.prefab.BasicSource;
|
|
@ -1,4 +1,4 @@
|
|||
package com.droog71.prospect.tilentity;
|
||||
package com.droog71.prospect.tile_entity;
|
||||
|
||||
import com.droog71.prospect.fe.ProspectEnergyStorage;
|
||||
import net.minecraft.util.EnumFacing;
|
Loading…
Reference in New Issue