Some additional fixes from other branch.
This commit is contained in:
@@ -140,7 +140,7 @@ public abstract class AbstractStorageCell<T extends IAEStack<T>> extends AEBaseI
|
||||
@Override
|
||||
public FuzzyMode getFuzzyMode( final ItemStack is )
|
||||
{
|
||||
final String fz = Platform.openNbtData( is ).getString( "FuzzyMode" );
|
||||
final String fz = is.getOrCreateTag().getString( "FuzzyMode" );
|
||||
try
|
||||
{
|
||||
return FuzzyMode.valueOf( fz );
|
||||
@@ -154,7 +154,7 @@ public abstract class AbstractStorageCell<T extends IAEStack<T>> extends AEBaseI
|
||||
@Override
|
||||
public void setFuzzyMode( final ItemStack is, final FuzzyMode fzMode )
|
||||
{
|
||||
Platform.openNbtData( is ).setString( "FuzzyMode", fzMode.name() );
|
||||
is.getOrCreateTag().putString("FuzzyMode", fzMode.name());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -39,7 +39,6 @@ import appeng.core.AppEng;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.items.AEBaseItem;
|
||||
import appeng.spatial.StorageHelper;
|
||||
import appeng.util.Platform;
|
||||
|
||||
|
||||
public class ItemSpatialStorageCell extends AEBaseItem implements ISpatialStorageCell
|
||||
@@ -107,7 +106,7 @@ public class ItemSpatialStorageCell extends AEBaseItem implements ISpatialStorag
|
||||
@Override
|
||||
public WorldCoord getStoredSize( final ItemStack is )
|
||||
{
|
||||
if( is.hasTagCompound() )
|
||||
if( is.hasTag() )
|
||||
{
|
||||
final CompoundNBT c = is.getTagCompound();
|
||||
return new WorldCoord( c.getInteger( NBT_SIZE_X_KEY ), c.getInteger( NBT_SIZE_Y_KEY ), c.getInteger( NBT_SIZE_Z_KEY ) );
|
||||
@@ -118,7 +117,7 @@ public class ItemSpatialStorageCell extends AEBaseItem implements ISpatialStorag
|
||||
@Override
|
||||
public int getStoredDimensionID( final ItemStack is )
|
||||
{
|
||||
if( is.hasTagCompound() )
|
||||
if( is.hasTag() )
|
||||
{
|
||||
final CompoundNBT c = is.getTagCompound();
|
||||
return c.getInteger( NBT_CELL_ID_KEY );
|
||||
@@ -180,7 +179,7 @@ public class ItemSpatialStorageCell extends AEBaseItem implements ISpatialStorag
|
||||
|
||||
private void setStorageCell( final ItemStack is, int id, BlockPos size )
|
||||
{
|
||||
final CompoundNBT c = Platform.openNbtData( is );
|
||||
final CompoundNBT c = is.getOrCreateTag();
|
||||
|
||||
c.setInteger( NBT_CELL_ID_KEY, id );
|
||||
c.setInteger( NBT_SIZE_X_KEY, size.getX() );
|
||||
|
||||
@@ -33,7 +33,6 @@ import appeng.api.storage.data.IItemList;
|
||||
import appeng.items.AEBaseItem;
|
||||
import appeng.items.contents.CellConfig;
|
||||
import appeng.items.contents.CellUpgrades;
|
||||
import appeng.util.Platform;
|
||||
import appeng.util.item.AEItemStack;
|
||||
import appeng.util.prioritylist.FuzzyPriorityList;
|
||||
import appeng.util.prioritylist.IPartitionList;
|
||||
@@ -144,7 +143,7 @@ public class ItemViewCell extends AEBaseItem implements ICellWorkbenchItem
|
||||
@Override
|
||||
public FuzzyMode getFuzzyMode( final ItemStack is )
|
||||
{
|
||||
final String fz = Platform.openNbtData( is ).getString( "FuzzyMode" );
|
||||
final String fz = is.getOrCreateTag().getString( "FuzzyMode" );
|
||||
try
|
||||
{
|
||||
return FuzzyMode.valueOf( fz );
|
||||
@@ -158,6 +157,6 @@ public class ItemViewCell extends AEBaseItem implements ICellWorkbenchItem
|
||||
@Override
|
||||
public void setFuzzyMode( final ItemStack is, final FuzzyMode fzMode )
|
||||
{
|
||||
Platform.openNbtData( is ).setString( "FuzzyMode", fzMode.name() );
|
||||
is.getOrCreateTag().putString("FuzzyMode", fzMode.name());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user