Performance Commit 2

This commit is contained in:
Arcaratus 2015-07-28 13:49:26 -04:00
parent 603db8ee2a
commit c447106cb1
61 changed files with 96 additions and 368 deletions

View file

@ -25,9 +25,6 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory
protected int bufferTransferRate = 20;
private int lpPerTick = 10;
private int ticksPerReagent = 200;
public int progress;
public TEAlchemicCalcinator()
@ -54,7 +51,7 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory
for (int i = 0; i < tagList.tagCount(); i++)
{
NBTTagCompound savedTag = (NBTTagCompound) tagList.getCompoundTagAt(i);
NBTTagCompound savedTag = tagList.getCompoundTagAt(i);
if (savedTag.getBoolean("Empty"))
{
@ -83,7 +80,6 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory
for (int i = 0; i < inv.length; i++)
{
ItemStack stack = inv[i];
NBTTagCompound savedTag = new NBTTagCompound();
if (inv[i] != null)
@ -126,6 +122,8 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory
public void tickProgress()
{
int lpPerTick = 10;
int ticksPerReagent = 200;
ItemStack reagentItemStack = this.getStackInSlot(1);
if (reagentItemStack == null)
{
@ -163,7 +161,7 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory
SpellHelper.sendIndexedParticleToAllAround(worldObj, xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, 1, xCoord, yCoord, zCoord);
}
if (progress >= this.ticksPerReagent)
if (progress >= ticksPerReagent)
{
progress = 0;
this.bufferTank.fill(possibleReagent, true);
@ -198,7 +196,7 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory
for (int i = 0; i < invTagList.tagCount(); i++)
{
NBTTagCompound savedTag = (NBTTagCompound) invTagList.getCompoundTagAt(i);
NBTTagCompound savedTag = invTagList.getCompoundTagAt(i);
if (savedTag.getBoolean("Empty"))
{
@ -233,7 +231,6 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory
for (int i = 0; i < inv.length; i++)
{
ItemStack stack = inv[i];
NBTTagCompound savedTag = new NBTTagCompound();
if (inv[i] != null)

View file

@ -497,7 +497,7 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone
ReagentStack remainingStack = resource.copy();
remainingStack.amount = maxFill - totalFill;
boolean doesReagentMatch = tanks[i].getReagent() == null ? false : tanks[i].getReagent().isReagentEqual(remainingStack);
boolean doesReagentMatch = tanks[i].getReagent() != null && tanks[i].getReagent().isReagentEqual(remainingStack);
if (doesReagentMatch)
{
@ -650,7 +650,7 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone
return;
}
this.attunedTankMap.put(reagent, new Integer(total));
this.attunedTankMap.put(reagent, total);
}
@Override

View file

@ -55,7 +55,7 @@ public class TEMimicBlock extends TileEntity
for (int i = 0; i < tagList.tagCount(); i++)
{
NBTTagCompound tag = (NBTTagCompound) tagList.getCompoundTagAt(i);
NBTTagCompound tag = tagList.getCompoundTagAt(i);
int slot = tag.getByte("Slot");
if (slot >= 0 && slot < inv.length)
@ -76,8 +76,6 @@ public class TEMimicBlock extends TileEntity
for (int i = 0; i < inv.length; i++)
{
ItemStack stack = inv[i];
if (inv[i] != null)
{
NBTTagCompound tag = new NBTTagCompound();
@ -194,8 +192,7 @@ public class TEMimicBlock extends TileEntity
{
if (item.getItem() instanceof ItemBlock)
{
Block block = ((ItemBlock) item.getItem()).field_150939_a;
return block;
return ((ItemBlock) item.getItem()).field_150939_a;
}
}
return null;

View file

@ -5,7 +5,6 @@ import java.util.List;
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;

View file

@ -1,7 +1,6 @@
package WayofTime.alchemicalWizardry.common.tileEntity.gui;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.common.items.sigil.holding.ContainerHolding;
@ -52,8 +51,6 @@ public class GuiHandler implements IGuiHandler
{
TileEntity tileEntity;
ItemStack held = player.getHeldItem();
switch (id)
{
case 0:

View file

@ -2,7 +2,6 @@ package WayofTime.alchemicalWizardry.common.tileEntity.gui;
import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer;
import WayofTime.alchemicalWizardry.common.tileEntity.container.ContainerTeleposer;
import net.minecraft.client.gui.inventory.GuiBrewingStand;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;