Miners are better for servers now. Please update!

This commit is contained in:
Aidan Brady 2013-11-26 23:31:42 -05:00
parent b950960aea
commit 6739d81a12
2 changed files with 13 additions and 22 deletions

View file

@ -85,6 +85,8 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I
public double prevEnergy;
public boolean initCalc = false;
/** This machine's current RedstoneControl type. */
public RedstoneControl controlType = RedstoneControl.DISABLED;
@ -115,6 +117,17 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I
if(!worldObj.isRemote)
{
if(!initCalc)
{
if(searcher.state == State.FINISHED)
{
reset();
start();
}
initCalc = true;
}
ChargeUtils.discharge(27, this);
if(running && getEnergy() >= getPerTick() && searcher.state == State.FINISHED && oresToMine.size() > 0)
@ -494,16 +507,6 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I
filters.add(MinerFilter.readFromNBT((NBTTagCompound)tagList.tagAt(i)));
}
}
if(nbtTags.hasKey("oresToMine"))
{
NBTTagList tagList = nbtTags.getTagList("oresToMine");
for(int i = 0; i < tagList.tagCount(); i++)
{
oresToMine.add(Object3D.read((NBTTagCompound)tagList.tagAt(i)));
}
}
}
@Override
@ -544,18 +547,6 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I
{
nbtTags.setTag("filters", filterTags);
}
NBTTagList miningOreTags = new NBTTagList();
for(Object3D obj : oresToMine)
{
miningOreTags.appendTag(obj.write(new NBTTagCompound()));
}
if(miningOreTags.tagCount() != 0)
{
nbtTags.setTag("oresToMine", miningOreTags);
}
}
@Override

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB