Removed something that's stupid.

This commit is contained in:
Ellpeck 2015-08-15 20:41:45 +02:00
parent ffc4180b3d
commit cb10d387d7
38 changed files with 139 additions and 217 deletions

View file

@ -3,6 +3,7 @@ package ellpeck.actuallyadditions.blocks;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import ellpeck.actuallyadditions.ActuallyAdditions;
import ellpeck.actuallyadditions.config.values.ConfigIntValues;
import ellpeck.actuallyadditions.inventory.GuiHandler;
import ellpeck.actuallyadditions.tile.TileEntityCanolaPress;
import ellpeck.actuallyadditions.util.BlockUtil;
@ -97,7 +98,7 @@ public class BlockCanolaPress extends BlockContainerBase implements INameableIte
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
BlockUtil.addInformation(theBlock, list, 1, "");
BlockUtil.addPowerUsageInfo(list, TileEntityCanolaPress.energyUsedPerTick);
BlockUtil.addPowerUsageInfo(list, ConfigIntValues.PRESS_ENERGY_USED.getValue());
}
@Override

View file

@ -3,6 +3,7 @@ package ellpeck.actuallyadditions.blocks;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import ellpeck.actuallyadditions.ActuallyAdditions;
import ellpeck.actuallyadditions.config.values.ConfigIntValues;
import ellpeck.actuallyadditions.inventory.GuiHandler;
import ellpeck.actuallyadditions.tile.TileEntityCoalGenerator;
import ellpeck.actuallyadditions.util.BlockUtil;
@ -113,7 +114,7 @@ public class BlockCoalGenerator extends BlockContainerBase implements INameableI
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
BlockUtil.addInformation(theBlock, list, 1, "");
BlockUtil.addPowerProductionInfo(list, TileEntityCoalGenerator.energyProducedPerTick);
BlockUtil.addPowerProductionInfo(list, ConfigIntValues.COAL_GEN_ENERGY_PRODUCED.getValue());
}
@Override

View file

@ -4,6 +4,7 @@ import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import ellpeck.actuallyadditions.ActuallyAdditions;
import ellpeck.actuallyadditions.config.values.ConfigIntValues;
import ellpeck.actuallyadditions.inventory.GuiHandler;
import ellpeck.actuallyadditions.tile.TileEntityCoffeeMachine;
import ellpeck.actuallyadditions.util.BlockUtil;
@ -125,7 +126,7 @@ public class BlockCoffeeMachine extends BlockContainerBase implements INameableI
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
BlockUtil.addInformation(theBlock, list, 5, "");
BlockUtil.addPowerUsageInfo(list, TileEntityCoffeeMachine.energyUsePerTick);
BlockUtil.addPowerUsageInfo(list, ConfigIntValues.COFFEE_MACHINE_ENERGY_USED.getValue());
}
@Override

View file

@ -3,6 +3,7 @@ package ellpeck.actuallyadditions.blocks;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import ellpeck.actuallyadditions.config.values.ConfigIntValues;
import ellpeck.actuallyadditions.tile.TileEntityFurnaceSolar;
import ellpeck.actuallyadditions.util.BlockUtil;
import ellpeck.actuallyadditions.util.INameableItem;
@ -93,7 +94,7 @@ public class BlockFurnaceSolar extends BlockContainerBase implements INameableIt
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
BlockUtil.addInformation(theBlock, list, 1, "");
BlockUtil.addPowerProductionInfo(list, TileEntityFurnaceSolar.energyProducedPerTick);
BlockUtil.addPowerProductionInfo(list, ConfigIntValues.FURNACE_SOLAR_ENERGY_PRODUCED.getValue());
}
@Override

View file

@ -2,6 +2,7 @@ package ellpeck.actuallyadditions.blocks;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import ellpeck.actuallyadditions.config.values.ConfigIntValues;
import ellpeck.actuallyadditions.tile.TileEntityHeatCollector;
import ellpeck.actuallyadditions.util.BlockUtil;
import ellpeck.actuallyadditions.util.INameableItem;
@ -81,7 +82,7 @@ public class BlockHeatCollector extends BlockContainerBase implements INameableI
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
BlockUtil.addInformation(theBlock, list, 3, "");
BlockUtil.addPowerProductionInfo(list, TileEntityHeatCollector.energyProducedPerTick);
BlockUtil.addPowerProductionInfo(list, ConfigIntValues.HEAT_COLLECTOR_ENERGY_PRODUCED.getValue());
}
@Override

View file

@ -3,6 +3,7 @@ package ellpeck.actuallyadditions.blocks;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import ellpeck.actuallyadditions.ActuallyAdditions;
import ellpeck.actuallyadditions.config.values.ConfigIntValues;
import ellpeck.actuallyadditions.inventory.GuiHandler;
import ellpeck.actuallyadditions.tile.TileEntityItemRepairer;
import ellpeck.actuallyadditions.util.BlockUtil;
@ -108,7 +109,7 @@ public class BlockItemRepairer extends BlockContainerBase implements INameableIt
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
BlockUtil.addInformation(theBlock, list, 1, "");
BlockUtil.addPowerUsageInfo(list, TileEntityItemRepairer.energyUsePerTick);
BlockUtil.addPowerUsageInfo(list, ConfigIntValues.REPAIRER_ENERGY_USED.getValue());
}
@Override

View file

@ -2,6 +2,7 @@ package ellpeck.actuallyadditions.blocks;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import ellpeck.actuallyadditions.config.values.ConfigIntValues;
import ellpeck.actuallyadditions.tile.TileEntityLavaFactoryController;
import ellpeck.actuallyadditions.util.*;
import net.minecraft.block.Block;
@ -98,7 +99,7 @@ public class BlockLavaFactoryController extends BlockContainerBase implements IN
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
BlockUtil.addInformation(theBlock, list, 3, "");
if(KeyUtil.isShiftPressed()){
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".uses.desc") + " " + TileEntityLavaFactoryController.energyNeededToProduceLava + " RF/B");
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".uses.desc") + " " +ConfigIntValues.LAVA_FACTORY_ENERGY_USED.getValue()+ " RF/B");
}
}

View file

@ -3,6 +3,7 @@ package ellpeck.actuallyadditions.blocks;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import ellpeck.actuallyadditions.ActuallyAdditions;
import ellpeck.actuallyadditions.config.values.ConfigIntValues;
import ellpeck.actuallyadditions.inventory.GuiHandler;
import ellpeck.actuallyadditions.tile.TileEntityOilGenerator;
import ellpeck.actuallyadditions.util.BlockUtil;
@ -113,7 +114,7 @@ public class BlockOilGenerator extends BlockContainerBase implements INameableIt
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
BlockUtil.addInformation(theBlock, list, 1, "");
BlockUtil.addPowerProductionInfo(list, TileEntityOilGenerator.energyProducedPerTick);
BlockUtil.addPowerProductionInfo(list, ConfigIntValues.OIL_GEN_ENERGY_PRODUCED.getValue());
}
@Override

View file

@ -3,6 +3,7 @@ package ellpeck.actuallyadditions.blocks;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import ellpeck.actuallyadditions.ActuallyAdditions;
import ellpeck.actuallyadditions.config.values.ConfigIntValues;
import ellpeck.actuallyadditions.inventory.GuiHandler;
import ellpeck.actuallyadditions.tile.TileEntityOreMagnet;
import ellpeck.actuallyadditions.util.*;
@ -98,9 +99,9 @@ public class BlockOreMagnet extends BlockContainerBase implements INameableItem{
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){
BlockUtil.addInformation(theBlock, list, 3, "");
BlockUtil.addPowerUsageInfo(list, TileEntityOreMagnet.energyUsePerTick);
BlockUtil.addPowerUsageInfo(list, ConfigIntValues.ORE_MAGNET_ENERGY_USE.getValue());
if(KeyUtil.isShiftPressed()){
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".uses.desc")+" "+TileEntityOreMagnet.oilUsePerTick+" mB "+StringUtil.localize(InitBlocks.fluidOil.getUnlocalizedName())+"/"+StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".block.desc"));
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".uses.desc")+" "+ConfigIntValues.ORE_MAGNET_OIL_USE.getValue()+" mB "+StringUtil.localize(InitBlocks.fluidOil.getUnlocalizedName())+"/"+StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".block.desc"));
}
}

View file

