More compile things

This commit is contained in:
covers1624
2020-06-02 15:12:30 +09:30
parent 404ef5624b
commit 3f5c299d09
111 changed files with 838 additions and 873 deletions
@@ -88,7 +88,7 @@ public abstract class AbstractCellInventory<T extends IAEStack<T>> implements IC
this.container = container;
this.tagCompound = o.getOrCreateTag();
this.storedItems = this.tagCompound.getShort( ITEM_TYPE_TAG );
this.storedItemCount = this.tagCompound.getInteger( ITEM_COUNT_TAG );
this.storedItemCount = this.tagCompound.getInt( ITEM_COUNT_TAG );
this.cellItems = null;
}
@@ -121,8 +121,8 @@ public abstract class AbstractCellInventory<T extends IAEStack<T>> implements IC
final CompoundNBT g = new CompoundNBT();
v.writeToNBT( g );
this.tagCompound.setTag( ITEM_SLOT_KEYS[x], g );
this.tagCompound.setInteger( ITEM_SLOT_COUNT_KEYS[x], (int) v.getStackSize() );
this.tagCompound.put( ITEM_SLOT_KEYS[x], g );
this.tagCompound.putInt( ITEM_SLOT_COUNT_KEYS[x], (int) v.getStackSize() );
x++;
}
@@ -132,28 +132,28 @@ public abstract class AbstractCellInventory<T extends IAEStack<T>> implements IC
this.storedItems = (short) this.cellItems.size();
if( this.cellItems.isEmpty() )
{
this.tagCompound.removeTag( ITEM_TYPE_TAG );
this.tagCompound.remove( ITEM_TYPE_TAG );
}
else
{
this.tagCompound.setShort( ITEM_TYPE_TAG, this.storedItems );
this.tagCompound.putShort( ITEM_TYPE_TAG, this.storedItems );
}
this.storedItemCount = itemCount;
if( itemCount == 0 )
{
this.tagCompound.removeTag( ITEM_COUNT_TAG );
this.tagCompound.remove( ITEM_COUNT_TAG );
}
else
{
this.tagCompound.setInteger( ITEM_COUNT_TAG, itemCount );
this.tagCompound.putInt( ITEM_COUNT_TAG, itemCount );
}
// clean any old crusty stuff...
for( ; x < oldStoredItems && x < this.maxItemTypes; x++ )
{
this.tagCompound.removeTag( ITEM_SLOT_KEYS[x] );
this.tagCompound.removeTag( ITEM_SLOT_COUNT_KEYS[x] );
this.tagCompound.remove( ITEM_SLOT_KEYS[x] );
this.tagCompound.remove( ITEM_SLOT_COUNT_KEYS[x] );
}
this.isPersisted = true;
@@ -195,8 +195,8 @@ public abstract class AbstractCellInventory<T extends IAEStack<T>> implements IC
for( int slot = 0; slot < types; slot++ )
{
CompoundNBT compoundTag = this.tagCompound.getCompoundTag( ITEM_SLOT_KEYS[slot] );
int stackSize = this.tagCompound.getInteger( ITEM_SLOT_COUNT_KEYS[slot] );
CompoundNBT compoundTag = this.tagCompound.getCompound( ITEM_SLOT_KEYS[slot] );
int stackSize = this.tagCompound.getInt( ITEM_SLOT_COUNT_KEYS[slot] );
needsUpdate |= !this.loadCellItem( compoundTag, stackSize );
}
@@ -31,6 +31,7 @@ import appeng.api.storage.IStorageChannel;
import appeng.api.storage.channels.IItemStorageChannel;
import appeng.api.storage.data.IAEItemStack;
import appeng.api.storage.data.IItemList;
import appeng.core.Api;
import appeng.items.contents.CellConfig;
import appeng.util.item.AEItemStack;
@@ -29,9 +29,7 @@ import java.util.concurrent.ConcurrentSkipListMap;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.capability.IFluidHandler;
import net.minecraftforge.fluids.capability.IFluidTankProperties;
import appeng.api.AEApi;
import appeng.api.config.AccessRestriction;
import appeng.api.config.Actionable;
import appeng.api.config.StorageFilter;
@@ -43,6 +41,7 @@ import appeng.api.storage.IStorageChannel;
import appeng.api.storage.channels.IFluidStorageChannel;
import appeng.api.storage.data.IAEFluidStack;
import appeng.api.storage.data.IItemList;
import appeng.core.Api;
public class MEMonitorIFluidHandler implements IMEMonitor<IAEFluidStack>, ITickingMonitor
@@ -75,7 +74,7 @@ public class MEMonitorIFluidHandler implements IMEMonitor<IAEFluidStack>, ITicki
@Override
public IAEFluidStack injectItems( final IAEFluidStack input, final Actionable type, final IActionSource src )
{
final int filled = this.handler.fill( input.getFluidStack(), type == Actionable.MODULATE );
final int filled = this.handler.fill( input.getFluidStack(), type.getFluidAction() );
if( filled == 0 )
{
@@ -100,9 +99,9 @@ public class MEMonitorIFluidHandler implements IMEMonitor<IAEFluidStack>, ITicki
@Override
public IAEFluidStack extractItems( final IAEFluidStack request, final Actionable type, final IActionSource src )
{
final FluidStack removed = this.handler.drain( request.getFluidStack(), type == Actionable.MODULATE );
final FluidStack removed = this.handler.drain( request.getFluidStack(), type.getFluidAction() );
if( removed == null || removed.amount == 0 )
if( removed == null || removed.getAmount() == 0 )
{
return null;
}
@@ -113,7 +112,7 @@ public class MEMonitorIFluidHandler implements IMEMonitor<IAEFluidStack>, ITicki
}
final IAEFluidStack o = request.copy();
o.setStackSize( removed.amount );
o.setStackSize( removed.getAmount() );
return o;
}
@@ -162,8 +161,8 @@ public class MEMonitorIFluidHandler implements IMEMonitor<IAEFluidStack>, ITicki
}
else
{
final int newSize = newIS == null ? 0 : newIS.amount;
final int diff = newSize - ( oldIS == null ? 0 : oldIS.amount );
final int newSize = newIS == null ? 0 : newIS.getAmount();
final int diff = newSize - ( oldIS == null ? 0 : oldIS.getAmount() );
IAEFluidStack stack = null;
@@ -41,6 +41,7 @@ import appeng.api.storage.IStorageChannel;
import appeng.api.storage.channels.IItemStorageChannel;
import appeng.api.storage.data.IAEItemStack;
import appeng.api.storage.data.IItemList;
import appeng.core.Api;
import appeng.util.InventoryAdaptor;
import appeng.util.Platform;
import appeng.util.inv.ItemSlot;
@@ -28,6 +28,7 @@ import appeng.api.storage.IStorageChannel;
import appeng.api.storage.channels.IItemStorageChannel;
import appeng.api.storage.data.IAEStack;
import appeng.api.storage.data.IItemList;
import appeng.core.Api;
public class NullInventory<T extends IAEStack<T>> implements IMEInventoryHandler<T>
@@ -32,6 +32,7 @@ import appeng.api.storage.IStorageChannel;
import appeng.api.storage.channels.IItemStorageChannel;
import appeng.api.storage.data.IAEItemStack;
import appeng.api.storage.data.IItemList;
import appeng.core.Api;
import appeng.me.GridAccessException;
import appeng.tile.misc.TileSecurityStation;