Controller is enabled without channels and item type limit removed

This commit is contained in:
tilera 2018-02-03 21:24:01 +01:00
parent df76710f57
commit 05fa7abdb8
5 changed files with 11 additions and 9 deletions

View File

@ -40,7 +40,7 @@ public class BlockController extends AEBaseTileBlock
super( Material.iron );
this.setTileEntity( TileController.class );
this.setHardness( 6 );
this.setFeature( EnumSet.of( AEFeature.Channels ) );
this.setFeature( EnumSet.of( AEFeature.Core ) );
}
@Override

View File

@ -19,6 +19,7 @@
package appeng.items.contents;
import appeng.me.storage.CellInventory;
import appeng.tile.inventory.AppEngInternalInventory;
import appeng.util.Platform;
import net.minecraft.item.ItemStack;
@ -31,7 +32,7 @@ public class CellConfig extends AppEngInternalInventory
public CellConfig( final ItemStack is )
{
super( null, 63 );
super( null, CellInventory.cellItemType );
this.is = is;
this.readFromNBT( Platform.openNbtData( is ), "list" );
}

View File

@ -49,6 +49,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.event.ForgeEventFactory;
import appeng.me.storage.CellInventory;
import java.util.EnumSet;
import java.util.List;
@ -149,7 +150,7 @@ public final class ItemBasicStorageCell extends AEBaseItem implements IStorageCe
@Override
public int getTotalTypes( final ItemStack cellItem )
{
return 63;
return CellInventory.cellItemType;
}
@Override

View File

@ -43,7 +43,7 @@ import java.util.Set;
public class CellInventory implements ICellInventory
{
public static final int cellItemType = 2097151;
private static final String ITEM_TYPE_TAG = "it";
private static final String ITEM_COUNT_TAG = "ic";
private static final String ITEM_SLOT = "#";
@ -53,7 +53,7 @@ public class CellInventory implements ICellInventory
private static String[] itemSlotCount;
private final NBTTagCompound tagCompound;
private final ISaveProvider container;
private int maxItemTypes = 63;
private int maxItemTypes = cellItemType;
private short storedItems = 0;
private int storedItemCount = 0;
private IItemList<IAEItemStack> cellItems;
@ -100,9 +100,9 @@ public class CellInventory implements ICellInventory
throw new AppEngException( "ItemStack was used as a cell, but was not a cell!" );
}
if( this.maxItemTypes > 63 )
if( this.maxItemTypes > cellItemType )
{
this.maxItemTypes = 63;
this.maxItemTypes = cellItemType;
}
if( this.maxItemTypes < 1 )
{
@ -544,7 +544,7 @@ public class CellInventory implements ICellInventory
{
final long bytesForItemCount = ( this.getStoredItemCount() + this.getUnusedItemCount() ) / 8;
return this.getStoredItemTypes() * this.getBytesPerType() + bytesForItemCount;
return bytesForItemCount;
}
@Override

View File

@ -1,7 +1,7 @@
[
{
"modid":"appliedenergistics2",
"name":"Applied Energistics 2",
"name":"Applied Energistics 2 tilera Edition",
"description":"A Mod about Matter, Energy and using them to conquer the world..",
"version":"rv3-beta-16",
"mcversion":"1.7.10",