@ -1,5 +1,6 @@
package ellpeck.actuallyadditions.blocks.render;
import ellpeck.actuallyadditions.config.values.ConfigIntValues;
import ellpeck.actuallyadditions.tile.TileEntityCompost;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.tileentity.TileEntity;
@ -48,13 +49,13 @@ public class ModelCompost extends ModelBaseAA{
public void renderExtra(float f, TileEntity tile){
TileEntityCompost tileCompost = (TileEntityCompost)tile;
int meta = tile.getWorldObj().getBlockMetadata(tile.xCoord, tile.yCoord, tile.zCoord);
if(meta > 0 && meta <= tileCompost.amountNeededToConvert){
int heightToDisplay = meta*13/tileCompost.amountNeededToConvert;
if(meta > 0 && meta <= ConfigIntValues.COMPOST_AMOUNT.getValue()){
int heightToDisplay = meta*13/ConfigIntValues.COMPOST_AMOUNT.getValue();
if(heightToDisplay > 13) heightToDisplay = 13;
this.innerRawList[heightToDisplay-1].render(f);
}
if(meta == tileCompost.amountNeededToConvert+1){
if(meta == ConfigIntValues.COMPOST_AMOUNT.getValue()+1){
this.innerDone.render(f);
}
}

View file

@ -2,6 +2,7 @@ package ellpeck.actuallyadditions.inventory.gui;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import ellpeck.actuallyadditions.config.values.ConfigIntValues;
import ellpeck.actuallyadditions.inventory.ContainerFeeder;
import ellpeck.actuallyadditions.tile.TileEntityBase;
import ellpeck.actuallyadditions.tile.TileEntityFeeder;
@ -46,10 +47,10 @@ public class GuiFeeder extends GuiContainer{
this.drawTexturedModalRect(guiLeft+85, guiTop+42-i, 181, 19+19-i, 6, 20);
}
if(this.tileFeeder.currentAnimalAmount >= 2 && this.tileFeeder.currentAnimalAmount < this.tileFeeder.animalThreshold)
if(this.tileFeeder.currentAnimalAmount >= 2 && this.tileFeeder.currentAnimalAmount < ConfigIntValues.FEEDER_THRESHOLD.getValue())
this.drawTexturedModalRect(guiLeft+70, guiTop+31, 192, 16, 8, 8);
if(this.tileFeeder.currentAnimalAmount >= this.tileFeeder.animalThreshold)
if(this.tileFeeder.currentAnimalAmount >= ConfigIntValues.FEEDER_THRESHOLD.getValue())
this.drawTexturedModalRect(guiLeft+70, guiTop+31, 192, 24, 8, 8);
}
@ -57,7 +58,7 @@ public class GuiFeeder extends GuiContainer{
public void drawScreen(int x, int y, float f){
super.drawScreen(x, y, f);
if(x >= guiLeft+69 && y >= guiTop+30 && x <= guiLeft+69+10 && y <= guiTop+30+10){
String[] array = new String[]{(this.tileFeeder.currentAnimalAmount+" "+StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.animals")), ((this.tileFeeder.currentAnimalAmount >= 2 && this.tileFeeder.currentAnimalAmount < this.tileFeeder.animalThreshold) ? StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.enoughToBreed") : (this.tileFeeder.currentAnimalAmount >= this.tileFeeder.animalThreshold ? StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.tooMany") : StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.notEnough")))};
String[] array = new String[]{(this.tileFeeder.currentAnimalAmount+" "+StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.animals")), ((this.tileFeeder.currentAnimalAmount >= 2 && this.tileFeeder.currentAnimalAmount < ConfigIntValues.FEEDER_THRESHOLD.getValue()) ? StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.enoughToBreed") : (this.tileFeeder.currentAnimalAmount >= ConfigIntValues.FEEDER_THRESHOLD.getValue() ? StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.tooMany") : StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.notEnough")))};
this.func_146283_a(Arrays.asList(array), x, y);
}
}

View file

