Some additional fixes from other branch.
This commit is contained in:
@@ -352,9 +352,9 @@ public class GridNode implements IGridNode, IPathItem
|
||||
{
|
||||
final CompoundNBT node = new CompoundNBT();
|
||||
|
||||
node.setInteger( "p", this.playerID );
|
||||
node.setLong( "k", this.getLastSecurityKey() );
|
||||
node.setLong( "g", this.myStorage.getID() );
|
||||
node.putInt( "p", this.playerID );
|
||||
node.putLong( "k", this.getLastSecurityKey() );
|
||||
node.putLong( "g", this.myStorage.getID() );
|
||||
|
||||
nodeData.setTag( name, node );
|
||||
}
|
||||
|
||||
+2
-2
@@ -581,7 +581,7 @@ public class EnergyGridCache implements IEnergyGrid
|
||||
{
|
||||
final double newBuffer = this.localStorage.getAECurrentPower() / 2;
|
||||
this.localStorage.removeCurrentAEPower( newBuffer );
|
||||
storageB.dataObject().setDouble( "buffer", newBuffer );
|
||||
storageB.dataObject().putDouble("buffer", newBuffer);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -593,7 +593,7 @@ public class EnergyGridCache implements IEnergyGrid
|
||||
@Override
|
||||
public void populateGridStorage( final IGridStorage storage )
|
||||
{
|
||||
storage.dataObject().setDouble( "buffer", this.localStorage.getAECurrentPower() );
|
||||
storage.dataObject().putDouble("buffer", this.localStorage.getAECurrentPower());
|
||||
}
|
||||
|
||||
public boolean registerEnergyInterest( final EnergyThreshold threshold )
|
||||
|
||||
@@ -1011,11 +1011,11 @@ public final class CraftingCPUCluster implements IAECluster, ICraftingCPU
|
||||
{
|
||||
final CompoundNBT tag = new CompoundNBT();
|
||||
|
||||
tag.setString( "CraftID", craftingID );
|
||||
tag.setBoolean( "canceled", false );
|
||||
tag.setBoolean( "done", false );
|
||||
tag.setBoolean( "standalone", standalone );
|
||||
tag.setBoolean( "req", req );
|
||||
tag.putString("CraftID", craftingID);
|
||||
tag.putBoolean("canceled", false);
|
||||
tag.putBoolean("done", false);
|
||||
tag.putBoolean("standalone", standalone);
|
||||
tag.putBoolean("req", req);
|
||||
|
||||
return tag;
|
||||
}
|
||||
@@ -1146,8 +1146,8 @@ public final class CraftingCPUCluster implements IAECluster, ICraftingCPU
|
||||
{
|
||||
data.setTag( "finalOutput", this.writeItem( this.finalOutput ) );
|
||||
data.setTag( "inventory", this.writeList( this.inventory.getItemList() ) );
|
||||
data.setBoolean( "waiting", this.waiting );
|
||||
data.setBoolean( "isComplete", this.isComplete );
|
||||
data.putBoolean("waiting", this.waiting);
|
||||
data.putBoolean("isComplete", this.isComplete);
|
||||
|
||||
if( this.myLastLink != null )
|
||||
{
|
||||
@@ -1160,16 +1160,16 @@ public final class CraftingCPUCluster implements IAECluster, ICraftingCPU
|
||||
for( final Entry<ICraftingPatternDetails, TaskProgress> e : this.tasks.entrySet() )
|
||||
{
|
||||
final CompoundNBT item = this.writeItem( AEItemStack.fromItemStack( e.getKey().getPattern() ) );
|
||||
item.setLong( "craftingProgress", e.getValue().value );
|
||||
item.putLong( "craftingProgress", e.getValue().value );
|
||||
list.appendTag( item );
|
||||
}
|
||||
data.setTag( "tasks", list );
|
||||
|
||||
data.setTag( "waitingFor", this.writeList( this.waitingFor ) );
|
||||
|
||||
data.setLong( "elapsedTime", this.getElapsedTime() );
|
||||
data.setLong( "startItemCount", this.getStartItemCount() );
|
||||
data.setLong( "remainingItemCount", this.getRemainingItemCount() );
|
||||
data.putLong( "elapsedTime", this.getElapsedTime() );
|
||||
data.putLong( "startItemCount", this.getStartItemCount() );
|
||||
data.putLong( "remainingItemCount", this.getRemainingItemCount() );
|
||||
}
|
||||
|
||||
private CompoundNBT writeItem( final IAEItemStack finalOutput2 )
|
||||
@@ -1178,7 +1178,7 @@ public final class CraftingCPUCluster implements IAECluster, ICraftingCPU
|
||||
|
||||
if( finalOutput2 != null )
|
||||
{
|
||||
finalOutput2.writeToNBT( out );
|
||||
finalOutput2.write(out);
|
||||
}
|
||||
|
||||
return out;
|
||||
@@ -1223,7 +1223,7 @@ public final class CraftingCPUCluster implements IAECluster, ICraftingCPU
|
||||
this.waiting = data.getBoolean( "waiting" );
|
||||
this.isComplete = data.getBoolean( "isComplete" );
|
||||
|
||||
if( data.hasKey( "link" ) )
|
||||
if( data.contains("link") )
|
||||
{
|
||||
final CompoundNBT link = data.getCompoundTag( "link" );
|
||||
this.myLastLink = new CraftingLink( link, this );
|
||||
|
||||
@@ -29,7 +29,6 @@ import appeng.api.storage.ICellInventory;
|
||||
import appeng.api.storage.ISaveProvider;
|
||||
import appeng.api.storage.data.IAEStack;
|
||||
import appeng.api.storage.data.IItemList;
|
||||
import appeng.util.Platform;
|
||||
|
||||
|
||||
/**
|
||||
@@ -87,7 +86,7 @@ public abstract class AbstractCellInventory<T extends IAEStack<T>> implements IC
|
||||
}
|
||||
|
||||
this.container = container;
|
||||
this.tagCompound = Platform.openNbtData( o );
|
||||
this.tagCompound = o.getOrCreateTag();
|
||||
this.storedItems = this.tagCompound.getShort( ITEM_TYPE_TAG );
|
||||
this.storedItemCount = this.tagCompound.getInteger( ITEM_COUNT_TAG );
|
||||
this.cellItems = null;
|
||||
|
||||
@@ -33,7 +33,6 @@ import appeng.api.storage.IMEInventory;
|
||||
import appeng.api.storage.IStorageChannel;
|
||||
import appeng.api.storage.data.IAEStack;
|
||||
import appeng.api.storage.data.IItemList;
|
||||
import appeng.util.Platform;
|
||||
import appeng.util.prioritylist.FuzzyPriorityList;
|
||||
import appeng.util.prioritylist.PrecisePriorityList;
|
||||
|
||||
@@ -145,6 +144,6 @@ public class BasicCellInventoryHandler<T extends IAEStack<T>> extends MEInventor
|
||||
|
||||
CompoundNBT openNbtData()
|
||||
{
|
||||
return Platform.openNbtData( this.getCellInv().getItemStack() );
|
||||
}
|
||||
return this.getCellInv().getItemStack().getOrCreateTag();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user