@ -42,9 +42,6 @@ public class ItemDrill extends ItemEnergy implements INameableItem{
super(500000, 5000, 4);
}
public static float defaultEfficiency = ConfigFloatValues.DRILL_DAMAGE.getValue();
public static int energyUsePerBlockOrHit = ConfigIntValues.DRILL_ENERGY_USE.getValue();
@Override
//Places Blocks if the Placing Upgrade is installed
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int hitSide, float hitX, float hitY, float hitZ){
@ -108,7 +105,7 @@ public class ItemDrill extends ItemEnergy implements INameableItem{
* @return The Mining Speed depending on the Speed Upgrades
*/
public float getEfficiencyFromUpgrade(ItemStack stack){
float efficiency = defaultEfficiency;
float efficiency = ConfigFloatValues.DRILL_DAMAGE.getValue();
if(this.getHasUpgrade(stack, ItemDrillUpgrade.UpgradeType.SPEED)){
if(this.getHasUpgrade(stack, ItemDrillUpgrade.UpgradeType.SPEED_II)){
if(this.getHasUpgrade(stack, ItemDrillUpgrade.UpgradeType.SPEED_III)) efficiency += 37.0F;
@ -125,7 +122,7 @@ public class ItemDrill extends ItemEnergy implements INameableItem{
* @return The Energy use per Block
*/
public int getEnergyUsePerBlock(ItemStack stack){
int use = energyUsePerBlockOrHit;
int use = ConfigIntValues.DRILL_ENERGY_USE.getValue();
//Speed
if(this.getHasUpgrade(stack, ItemDrillUpgrade.UpgradeType.SPEED)){
@ -428,7 +425,7 @@ public class ItemDrill extends ItemEnergy implements INameableItem{
@Override
public Multimap getAttributeModifiers(ItemStack stack){
Multimap map = super.getAttributeModifiers(stack);
map.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), new AttributeModifier(field_111210_e, "Tool modifier", this.getEnergyStored(stack) >= energyUsePerBlockOrHit ? 8.0F : 0.0F, 0));
map.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), new AttributeModifier(field_111210_e, "Tool modifier", this.getEnergyStored(stack) >= ConfigIntValues.DRILL_ENERGY_USE.getValue() ? 8.0F : 0.0F, 0));
return map;
}
}

View file

@ -25,13 +25,6 @@ import java.util.Random;
public class ItemGrowthRing extends ItemEnergy implements INameableItem{
private static final int RANGE = ConfigIntValues.GROWTH_RING_RANGE.getValue();
private static final int ENERGY_USED_PER_TICK = ConfigIntValues.GROWTH_RING_ENERGY_USE.getValue();
//The waiting time per growth cycle
private static final int WAIT_TIME = ConfigIntValues.GROWTH_RING_COOLDOWN.getValue();
//The amount of Growth Ticks given to random plants around
private static final int GROWTH_TICKS_PER_CYCLE = ConfigIntValues.GROWTH_RING_GROWTH_PER_CYCLE.getValue();
public ItemGrowthRing(){
super(1000000, 5000, 1);
}
@ -43,17 +36,17 @@ public class ItemGrowthRing extends ItemEnergy implements INameableItem{
EntityPlayer player = (EntityPlayer)entity;
ItemStack equipped = player.getCurrentEquippedItem();
if(equipped != null && equipped == stack && this.getEnergyStored(stack) >= ENERGY_USED_PER_TICK){
if(equipped != null && equipped == stack && this.getEnergyStored(stack) >= ConfigIntValues.GROWTH_RING_ENERGY_USE.getValue()){
ArrayList<WorldPos> blocks = new ArrayList<WorldPos>();
if(stack.stackTagCompound == null) stack.setTagCompound(new NBTTagCompound());
int waitTime = stack.stackTagCompound.getInteger("WaitTime");
//Adding all possible Blocks
if(waitTime >= WAIT_TIME){
for(int x = -RANGE; x < RANGE+1; x++){
for(int z = -RANGE; z < RANGE+1; z++){
for(int y = -RANGE; y < RANGE+1; y++){
if(waitTime >= ConfigIntValues.GROWTH_RING_COOLDOWN.getValue()){
for(int x = -ConfigIntValues.GROWTH_RING_RANGE.getValue(); x < ConfigIntValues.GROWTH_RING_RANGE.getValue()+1; x++){
for(int z = -ConfigIntValues.GROWTH_RING_RANGE.getValue(); z < ConfigIntValues.GROWTH_RING_RANGE.getValue()+1; z++){
for(int y = -ConfigIntValues.GROWTH_RING_RANGE.getValue(); y < ConfigIntValues.GROWTH_RING_RANGE.getValue()+1; y++){
int theX = MathHelper.floor_double(player.posX+x);
int theY = MathHelper.floor_double(player.posY+y);
int theZ = MathHelper.floor_double(player.posZ+z);
@ -67,7 +60,7 @@ public class ItemGrowthRing extends ItemEnergy implements INameableItem{
//Fertilizing the Blocks
if(!blocks.isEmpty()){
for(int i = 0; i < GROWTH_TICKS_PER_CYCLE; i++){
for(int i = 0; i < ConfigIntValues.GROWTH_RING_GROWTH_PER_CYCLE.getValue(); i++){
WorldPos pos = blocks.get(new Random().nextInt(blocks.size()));
int metaBefore = pos.getMetadata();
@ -86,7 +79,7 @@ public class ItemGrowthRing extends ItemEnergy implements INameableItem{
//Use Energy every tick
if(!player.capabilities.isCreativeMode){
this.extractEnergy(stack, ENERGY_USED_PER_TICK, false);
this.extractEnergy(stack, ConfigIntValues.GROWTH_RING_ENERGY_USE.getValue(), false);
}
}
}

View file

@ -24,10 +24,6 @@ import java.util.List;
public class ItemLeafBlower extends Item implements INameableItem{
public final int range = ConfigIntValues.LEAF_BLOWER_RANGE_SIDES.getValue();
public final int rangeUp = ConfigIntValues.LEAF_BLOWER_RANGE_UP.getValue();
public final boolean hasSound = ConfigBoolValues.LEAF_BLOWER_SOUND.isEnabled();
private final boolean isAdvanced;
public ItemLeafBlower(boolean isAdvanced){
@ -42,7 +38,7 @@ public class ItemLeafBlower extends Item implements INameableItem{
//Breaks the Blocks
this.breakStuff(player.worldObj, MathHelper.floor_double(player.posX), MathHelper.floor_double(player.posY), MathHelper.floor_double(player.posZ));
//Plays a Minecart sounds (It really sounds like a Leaf Blower!)
if(this.hasSound) player.worldObj.playSoundAtEntity(player, "minecart.base", 0.3F, 0.001F);
if(ConfigBoolValues.LEAF_BLOWER_SOUND.isEnabled()) player.worldObj.playSoundAtEntity(player, "minecart.base", 0.3F, 0.001F);
}
}
}
@ -55,9 +51,9 @@ public class ItemLeafBlower extends Item implements INameableItem{
* @param z The Z Position of the Player
*/
public void breakStuff(World world, int x, int y, int z){
for(int reachX = -range; reachX < range+1; reachX++){
for(int reachZ = -range; reachZ < range+1; reachZ++){
for(int reachY = (this.isAdvanced ? -range : -rangeUp); reachY < (this.isAdvanced ? range+1 : rangeUp+1); reachY++){
for(int reachX = -ConfigIntValues.LEAF_BLOWER_RANGE_SIDES.getValue(); reachX < ConfigIntValues.LEAF_BLOWER_RANGE_SIDES.getValue()+1; reachX++){
for(int reachZ = -ConfigIntValues.LEAF_BLOWER_RANGE_SIDES.getValue(); reachZ < ConfigIntValues.LEAF_BLOWER_RANGE_SIDES.getValue()+1; reachZ++){
for(int reachY = (this.isAdvanced ? -ConfigIntValues.LEAF_BLOWER_RANGE_SIDES.getValue() : -ConfigIntValues.LEAF_BLOWER_RANGE_UP.getValue()); reachY < (this.isAdvanced ? ConfigIntValues.LEAF_BLOWER_RANGE_SIDES.getValue()+1 : ConfigIntValues.LEAF_BLOWER_RANGE_UP.getValue()+1); reachY++){
//The current Block to break
Block block = world.getBlock(x+reachX, y+reachY, z+reachZ);
if(block != null && (block instanceof BlockBush || (this.isAdvanced && block instanceof BlockLeavesBase))){

View file

@ -20,9 +20,6 @@ import java.util.ArrayList;
public class ItemMagnetRing extends ItemEnergy implements INameableItem{
private static final int RANGE = ConfigIntValues.MAGNET_RING_RANGE.getValue();
private static final int ENERGY_USED_PER_TICK = ConfigIntValues.MAGNET_RING_ENERGY_USE.getValue();
public ItemMagnetRing(){
super(3000000, 5000, 1);
}
@ -30,9 +27,9 @@ public class ItemMagnetRing extends ItemEnergy implements INameableItem{
@SuppressWarnings("unchecked")
@Override
public void onUpdate(ItemStack stack, World world, Entity entity, int par4, boolean par5){
if(this.getEnergyStored(stack) >= ENERGY_USED_PER_TICK){
if(this.getEnergyStored(stack) >= ConfigIntValues.MAGNET_RING_ENERGY_USE.getValue()){
//Get all the Items in the area
ArrayList<EntityItem> items = (ArrayList<EntityItem>)world.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(entity.posX-RANGE, entity.posY-RANGE, entity.posZ-RANGE, entity.posX+RANGE, entity.posY+RANGE, entity.posZ+RANGE));
ArrayList<EntityItem> items = (ArrayList<EntityItem>)world.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(entity.posX-ConfigIntValues.MAGNET_RING_RANGE.getValue(), entity.posY-ConfigIntValues.MAGNET_RING_RANGE.getValue(), entity.posZ-ConfigIntValues.MAGNET_RING_RANGE.getValue(), entity.posX+ConfigIntValues.MAGNET_RING_RANGE.getValue(), entity.posY+ConfigIntValues.MAGNET_RING_RANGE.getValue(), entity.posZ+ConfigIntValues.MAGNET_RING_RANGE.getValue()));
if(!items.isEmpty()){
for(EntityItem item : items){
//If the Item is near enough to get picked up
@ -52,7 +49,7 @@ public class ItemMagnetRing extends ItemEnergy implements INameableItem{
//Use Energy per tick
if(!((EntityPlayer)entity).capabilities.isCreativeMode){
this.extractEnergy(stack, ENERGY_USED_PER_TICK, false);
this.extractEnergy(stack, ConfigIntValues.MAGNET_RING_ENERGY_USE.getValue(), false);
}
}
}

View file

@ -21,10 +21,6 @@ import net.minecraftforge.common.util.ForgeDirection;
public class ItemTeleStaff extends ItemEnergy implements INameableItem{
private static final int reach = ConfigIntValues.TELE_STAFF_REACH.getValue();
private static final int energyUsedPerBlock = ConfigIntValues.TELE_STAFF_ENERGY_USE.getValue();
private static final int waitTime = ConfigIntValues.TELE_STAFF_WAIT_TIME.getValue();
public ItemTeleStaff(){
super(500000, 10000, 2);
}
@ -77,7 +73,7 @@ public class ItemTeleStaff extends ItemEnergy implements INameableItem{
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player){
if(!world.isRemote){
if(this.getWaitTime(stack) <= 0){
MovingObjectPosition pos = WorldUtil.getNearestPositionWithAir(world, player, reach);
MovingObjectPosition pos = WorldUtil.getNearestPositionWithAir(world, player, ConfigIntValues.TELE_STAFF_REACH.getValue());
if(pos != null && (pos.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK || player.rotationPitch >= -5)){
int side = pos.sideHit;
if(side != -1){
@ -86,14 +82,14 @@ public class ItemTeleStaff extends ItemEnergy implements INameableItem{
double x = pos.hitVec.xCoord-(side == 4 ? 0.5 : 0)+(side == 5 ? 0.5 : 0);
double y = pos.hitVec.yCoord-(side == 0 ? 2.0 : 0)+(side == 1 ? 0.5 : 0);
double z = pos.hitVec.zCoord-(side == 2 ? 0.5 : 0)+(side == 3 ? 0.5 : 0);
int use = energyUsedPerBlock+(int)(energyUsedPerBlock*pos.hitVec.distanceTo(Vec3.createVectorHelper(player.posX, player.posY+(player.getEyeHeight()-player.getDefaultEyeHeight()), player.posZ)));
int use = ConfigIntValues.TELE_STAFF_ENERGY_USE.getValue()+(int)(ConfigIntValues.TELE_STAFF_ENERGY_USE.getValue()*pos.hitVec.distanceTo(Vec3.createVectorHelper(player.posX, player.posY+(player.getEyeHeight()-player.getDefaultEyeHeight()), player.posZ)));
if(this.getEnergyStored(stack) >= use){
((EntityPlayerMP)player).playerNetServerHandler.setPlayerLocation(x, y, z, player.rotationYaw, player.rotationPitch);
player.mountEntity(null);
world.playSoundAtEntity(player, "mob.endermen.portal", 1.0F, 1.0F);
if(!player.capabilities.isCreativeMode){
this.extractEnergy(stack, use, false);
this.setWaitTime(stack, waitTime);
this.setWaitTime(stack, ConfigIntValues.TELE_STAFF_WAIT_TIME.getValue());
}
}
}

View file

@ -17,9 +17,6 @@ import net.minecraft.world.World;
public class ItemWaterRemovalRing extends ItemEnergy implements INameableItem{
private static final int RANGE = ConfigIntValues.WATER_RING_RANGE.getValue();
private static final int ENERGY_USED_PER_BLOCK = ConfigIntValues.WATER_RING_ENERGY_USE.getValue();
public ItemWaterRemovalRing(){
super(1000000, 5000, 1);
}
@ -31,22 +28,22 @@ public class ItemWaterRemovalRing extends ItemEnergy implements INameableItem{
EntityPlayer player = (EntityPlayer)entity;
ItemStack equipped = player.getCurrentEquippedItem();
if(equipped != null && equipped == stack && this.getEnergyStored(stack) >= ENERGY_USED_PER_BLOCK){
if(equipped != null && equipped == stack && this.getEnergyStored(stack) >= ConfigIntValues.WATER_RING_ENERGY_USE.getValue()){
//Setting everything to air
for(int x = -RANGE; x < RANGE+1; x++){
for(int z = -RANGE; z < RANGE+1; z++){
for(int y = -RANGE; y < RANGE+1; y++){
for(int x = -ConfigIntValues.WATER_RING_RANGE.getValue(); x < ConfigIntValues.WATER_RING_RANGE.getValue()+1; x++){
for(int z = -ConfigIntValues.WATER_RING_RANGE.getValue(); z < ConfigIntValues.WATER_RING_RANGE.getValue()+1; z++){
for(int y = -ConfigIntValues.WATER_RING_RANGE.getValue(); y < ConfigIntValues.WATER_RING_RANGE.getValue()+1; y++){
int theX = MathHelper.floor_double(player.posX+x);
int theY = MathHelper.floor_double(player.posY+y);
int theZ = MathHelper.floor_double(player.posZ+z);
if(this.getEnergyStored(stack) >= ENERGY_USED_PER_BLOCK){
if(this.getEnergyStored(stack) >= ConfigIntValues.WATER_RING_ENERGY_USE.getValue()){
//Remove Water
if(world.getBlock(theX, theY, theZ) == Blocks.water || world.getBlock(theX, theY, theZ) == Blocks.flowing_water){
world.setBlockToAir(theX, theY, theZ);
if(!player.capabilities.isCreativeMode){
this.extractEnergy(stack, ENERGY_USED_PER_BLOCK, false);
this.extractEnergy(stack, ConfigIntValues.WATER_RING_ENERGY_USE.getValue(), false);
}
}
//Remove Lava
@ -54,7 +51,7 @@ public class ItemWaterRemovalRing extends ItemEnergy implements INameableItem{
world.setBlockToAir(theX, theY, theZ);
if(!player.capabilities.isCreativeMode){
this.extractEnergy(stack, ENERGY_USED_PER_BLOCK*2, false);
this.extractEnergy(stack, ConfigIntValues.WATER_RING_ENERGY_USE.getValue()*2, false);
}
}
}

View file

@ -23,7 +23,6 @@ public class TileEntityBreaker extends TileEntityInventoryBase{
public boolean isPlacer;
private final int timeNeeded = ConfigIntValues.BREAKER_TIME_NEEDED.getValue();
private int currentTime;
public TileEntityBreaker(int slots, String name){
@ -68,7 +67,7 @@ public class TileEntityBreaker extends TileEntityInventoryBase{
}
}
}
else this.currentTime = this.timeNeeded;
else this.currentTime = ConfigIntValues.BREAKER_TIME_NEEDED.getValue();
}
}
}

View file

@ -25,10 +25,6 @@ public class TileEntityCanolaPress extends TileEntityInventoryBase implements IE
public FluidTank tank = new FluidTank(2*FluidContainerRegistry.BUCKET_VOLUME);
private int lastTankAmount;
public static int energyUsedPerTick = ConfigIntValues.PRESS_ENERGY_USED.getValue();
public int mbProducedPerCanola = ConfigIntValues.PRESS_MB_PRODUCED.getValue();
public int maxTimeProcessing = ConfigIntValues.PRESS_PROCESSING_TIME.getValue();
public int currentProcessTime;
private int lastProcessTime;
@ -40,17 +36,17 @@ public class TileEntityCanolaPress extends TileEntityInventoryBase implements IE
@SuppressWarnings("unchecked")
public void updateEntity(){
if(!worldObj.isRemote){
if(this.isCanola(0) && this.mbProducedPerCanola <= this.tank.getCapacity()-this.tank.getFluidAmount()){
if(this.storage.getEnergyStored() >= energyUsedPerTick){
if(this.isCanola(0) && ConfigIntValues.PRESS_MB_PRODUCED.getValue() <= this.tank.getCapacity()-this.tank.getFluidAmount()){
if(this.storage.getEnergyStored() >= ConfigIntValues.PRESS_ENERGY_USED.getValue()){
this.currentProcessTime++;
this.storage.extractEnergy(energyUsedPerTick, false);
if(this.currentProcessTime >= this.maxTimeProcessing){
this.storage.extractEnergy(ConfigIntValues.PRESS_ENERGY_USED.getValue(), false);
if(this.currentProcessTime >= ConfigIntValues.PRESS_PROCESSING_TIME.getValue()){
this.currentProcessTime = 0;
this.slots[0].stackSize--;
if(this.slots[0].stackSize == 0) this.slots[0] = null;
this.tank.fill(new FluidStack(InitBlocks.fluidCanolaOil, mbProducedPerCanola), true);
this.tank.fill(new FluidStack(InitBlocks.fluidCanolaOil, ConfigIntValues.PRESS_MB_PRODUCED.getValue()), true);
this.markDirty();
}
}
@ -89,7 +85,7 @@ public class TileEntityCanolaPress extends TileEntityInventoryBase implements IE
@SideOnly(Side.CLIENT)
public int getProcessScaled(int i){
return this.currentProcessTime * i / this.maxTimeProcessing;
return this.currentProcessTime * i / ConfigIntValues.PRESS_PROCESSING_TIME.getValue();
}
@SideOnly(Side.CLIENT)

View file

@ -18,8 +18,6 @@ public class TileEntityCoalGenerator extends TileEntityInventoryBase implements
public EnergyStorage storage = new EnergyStorage(60000);
private int lastEnergy;
public static int energyProducedPerTick = ConfigIntValues.COAL_GEN_ENERGY_PRODUCED.getValue();
public int maxBurnTime;
private int lastBurnTime;
public int currentBurnTime;
@ -37,12 +35,12 @@ public class TileEntityCoalGenerator extends TileEntityInventoryBase implements
if(this.currentBurnTime > 0){
this.currentBurnTime--;
this.storage.receiveEnergy(energyProducedPerTick, false);
this.storage.receiveEnergy(ConfigIntValues.COAL_GEN_ENERGY_PRODUCED.getValue(), false);
}
if(this.currentBurnTime <= 0 && this.slots[0] != null && TileEntityFurnace.getItemBurnTime(this.slots[0]) > 0){
int burnTime = TileEntityFurnace.getItemBurnTime(this.slots[0]);
if(energyProducedPerTick*burnTime <= this.getMaxEnergyStored(ForgeDirection.UNKNOWN)-this.getEnergyStored(ForgeDirection.UNKNOWN)){
if(ConfigIntValues.COAL_GEN_ENERGY_PRODUCED.getValue()*burnTime <= this.getMaxEnergyStored(ForgeDirection.UNKNOWN)-this.getEnergyStored(ForgeDirection.UNKNOWN)){
this.maxBurnTime = burnTime;
this.currentBurnTime = burnTime;
this.slots[0].stackSize--;
@ -63,7 +61,7 @@ public class TileEntityCoalGenerator extends TileEntityInventoryBase implements
this.markDirty();
int meta = worldObj.getBlockMetadata(xCoord, yCoord, zCoord);
if(meta == 1){
if(!(this.currentBurnTime <= 0 && this.slots[0] != null && TileEntityFurnace.getItemBurnTime(this.slots[0]) > 0 && energyProducedPerTick*TileEntityFurnace.getItemBurnTime(this.slots[0]) <= this.getMaxEnergyStored(ForgeDirection.UNKNOWN)-this.getEnergyStored(ForgeDirection.UNKNOWN)))
if(!(this.currentBurnTime <= 0 && this.slots[0] != null && TileEntityFurnace.getItemBurnTime(this.slots[0]) > 0 && ConfigIntValues.COAL_GEN_ENERGY_PRODUCED.getValue()*TileEntityFurnace.getItemBurnTime(this.slots[0]) <= this.getMaxEnergyStored(ForgeDirection.UNKNOWN)-this.getEnergyStored(ForgeDirection.UNKNOWN)))
worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, 0, 2);
}
else worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, 1, 2);

View file

@ -31,16 +31,12 @@ public class TileEntityCoffeeMachine extends TileEntityInventoryBase implements
public FluidTank tank = new FluidTank(4*FluidContainerRegistry.BUCKET_VOLUME);
private int lastTank;
public static int energyUsePerTick = ConfigIntValues.COFFEE_MACHINE_ENERGY_USED.getValue();
public final int waterUsedPerCoffee = 500;
public final int coffeeCacheMaxAmount = 300;
public final int coffeeCacheAddPerItem = ConfigIntValues.COFFEE_CACHE_ADDED_PER_ITEM.getValue();
public final int coffeeCacheUsePerItem = ConfigIntValues.COFFEE_CACHE_USED_PER_ITEM.getValue();
public int coffeeCacheAmount;
private int lastCoffeeAmount;
public final int maxBrewTime = ConfigIntValues.COFFEE_MACHINE_TIME_USED.getValue();
public int brewTime;
private int lastBrewTime;
@ -69,10 +65,10 @@ public class TileEntityCoffeeMachine extends TileEntityInventoryBase implements
public void storeCoffee(){
if(this.slots[SLOT_COFFEE_BEANS] != null && this.slots[SLOT_COFFEE_BEANS].getItem() == InitItems.itemCoffeeBean){
if(this.coffeeCacheAddPerItem <= this.coffeeCacheMaxAmount-this.coffeeCacheAmount){
if(ConfigIntValues.COFFEE_CACHE_ADDED_PER_ITEM.getValue() <= this.coffeeCacheMaxAmount-this.coffeeCacheAmount){
this.slots[SLOT_COFFEE_BEANS].stackSize--;
if(this.slots[SLOT_COFFEE_BEANS].stackSize <= 0) this.slots[SLOT_COFFEE_BEANS] = null;
this.coffeeCacheAmount += this.coffeeCacheAddPerItem;
this.coffeeCacheAmount += ConfigIntValues.COFFEE_CACHE_ADDED_PER_ITEM.getValue();
}
}
@ -81,11 +77,11 @@ public class TileEntityCoffeeMachine extends TileEntityInventoryBase implements
public void brew(){
if(!worldObj.isRemote){
if(this.slots[SLOT_INPUT] != null && this.slots[SLOT_INPUT].getItem() == InitItems.itemMisc && this.slots[SLOT_INPUT].getItemDamage() == TheMiscItems.CUP.ordinal() && this.slots[SLOT_OUTPUT] == null && this.coffeeCacheAmount >= this.coffeeCacheUsePerItem && this.tank.getFluid() != null && this.tank.getFluid().getFluid() == FluidRegistry.WATER && this.tank.getFluidAmount() >= this.waterUsedPerCoffee){
if(this.storage.getEnergyStored() >= energyUsePerTick){
if(this.slots[SLOT_INPUT] != null && this.slots[SLOT_INPUT].getItem() == InitItems.itemMisc && this.slots[SLOT_INPUT].getItemDamage() == TheMiscItems.CUP.ordinal() && this.slots[SLOT_OUTPUT] == null && this.coffeeCacheAmount >= ConfigIntValues.COFFEE_CACHE_USED_PER_ITEM.getValue() && this.tank.getFluid() != null && this.tank.getFluid().getFluid() == FluidRegistry.WATER && this.tank.getFluidAmount() >= this.waterUsedPerCoffee){
if(this.storage.getEnergyStored() >= ConfigIntValues.COFFEE_MACHINE_ENERGY_USED.getValue()){
this.brewTime++;
this.storage.extractEnergy(energyUsePerTick, false);
if(this.brewTime >= this.maxBrewTime){
this.storage.extractEnergy(ConfigIntValues.COFFEE_MACHINE_ENERGY_USED.getValue(), false);
if(this.brewTime >= ConfigIntValues.COFFEE_MACHINE_TIME_USED.getValue()){
this.brewTime = 0;
ItemStack output = new ItemStack(InitItems.itemCoffee);
for(int i = 3; i < this.slots.length-2; i++){
@ -102,7 +98,7 @@ public class TileEntityCoffeeMachine extends TileEntityInventoryBase implements
this.slots[SLOT_OUTPUT] = output.copy();
this.slots[SLOT_INPUT].stackSize--;
if(this.slots[SLOT_INPUT].stackSize <= 0) this.slots[SLOT_INPUT] = null;
this.coffeeCacheAmount -= this.coffeeCacheUsePerItem;
this.coffeeCacheAmount -= ConfigIntValues.COFFEE_CACHE_USED_PER_ITEM.getValue();
this.tank.drain(this.waterUsedPerCoffee, true);
}
}
@ -128,7 +124,7 @@ public class TileEntityCoffeeMachine extends TileEntityInventoryBase implements
@SideOnly(Side.CLIENT)
public int getBrewScaled(int i){
return this.brewTime * i / this.maxBrewTime;
return this.brewTime * i / ConfigIntValues.COFFEE_MACHINE_TIME_USED.getValue();
}
@Override

View file

@ -10,9 +10,6 @@ import net.minecraft.nbt.NBTTagCompound;
public class TileEntityCompost extends TileEntityInventoryBase{
public final int amountNeededToConvert = ConfigIntValues.COMPOST_AMOUNT.getValue();
public final int conversionTimeNeeded = ConfigIntValues.COMPOST_TIME.getValue();
public int conversionTime;
public TileEntityCompost(){
@ -32,10 +29,10 @@ public class TileEntityCompost extends TileEntityInventoryBase{
}
boolean theFlag = this.conversionTime > 0;
if(this.slots[0] != null && !(this.slots[0].getItem() instanceof ItemFertilizer) && this.slots[0].stackSize >= this.amountNeededToConvert){
if(this.slots[0] != null && !(this.slots[0].getItem() instanceof ItemFertilizer) && this.slots[0].stackSize >= ConfigIntValues.COMPOST_AMOUNT.getValue()){
this.conversionTime++;
if(this.conversionTime >= this.conversionTimeNeeded){
this.slots[0] = new ItemStack(InitItems.itemFertilizer, this.amountNeededToConvert);
if(this.conversionTime >= ConfigIntValues.COMPOST_TIME.getValue()){
this.slots[0] = new ItemStack(InitItems.itemFertilizer, ConfigIntValues.COMPOST_AMOUNT.getValue());
this.conversionTime = 0;
}
}
@ -47,7 +44,7 @@ public class TileEntityCompost extends TileEntityInventoryBase{
@Override
public int getInventoryStackLimit(){
return this.amountNeededToConvert;
return ConfigIntValues.COMPOST_AMOUNT.getValue();
}
@Override

View file

@ -8,13 +8,8 @@ import net.minecraftforge.common.util.ForgeDirection;
public class TileEntityDropper extends TileEntityInventoryBase{
private final int timeNeeded = ConfigIntValues.DROPPER_TIME_NEEDED.getValue();
private int currentTime;
public TileEntityDropper(int slots, String name){
super(slots, name);
}
public TileEntityDropper(){
super(9, "dropper");
}
@ -34,7 +29,7 @@ public class TileEntityDropper extends TileEntityInventoryBase{
}
}
}
else this.currentTime = this.timeNeeded;
else this.currentTime = ConfigIntValues.DROPPER_TIME_NEEDED.getValue();
}
}
}

View file

@ -15,10 +15,6 @@ import java.util.Random;
public class TileEntityFeeder extends TileEntityInventoryBase implements IPacketSyncerToClient{
public int reach = ConfigIntValues.FEEDER_REACH.getValue();
public int timerGoal = ConfigIntValues.FEEDER_TIME.getValue();
public int animalThreshold = ConfigIntValues.FEEDER_THRESHOLD.getValue();
public int currentTimer;
public int currentAnimalAmount;
private int lastAnimalAmount;
@ -33,12 +29,12 @@ public class TileEntityFeeder extends TileEntityInventoryBase implements IPacket
public void updateEntity(){
if(!worldObj.isRemote){
boolean theFlag = this.currentTimer > 0;
List<EntityAnimal> animals = worldObj.getEntitiesWithinAABB(EntityAnimal.class, AxisAlignedBB.getBoundingBox(this.xCoord - reach, this.yCoord - reach, this.zCoord - reach, this.xCoord + reach, this.yCoord + reach, this.zCoord + reach));
List<EntityAnimal> animals = worldObj.getEntitiesWithinAABB(EntityAnimal.class, AxisAlignedBB.getBoundingBox(this.xCoord - ConfigIntValues.FEEDER_REACH.getValue(), this.yCoord - ConfigIntValues.FEEDER_REACH.getValue(), this.zCoord - ConfigIntValues.FEEDER_REACH.getValue(), this.xCoord + ConfigIntValues.FEEDER_REACH.getValue(), this.yCoord + ConfigIntValues.FEEDER_REACH.getValue(), this.zCoord + ConfigIntValues.FEEDER_REACH.getValue()));
if(animals != null){
this.currentAnimalAmount = animals.size();
if(this.currentAnimalAmount >= 2){
if(this.currentAnimalAmount < this.animalThreshold){
if(this.currentTimer >= this.timerGoal){
if(this.currentAnimalAmount < ConfigIntValues.FEEDER_THRESHOLD.getValue()){
if(this.currentTimer >= ConfigIntValues.FEEDER_TIME.getValue()){
this.currentTimer = 0;
if(this.slots[0] != null){
EntityAnimal randomAnimal = animals.get(new Random().nextInt(this.currentAnimalAmount));
@ -84,7 +80,7 @@ public class TileEntityFeeder extends TileEntityInventoryBase implements IPacket
@SideOnly(Side.CLIENT)
public int getCurrentTimerToScale(int i){
return this.currentTimer * i / this.timerGoal;
return this.currentTimer * i / ConfigIntValues.FEEDER_TIME.getValue();
}
@Override

View file

@ -21,11 +21,8 @@ public class TileEntityFermentingBarrel extends TileEntityInventoryBase implemen
private int lastOil;
public int currentProcessTime;
public int maxTimeProcessing = ConfigIntValues.BARREL_PROCESSING_TIME.getValue();
private int lastProcessTime;
public int mBProducedPerCycle = ConfigIntValues.BARREL_MB_PRODUCED.getValue();
public TileEntityFermentingBarrel(){
super(4, "fermentingBarrel");
}
@ -34,13 +31,13 @@ public class TileEntityFermentingBarrel extends TileEntityInventoryBase implemen
@SuppressWarnings("unchecked")
public void updateEntity(){
if(!worldObj.isRemote){
if(this.canolaTank.getFluidAmount() >= this.mBProducedPerCycle && this.mBProducedPerCycle <= this.oilTank.getCapacity()-this.oilTank.getFluidAmount()){
if(this.canolaTank.getFluidAmount() >= ConfigIntValues.BARREL_MB_PRODUCED.getValue() && ConfigIntValues.BARREL_MB_PRODUCED.getValue() <= this.oilTank.getCapacity()-this.oilTank.getFluidAmount()){
this.currentProcessTime++;
if(this.currentProcessTime >= this.maxTimeProcessing){
if(this.currentProcessTime >= ConfigIntValues.BARREL_PROCESSING_TIME.getValue()){
this.currentProcessTime = 0;
this.oilTank.fill(new FluidStack(InitBlocks.fluidOil, mBProducedPerCycle), true);
this.canolaTank.drain(mBProducedPerCycle, true);
this.oilTank.fill(new FluidStack(InitBlocks.fluidOil, ConfigIntValues.BARREL_MB_PRODUCED.getValue()), true);
this.canolaTank.drain(ConfigIntValues.BARREL_MB_PRODUCED.getValue(), true);
this.markDirty();
}
}
@ -80,7 +77,7 @@ public class TileEntityFermentingBarrel extends TileEntityInventoryBase implemen
@SideOnly(Side.CLIENT)
public int getProcessScaled(int i){
return this.currentProcessTime * i / this.maxTimeProcessing;
return this.currentProcessTime * i / ConfigIntValues.BARREL_PROCESSING_TIME.getValue();
}
@Override

View file

@ -15,8 +15,6 @@ import java.util.Random;
public class TileEntityFishingNet extends TileEntityBase{
public int timeUntilNextDropToSet = ConfigIntValues.FISHER_TIME.getValue();
public int timeUntilNextDrop;
@Override
@ -40,7 +38,7 @@ public class TileEntityFishingNet extends TileEntityBase{
}
}
}
else this.timeUntilNextDrop = this.timeUntilNextDropToSet + rand.nextInt(this.timeUntilNextDropToSet / 2);
else this.timeUntilNextDrop = ConfigIntValues.FISHER_TIME.getValue() + rand.nextInt(ConfigIntValues.FISHER_TIME.getValue() / 2);
}
}
}

View file

@ -87,7 +87,6 @@ public class TileEntityFluidCollector extends TileEntityInventoryBase implements
public boolean isPlacer;
private final int timeNeeded = ConfigIntValues.BREAKER_TIME_NEEDED.getValue();
private int currentTime;
public TileEntityFluidCollector(int slots, String name){
@ -146,7 +145,7 @@ public class TileEntityFluidCollector extends TileEntityInventoryBase implements
}
}
}
else this.currentTime = this.timeNeeded;
else this.currentTime = ConfigIntValues.BREAKER_TIME_NEEDED.getValue();
}
if(!this.isPlacer) WorldUtil.fillBucket(tank, slots, 0, 1);

View file

@ -22,10 +22,6 @@ public class TileEntityFurnaceDouble extends TileEntityInventoryBase implements
public EnergyStorage storage = new EnergyStorage(30000);
private int lastEnergy;
public int energyUsePerTick = ConfigIntValues.FURNACE_ENERGY_USED.getValue();
public int maxBurnTime = ConfigIntValues.FURNACE_DOUBLE_SMELT_TIME.getValue();
public int firstSmeltTime;
private int lastFirstSmelt;
@ -47,9 +43,9 @@ public class TileEntityFurnaceDouble extends TileEntityInventoryBase implements
if(canSmeltOnFirst){
if(this.storage.getEnergyStored() >= energyUsePerTick){
if(this.storage.getEnergyStored() >= ConfigIntValues.FURNACE_ENERGY_USED.getValue()){
this.firstSmeltTime++;
if(this.firstSmeltTime >= maxBurnTime){
if(this.firstSmeltTime >= ConfigIntValues.FURNACE_DOUBLE_SMELT_TIME.getValue()){
this.finishBurning(SLOT_INPUT_1, SLOT_OUTPUT_1);
this.firstSmeltTime = 0;
}
@ -58,9 +54,9 @@ public class TileEntityFurnaceDouble extends TileEntityInventoryBase implements
else this.firstSmeltTime = 0;
if(canSmeltOnSecond){
if(this.storage.getEnergyStored() >= energyUsePerTick){
if(this.storage.getEnergyStored() >= ConfigIntValues.FURNACE_ENERGY_USED.getValue()){
this.secondSmeltTime++;
if(this.secondSmeltTime >= maxBurnTime){
if(this.secondSmeltTime >= ConfigIntValues.FURNACE_DOUBLE_SMELT_TIME.getValue()){
this.finishBurning(SLOT_INPUT_2, SLOT_OUTPUT_2);
this.secondSmeltTime = 0;
}
@ -68,7 +64,7 @@ public class TileEntityFurnaceDouble extends TileEntityInventoryBase implements
}
else this.secondSmeltTime = 0;
if(this.storage.getEnergyStored() >= energyUsePerTick && this.firstSmeltTime > 0 || this.secondSmeltTime > 0) this.storage.extractEnergy(energyUsePerTick, false);
if(this.storage.getEnergyStored() >= ConfigIntValues.FURNACE_ENERGY_USED.getValue() && this.firstSmeltTime > 0 || this.secondSmeltTime > 0) this.storage.extractEnergy(ConfigIntValues.FURNACE_ENERGY_USED.getValue(), false);
if(flag != (this.firstSmeltTime > 0 || this.secondSmeltTime > 0)){
this.markDirty();
@ -134,12 +130,12 @@ public class TileEntityFurnaceDouble extends TileEntityInventoryBase implements
@SideOnly(Side.CLIENT)
public int getFirstTimeToScale(int i){
return this.firstSmeltTime * i / this.maxBurnTime;
return this.firstSmeltTime * i / ConfigIntValues.FURNACE_DOUBLE_SMELT_TIME.getValue();
}
@SideOnly(Side.CLIENT)
public int getSecondTimeToScale(int i){
return this.secondSmeltTime * i / this.maxBurnTime;
return this.secondSmeltTime * i / ConfigIntValues.FURNACE_DOUBLE_SMELT_TIME.getValue();
}
@Override

View file

@ -31,14 +31,12 @@ public class TileEntityFurnaceSolar extends TileEntityBase implements IEnergyPro
public EnergyStorage storage = new EnergyStorage(30000);
public static int energyProducedPerTick = ConfigIntValues.FURNACE_SOLAR_ENERGY_PRODUCED.getValue();
@Override
public void updateEntity(){
if(!worldObj.isRemote){
if(worldObj.canBlockSeeTheSky(xCoord, yCoord, zCoord) && worldObj.isDaytime()){
if(energyProducedPerTick <= this.getMaxEnergyStored(ForgeDirection.UNKNOWN)-this.getEnergyStored(ForgeDirection.UNKNOWN)){
this.storage.receiveEnergy(energyProducedPerTick, false);
if(ConfigIntValues.FURNACE_SOLAR_ENERGY_PRODUCED.getValue() <= this.getMaxEnergyStored(ForgeDirection.UNKNOWN)-this.getEnergyStored(ForgeDirection.UNKNOWN)){
this.storage.receiveEnergy(ConfigIntValues.FURNACE_SOLAR_ENERGY_PRODUCED.getValue(), false);
this.markDirty();
}
}

View file

@ -11,8 +11,6 @@ import java.util.Random;
public class TileEntityGreenhouseGlass extends TileEntityBase{
private int timeUntilNextFertToSet = ConfigIntValues.GLASS_TIME_NEEDED.getValue();
private int timeUntilNextFert;
@Override
@ -32,7 +30,7 @@ public class TileEntityGreenhouseGlass extends TileEntityBase{
}
}
}
else this.timeUntilNextFert = this.timeUntilNextFertToSet+new Random().nextInt(this.timeUntilNextFertToSet);
else this.timeUntilNextFert = ConfigIntValues.GLASS_TIME_NEEDED.getValue()+new Random().nextInt(ConfigIntValues.GLASS_TIME_NEEDED.getValue());
}
}
}

View file

@ -61,8 +61,6 @@ public class TileEntityGrinder extends TileEntityInventoryBase implements IEnerg
public TileEntityGrinderDouble(){
super(6, "grinderDouble");
this.isDouble = true;
this.maxCrushTime = ConfigIntValues.GRINDER_DOUBLE_CRUSH_TIME.getValue();
energyUsePerTick = ConfigIntValues.GRINDER_DOUBLE_ENERGY_USED.getValue();
}
}
@ -74,10 +72,6 @@ public class TileEntityGrinder extends TileEntityInventoryBase implements IEnerg
public static final int SLOT_OUTPUT_2_1 = 4;
public static final int SLOT_OUTPUT_2_2 = 5;
public int energyUsePerTick;
public int maxCrushTime;
public int firstCrushTime;
private int lastFirstCrush;
public int secondCrushTime;
@ -92,8 +86,14 @@ public class TileEntityGrinder extends TileEntityInventoryBase implements IEnerg
public TileEntityGrinder(){
super(3, "grinder");
this.isDouble = false;
this.maxCrushTime = ConfigIntValues.GRINDER_CRUSH_TIME.getValue();
energyUsePerTick = ConfigIntValues.GRINDER_ENERGY_USED.getValue();
}
private int getMaxCrushTime(){
return this.isDouble ? ConfigIntValues.GRINDER_DOUBLE_CRUSH_TIME.getValue() : ConfigIntValues.GRINDER_CRUSH_TIME.getValue();
}
private int getEnergyUse(){
return this.isDouble ? ConfigIntValues.GRINDER_DOUBLE_ENERGY_USED.getValue() : ConfigIntValues.GRINDER_ENERGY_USED.getValue();
}
@Override
@ -107,9 +107,9 @@ public class TileEntityGrinder extends TileEntityInventoryBase implements IEnerg
if(this.isDouble) canCrushOnSecond = this.canCrushOn(SLOT_INPUT_2, SLOT_OUTPUT_2_1, SLOT_OUTPUT_2_2);
if(canCrushOnFirst){
if(this.storage.getEnergyStored() >= energyUsePerTick){
if(this.storage.getEnergyStored() >= getEnergyUse()){
this.firstCrushTime++;
if(this.firstCrushTime >= maxCrushTime){
if(this.firstCrushTime >= getMaxCrushTime()){
this.finishCrushing(SLOT_INPUT_1, SLOT_OUTPUT_1_1, SLOT_OUTPUT_1_2);
this.firstCrushTime = 0;
}
@ -119,9 +119,9 @@ public class TileEntityGrinder extends TileEntityInventoryBase implements IEnerg
if(this.isDouble){
if(canCrushOnSecond){
if(this.storage.getEnergyStored() >= energyUsePerTick){
if(this.storage.getEnergyStored() >= getEnergyUse()){
this.secondCrushTime++;
if(this.secondCrushTime >= maxCrushTime){
if(this.secondCrushTime >= getMaxCrushTime()){
this.finishCrushing(SLOT_INPUT_2, SLOT_OUTPUT_2_1, SLOT_OUTPUT_2_2);
this.secondCrushTime = 0;
}
@ -130,7 +130,7 @@ public class TileEntityGrinder extends TileEntityInventoryBase implements IEnerg
else this.secondCrushTime = 0;
}
if(this.storage.getEnergyStored() >= energyUsePerTick && this.firstCrushTime > 0 || this.secondCrushTime > 0) this.storage.extractEnergy(energyUsePerTick, false);
if(this.storage.getEnergyStored() >= getEnergyUse() && this.firstCrushTime > 0 || this.secondCrushTime > 0) this.storage.extractEnergy(getEnergyUse(), false);
if(flag != (this.firstCrushTime > 0 || this.secondCrushTime > 0)){
this.markDirty();
@ -209,12 +209,12 @@ public class TileEntityGrinder extends TileEntityInventoryBase implements IEnerg
@SideOnly(Side.CLIENT)
public int getFirstTimeToScale(int i){
return this.firstCrushTime * i / this.maxCrushTime;
return this.firstCrushTime * i / this.getMaxCrushTime();
}
@SideOnly(Side.CLIENT)
public int getSecondTimeToScale(int i){
return this.secondCrushTime * i / this.maxCrushTime;
return this.secondCrushTime * i / this.getMaxCrushTime();
}
@Override

View file

@ -14,18 +14,13 @@ import java.util.Random;
public class TileEntityHeatCollector extends TileEntityBase implements IEnergyProvider{
private int randomChance = ConfigIntValues.HEAT_COLLECTOR_LAVA_CHANCE.getValue();
private int blocksNeeded = ConfigIntValues.HEAT_COLLECTOR_BLOCKS.getValue();
public EnergyStorage storage = new EnergyStorage(30000);
public static int energyProducedPerTick = ConfigIntValues.HEAT_COLLECTOR_ENERGY_PRODUCED.getValue();
@Override
public void updateEntity(){
if(!worldObj.isRemote){
ArrayList<Integer> blocksAround = new ArrayList<Integer>();
if(energyProducedPerTick <= this.getMaxEnergyStored(ForgeDirection.UNKNOWN)-this.getEnergyStored(ForgeDirection.UNKNOWN)){
if(ConfigIntValues.HEAT_COLLECTOR_ENERGY_PRODUCED.getValue() <= this.getMaxEnergyStored(ForgeDirection.UNKNOWN)-this.getEnergyStored(ForgeDirection.UNKNOWN)){
for(int i = 1; i <= 5; i++){
WorldPos coords = WorldUtil.getCoordsFromSide(WorldUtil.getDirectionBySidesInOrder(i), worldObj, xCoord, yCoord, zCoord);
if(coords != null){
@ -36,12 +31,12 @@ public class TileEntityHeatCollector extends TileEntityBase implements IEnergyPr
}
}
if(blocksAround.size() >= blocksNeeded){
this.storage.receiveEnergy(energyProducedPerTick, false);
if(blocksAround.size() >= ConfigIntValues.HEAT_COLLECTOR_BLOCKS.getValue()){
this.storage.receiveEnergy(ConfigIntValues.HEAT_COLLECTOR_ENERGY_PRODUCED.getValue(), false);
this.markDirty();
Random rand = new Random();
if(rand.nextInt(randomChance) == 0){
if(rand.nextInt(ConfigIntValues.HEAT_COLLECTOR_LAVA_CHANCE.getValue()) == 0){
int randomSide = blocksAround.get(rand.nextInt(blocksAround.size()));
WorldUtil.breakBlockAtSide(WorldUtil.getDirectionBySidesInOrder(randomSide), worldObj, xCoord, yCoord, zCoord);
}

View file

@ -19,10 +19,6 @@ public class TileEntityItemRepairer extends TileEntityInventoryBase implements I
public EnergyStorage storage = new EnergyStorage(300000);
private int lastEnergy;
private final int speedSlowdown = ConfigIntValues.REPAIRER_SPEED_SLOWDOWN.getValue();
public static int energyUsePerTick = ConfigIntValues.REPAIRER_ENERGY_USED.getValue();
public int nextRepairTick;
public TileEntityItemRepairer(){
@ -40,10 +36,10 @@ public class TileEntityItemRepairer extends TileEntityInventoryBase implements I
this.nextRepairTick = 0;
}
else{
if(this.storage.getEnergyStored() >= energyUsePerTick){
if(this.storage.getEnergyStored() >= ConfigIntValues.REPAIRER_ENERGY_USED.getValue()){
this.nextRepairTick++;
this.storage.extractEnergy(energyUsePerTick, false);
if(this.nextRepairTick >= this.speedSlowdown){
this.storage.extractEnergy(ConfigIntValues.REPAIRER_ENERGY_USED.getValue(), false);
if(this.nextRepairTick >= ConfigIntValues.REPAIRER_SPEED_SLOWDOWN.getValue()){
this.nextRepairTick = 0;
this.slots[SLOT_INPUT].setItemDamage(this.slots[SLOT_INPUT].getItemDamage() - 1);
}

View file

@ -14,9 +14,6 @@ public class TileEntityLavaFactoryController extends TileEntityBase implements I
public EnergyStorage storage = new EnergyStorage(3000000);
public static int energyNeededToProduceLava = ConfigIntValues.LAVA_FACTORY_ENERGY_USED.getValue();
private final int maxWorkTime = ConfigIntValues.LAVA_FACTORY_TIME.getValue();
private int currentWorkTime;
//The Positions the Case Blocks should be in for the Factory to work
@ -26,12 +23,12 @@ public class TileEntityLavaFactoryController extends TileEntityBase implements I
@SuppressWarnings("unchecked")
public void updateEntity(){
if(!worldObj.isRemote){
if(this.storage.getEnergyStored() >= energyNeededToProduceLava && this.isMultiblock() == HAS_AIR){
if(this.storage.getEnergyStored() >= ConfigIntValues.LAVA_FACTORY_ENERGY_USED.getValue() && this.isMultiblock() == HAS_AIR){
this.currentWorkTime++;
if(this.currentWorkTime >= this.maxWorkTime){
if(this.currentWorkTime >= ConfigIntValues.LAVA_FACTORY_TIME.getValue()){
this.currentWorkTime = 0;
worldObj.setBlock(xCoord, yCoord+1, zCoord, Blocks.lava);
this.storage.extractEnergy(energyNeededToProduceLava, false);
this.storage.extractEnergy(ConfigIntValues.LAVA_FACTORY_ENERGY_USED.getValue(), false);
}
}
else this.currentWorkTime = 0;

View file

@ -22,11 +22,6 @@ public class TileEntityOilGenerator extends TileEntityInventoryBase implements I
public FluidTank tank = new FluidTank(2*FluidContainerRegistry.BUCKET_VOLUME);
private int lastTank;
public static int energyProducedPerTick = ConfigIntValues.OIL_GEN_ENERGY_PRODUCED.getValue();
public int fuelUsedPerBurnup = ConfigIntValues.OIL_GEN_FUEL_USED.getValue();
public int maxBurnTime = ConfigIntValues.OIL_GEN_BURN_TIME.getValue();
public int currentBurnTime;
private int lastBurnTime;
@ -42,13 +37,13 @@ public class TileEntityOilGenerator extends TileEntityInventoryBase implements I
if(this.currentBurnTime > 0){
this.currentBurnTime--;
this.storage.receiveEnergy(energyProducedPerTick, false);
this.storage.receiveEnergy(ConfigIntValues.OIL_GEN_ENERGY_PRODUCED.getValue(), false);
}
if(energyProducedPerTick*this.maxBurnTime <= this.getMaxEnergyStored(ForgeDirection.UNKNOWN)-this.getEnergyStored(ForgeDirection.UNKNOWN)){
if(this.currentBurnTime <= 0 && this.tank.getFluidAmount() >= this.fuelUsedPerBurnup){
this.currentBurnTime = this.maxBurnTime;
this.tank.drain(this.fuelUsedPerBurnup, true);
if(ConfigIntValues.OIL_GEN_ENERGY_PRODUCED.getValue()*ConfigIntValues.OIL_GEN_BURN_TIME.getValue() <= this.getMaxEnergyStored(ForgeDirection.UNKNOWN)-this.getEnergyStored(ForgeDirection.UNKNOWN)){
if(this.currentBurnTime <= 0 && this.tank.getFluidAmount() >= ConfigIntValues.OIL_GEN_FUEL_USED.getValue()){
this.currentBurnTime = ConfigIntValues.OIL_GEN_BURN_TIME.getValue();
this.tank.drain(ConfigIntValues.OIL_GEN_FUEL_USED.getValue(), true);
}
}
@ -67,7 +62,7 @@ public class TileEntityOilGenerator extends TileEntityInventoryBase implements I
this.markDirty();
int meta = worldObj.getBlockMetadata(xCoord, yCoord, zCoord);
if(meta == 1){
if(!(energyProducedPerTick*this.maxBurnTime <= this.getMaxEnergyStored(ForgeDirection.UNKNOWN)-this.getEnergyStored(ForgeDirection.UNKNOWN) && FluidContainerRegistry.BUCKET_VOLUME <= this.tank.getCapacity()-this.tank.getFluidAmount()))
if(!(ConfigIntValues.OIL_GEN_ENERGY_PRODUCED.getValue()*ConfigIntValues.OIL_GEN_BURN_TIME.getValue() <= this.getMaxEnergyStored(ForgeDirection.UNKNOWN)-this.getEnergyStored(ForgeDirection.UNKNOWN) && FluidContainerRegistry.BUCKET_VOLUME <= this.tank.getCapacity()-this.tank.getFluidAmount()))
worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, 0, 2);
}
else worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, 1, 2);
@ -94,13 +89,12 @@ public class TileEntityOilGenerator extends TileEntityInventoryBase implements I
@SideOnly(Side.CLIENT)
public int getBurningScaled(int i){
return this.currentBurnTime * i / this.maxBurnTime;
return this.currentBurnTime * i / ConfigIntValues.OIL_GEN_BURN_TIME.getValue();
}
@Override
public void writeToNBT(NBTTagCompound compound){
compound.setInteger("BurnTime", this.currentBurnTime);
compound.setInteger("MaxBurnTime", this.maxBurnTime);
this.storage.writeToNBT(compound);
this.tank.writeToNBT(compound);
super.writeToNBT(compound);
@ -109,7 +103,6 @@ public class TileEntityOilGenerator extends TileEntityInventoryBase implements I
@Override
public void readFromNBT(NBTTagCompound compound){
this.currentBurnTime = compound.getInteger("BurnTime");
this.maxBurnTime = compound.getInteger("MaxBurnTime");
this.storage.readFromNBT(compound);
this.tank.readFromNBT(compound);
super.readFromNBT(compound);

View file

@ -37,11 +37,6 @@ public class TileEntityOreMagnet extends TileEntityInventoryBase implements IEne
private int currentWorkTimer;
private int maxWorkTimer = ConfigIntValues.ORE_MAGNET_MAX_TIMER.getValue();
private int range = ConfigIntValues.ORE_MAGNET_RANGE.getValue();
public static int oilUsePerTick = ConfigIntValues.ORE_MAGNET_OIL_USE.getValue();
public static int energyUsePerTick = ConfigIntValues.ORE_MAGNET_ENERGY_USE.getValue();
public TileEntityOreMagnet(){
super(3, "oreMagnet");
}
@ -51,7 +46,7 @@ public class TileEntityOreMagnet extends TileEntityInventoryBase implements IEne
public void updateEntity(){
if(!worldObj.isRemote){
if(this.storage.getEnergyStored() >= energyUsePerTick && this.tank.getFluid() != null && this.tank.getFluid().getFluid() == InitBlocks.fluidOil && this.tank.getFluidAmount() >= oilUsePerTick && !worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)){
if(this.storage.getEnergyStored() >= ConfigIntValues.ORE_MAGNET_ENERGY_USE.getValue() && this.tank.getFluid() != null && this.tank.getFluid().getFluid() == InitBlocks.fluidOil && this.tank.getFluidAmount() >= ConfigIntValues.ORE_MAGNET_OIL_USE.getValue() && !worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)){
if(this.currentWorkTimer > 0){
currentWorkTimer--;
@ -59,10 +54,10 @@ public class TileEntityOreMagnet extends TileEntityInventoryBase implements IEne
this.mine();
}
}
else this.currentWorkTimer = maxWorkTimer+MathHelper.getRandomIntegerInRange(worldObj.rand, 0, maxWorkTimer);
else this.currentWorkTimer = ConfigIntValues.ORE_MAGNET_MAX_TIMER.getValue()+MathHelper.getRandomIntegerInRange(worldObj.rand, 0, ConfigIntValues.ORE_MAGNET_MAX_TIMER.getValue());
//Extract energy
this.storage.extractEnergy(energyUsePerTick, false);
this.storage.extractEnergy(ConfigIntValues.ORE_MAGNET_ENERGY_USE.getValue(), false);
}
//Update Clients
@ -81,8 +76,8 @@ public class TileEntityOreMagnet extends TileEntityInventoryBase implements IEne
//The possible positions where ores can be mined up in RELATIVE COORDINATES!!
ArrayList<WorldPos> possiblePlacingPositions = new ArrayList<WorldPos>();
for(int x = -range/2; x <= range/2; x++){
for(int z = -range/2; z <= range/2; z++){
for(int x = -ConfigIntValues.ORE_MAGNET_RANGE.getValue()/2; x <= ConfigIntValues.ORE_MAGNET_RANGE.getValue()/2; x++){
for(int z = -ConfigIntValues.ORE_MAGNET_RANGE.getValue()/2; z <= ConfigIntValues.ORE_MAGNET_RANGE.getValue()/2; z++){
//Check if there is a casing below the Block to mine
if(WorldUtil.hasBlocksInPlacesGiven(new int[][]{{x, -1, z}}, InitBlocks.blockMisc, TheMiscBlocks.LAVA_FACTORY_CASE.ordinal(), worldObj, xCoord, yCoord, zCoord)){
//Can the block at the top be replaced?
@ -141,7 +136,7 @@ public class TileEntityOreMagnet extends TileEntityInventoryBase implements IEne
worldObj.playSoundEffect((double)xCoord+x+0.5D, (double)yCoord+toPlaceY+0.5D, (double)zCoord+z+0.5D, block.stepSound.func_150496_b(), (block.stepSound.getVolume()+1.0F)/2.0F, block.stepSound.getPitch()*0.8F);
//Extract oil
this.tank.drain(oilUsePerTick, true);
this.tank.drain(ConfigIntValues.ORE_MAGNET_OIL_USE.getValue(), true);
}
private boolean hasException(String name){

View file

@ -27,9 +27,6 @@ public class TileEntityPhantomPlacer extends TileEntityInventoryBase implements
public WorldPos boundPosition;
public int currentTime;
public final int timeNeeded = ConfigIntValues.PHANTOM_PLACER_TIME.getValue();
public final int defaultRange = ConfigIntValues.PHANTOM_PLACER_RANGE.getValue();
public int range;
public boolean isBreaker;
@ -46,7 +43,7 @@ public class TileEntityPhantomPlacer extends TileEntityInventoryBase implements
@Override
public void updateEntity(){
if(!worldObj.isRemote){
this.range = TileEntityPhantomface.upgradeRange(defaultRange, worldObj, xCoord, yCoord, zCoord);
this.range = TileEntityPhantomface.upgradeRange(ConfigIntValues.PHANTOM_PLACER_RANGE.getValue(), worldObj, xCoord, yCoord, zCoord);
if(!this.hasBoundPosition()){
this.boundPosition = null;
@ -81,7 +78,7 @@ public class TileEntityPhantomPlacer extends TileEntityInventoryBase implements
}
}
}
else this.currentTime = this.timeNeeded;
else this.currentTime = ConfigIntValues.PHANTOM_PLACER_TIME.getValue();
}
}
}

View file

@ -28,7 +28,6 @@ public class TileEntityPhantomface extends TileEntityInventoryBase implements IP
public BlockPhantom.Type type;
public final int defaultRange = ConfigIntValues.PHANTOMFACE_RANGE.getValue();
public int range;
private int rangeBefore;
@ -52,7 +51,7 @@ public class TileEntityPhantomface extends TileEntityInventoryBase implements IP
@Override
public void updateEntity(){
if(!worldObj.isRemote){
this.range = upgradeRange(defaultRange, worldObj, xCoord, yCoord, zCoord);
this.range = upgradeRange(ConfigIntValues.PHANTOMFACE_RANGE.getValue(), worldObj, xCoord, yCoord, zCoord);
if(!this.hasBoundPosition()){
this.boundPosition = null;