more changes to the inventory stuff

This commit is contained in:
modmuss50 2018-09-13 19:56:32 +01:00
parent 01644e4f65
commit 01a3663b11
27 changed files with 28 additions and 28 deletions

View file

@ -51,7 +51,7 @@ public class TileChargeOMat extends TilePowerAcceptor
@ConfigRegistry(config = "machines", category = "charge_bench", key = "ChargeBenchMaxEnergy", comment = "Charge Bench Max Energy (Value in EU)")
public static int maxEnergy = 100_000_000;
public Inventory<TileChargeOMat> inventory = new Inventory<>(6, "TileChargeOMat", 64, this);
public Inventory<TileChargeOMat> inventory = new Inventory<>(6, "TileChargeOMat", 64, this).withConfiguredAccess();
public TileChargeOMat() {
super();

View file

@ -49,7 +49,7 @@ public class TileChunkLoader extends TilePowerAcceptor implements IToolDrop, Ite
// @ConfigRegistry(config = "machines", category = "chunk_loader", key = "ChunkLoaderWrenchDropRate", comment = "Chunk Loader Wrench Drop Rate")
public static float wrenchDropRate = 1.0F;
public Inventory<TileChunkLoader> inventory = new Inventory<>(1, "TileChunkLoader", 64, this);
public Inventory<TileChunkLoader> inventory = new Inventory<>(1, "TileChunkLoader", 64, this).withConfiguredAccess();
public boolean isRunning;
public int tickTime;

View file

@ -53,7 +53,7 @@ public class TileIndustrialCentrifuge extends TileGenericMachine implements ICon
super("IndustrialCentrifuge", maxInput, maxEnergy, ModBlocks.INDUSTRIAL_CENTRIFUGE, 6);
final int[] inputs = new int[] { 0, 1 };
final int[] outputs = new int[] { 2, 3, 4, 5 };
this.inventory = new Inventory<>(7, "TileIndustrialCentrifuge", 64, this);
this.inventory = new Inventory<>(7, "TileIndustrialCentrifuge", 64, this).withConfiguredAccess();
this.crafter = new RecipeCrafter(Reference.CENTRIFUGE_RECIPE, this, 2, 4, this.inventory, inputs, outputs);
}

View file

@ -55,7 +55,7 @@ public class TileMatterFabricator extends TilePowerAcceptor
@ConfigRegistry(config = "machines", category = "matter_fabricator", key = "MatterFabricatorEnergyPerAmp", comment = "Matter Fabricator EU per amplifier unit, multiply this with the rate for total EU")
public static int energyPerAmp = 5;
public Inventory<TileMatterFabricator> inventory = new Inventory<>(12, "TileMatterFabricator", 64, this);
public Inventory<TileMatterFabricator> inventory = new Inventory<>(12, "TileMatterFabricator", 64, this).withConfiguredAccess();
private int amplifier = 0;
public TileMatterFabricator() {

View file

@ -55,7 +55,7 @@ public class TileQuantumTank extends TileLegacyMachineBase
public static int maxStorage = Integer.MAX_VALUE;
public Tank tank = new Tank("TileQuantumTank", maxStorage, this);
public Inventory<TileQuantumTank> inventory = new Inventory<>(3, "TileQuantumTank", 64, this);
public Inventory<TileQuantumTank> inventory = new Inventory<>(3, "TileQuantumTank", 64, this).withConfiguredAccess();
public void readFromNBTWithoutCoords(final NBTTagCompound tagCompound) {
tank.readFromNBT(tagCompound);

View file

@ -53,7 +53,7 @@ public class TileTechStorageBase extends TileLegacyMachineBase
public TileTechStorageBase(String name, int maxCapacity) {
this.maxCapacity = maxCapacity;
storedItem = ItemStack.EMPTY;
inventory = new Inventory<>(3, name, maxCapacity, this);
inventory = new Inventory<>(3, name, maxCapacity, this).withConfiguredAccess();
}
public void readFromNBTWithoutCoords(NBTTagCompound tagCompound) {

View file

@ -61,7 +61,7 @@ public class TileFusionControlComputer extends TilePowerAcceptor
@ConfigRegistry(config = "machines", category = "fusion_reactor", key = "FusionReactorMaxCoilSize", comment = "Fusion Reactor Max Coil size (Radius)")
public static int maxCoilSize = 50;
public Inventory inventory;
public Inventory<TileFusionControlComputer> inventory;
public int coilCount = 0;
public int crafingTickTime = 0;
@ -78,7 +78,7 @@ public class TileFusionControlComputer extends TilePowerAcceptor
public TileFusionControlComputer() {
super();
checkOverfill = false;
this.inventory = new Inventory<>(3, "TileFusionControlComputer", 64, this);
this.inventory = new Inventory<>(3, "TileFusionControlComputer", 64, this).withConfiguredAccess();
}
/**

View file

@ -62,7 +62,7 @@ public abstract class TileBaseFluidGenerator extends TilePowerAcceptor implement
super();
recipes = GeneratorRecipeHelper.getFluidRecipesForGenerator(type);
tank = new Tank(tileName, tankCapacity, this);
inventory = new Inventory<>(3, tileName, 64, this);
inventory = new Inventory<>(3, tileName, 64, this).withConfiguredAccess();
this.euTick = euTick;
this.ticksSinceLastChange = 0;
}

View file

@ -50,7 +50,7 @@ public class TileDragonEggSyphon extends TilePowerAcceptor
@ConfigRegistry(config = "generators", category = "dragon_egg_siphoner", key = "DragonEggSiphonerEnergyPerTick", comment = "Dragon Egg Siphoner Energy Per Tick (Value in EU)")
public static int energyPerTick = 4;
public Inventory<TileDragonEggSyphon> inventory = new Inventory<>(3, "TileDragonEggSyphon", 64, this);
public Inventory<TileDragonEggSyphon> inventory = new Inventory<>(3, "TileDragonEggSyphon", 64, this).withConfiguredAccess();
private long lastOutput = 0;
public TileDragonEggSyphon() {

View file

@ -54,7 +54,7 @@ public class TileSolidFuelGenerator extends TilePowerAcceptor implements IToolDr
@ConfigRegistry(config = "generators", category = "generator", key = "GeneratorEnergyOutput", comment = "Solid Fuel Generator Energy Output Amount (Value in EU)")
public static int outputAmount = 10;
public Inventory<TileSolidFuelGenerator> inventory = new Inventory<>(2, "TileSolidFuelGenerator", 64, this);
public Inventory<TileSolidFuelGenerator> inventory = new Inventory<>(2, "TileSolidFuelGenerator", 64, this).withConfiguredAccess();
public int fuelSlot = 0;
public int burnTime;
public int totalBurnTime = 0;

View file

@ -53,7 +53,7 @@ public class TileDistillationTower extends TileGenericMachine implements IContai
super("DistillationTower", maxInput, maxEnergy, ModBlocks.DISTILLATION_TOWER, 6);
final int[] inputs = new int[] { 0, 1 };
final int[] outputs = new int[] { 2, 3, 4, 5 };
this.inventory = new Inventory<>(7, "TileDistillationTower", 64, this);
this.inventory = new Inventory<>(7, "TileDistillationTower", 64, this).withConfiguredAccess();
this.crafter = new RecipeCrafter(Reference.DISTILLATION_TOWER_RECIPE, this, 2, 4, this.inventory, inputs, outputs);
}

View file

@ -64,7 +64,7 @@ public class TileIndustrialBlastFurnace extends TileGenericMachine implements IC
super("IndustrialBlastFurnace", maxInput, maxEnergy, ModBlocks.INDUSTRIAL_BLAST_FURNACE, 4);
final int[] inputs = new int[] { 0, 1 };
final int[] outputs = new int[] { 2, 3 };
this.inventory = new Inventory<>(5, "TileIndustrialBlastFurnace", 64, this);
this.inventory = new Inventory<>(5, "TileIndustrialBlastFurnace", 64, this).withConfiguredAccess();
this.crafter = new RecipeCrafter(Reference.BLAST_FURNACE_RECIPE, this, 2, 2, this.inventory, inputs, outputs);
}

View file

@ -51,7 +51,7 @@ public class TileVacuumFreezer extends TileGenericMachine implements IContainerP
super("VacuumFreezer", maxInput, maxEnergy, ModBlocks.VACUUM_FREEZER, 2);
final int[] inputs = new int[] { 0 };
final int[] outputs = new int[] { 1 };
this.inventory = new Inventory<>(3, "TileVacuumFreezer", 64, this);
this.inventory = new Inventory<>(3, "TileVacuumFreezer", 64, this).withConfiguredAccess();
this.crafter = new RecipeCrafter(Reference.VACUUM_FREEZER_RECIPE, this, 2, 1, this.inventory, inputs, outputs);
}

View file

@ -47,7 +47,7 @@ public class TileAdjustableSU extends TileEnergyStorage implements IContainerPro
@ConfigRegistry(config = "machines", category = "aesu", key = "AesuMaxEnergy", comment = "AESU Max Energy (Value in EU)")
public static int maxEnergy = 100_000_000;
public Inventory<TileAdjustableSU> inventory = new Inventory<>(4, "TileAdjustableSU", 64, this);
public Inventory<TileAdjustableSU> inventory = new Inventory<>(4, "TileAdjustableSU", 64, this).withConfiguredAccess();
private int OUTPUT = 64; // The current output
public TileAdjustableSU() {

View file

@ -54,7 +54,7 @@ public class TileEnergyStorage extends TilePowerAcceptor
public TileEnergyStorage(String name, int invSize, Block wrenchDrop, EnumPowerTier tier, int maxInput, int maxOuput, int maxStorage) {
super();
inventory = new Inventory<>(invSize, "Tile" + name, 64, this);
inventory = new Inventory<>(invSize, "Tile" + name, 64, this).withConfiguredAccess();
this.wrenchDrop = wrenchDrop;
this.tier = tier;
this.name = name;

View file

@ -53,7 +53,7 @@ public class TileIronAlloyFurnace extends TileLegacyMachineBase
implements IToolDrop, ItemHandlerProvider, IContainerProvider {
public int tickTime;
public Inventory<TileIronAlloyFurnace> inventory = new Inventory<>(4, "TileIronAlloyFurnace", 64, this);
public Inventory<TileIronAlloyFurnace> inventory = new Inventory<>(4, "TileIronAlloyFurnace", 64, this).withConfiguredAccess();
public int burnTime;
public int currentItemBurnTime;
public int cookTime;

View file

@ -52,7 +52,7 @@ public class TileAlloySmelter extends TileGenericMachine implements IContainerPr
super("AlloySmelter", maxInput, maxEnergy, ModBlocks.ALLOY_SMELTER, 3);
final int[] inputs = new int[] { 0, 1 };
final int[] outputs = new int[] { 2 };
this.inventory = new Inventory<>(4, "TileAlloySmelter", 64, this);
this.inventory = new Inventory<>(4, "TileAlloySmelter", 64, this).withConfiguredAccess();
this.crafter = new RecipeCrafter(Reference.ALLOY_SMELTER_RECIPE, this, 2, 1, this.inventory, inputs, outputs);
}

View file

@ -49,7 +49,7 @@ public class TileAssemblingMachine extends TileGenericMachine implements IContai
super("AssemblingMachine", maxInput, maxEnergy, ModBlocks.ASSEMBLY_MACHINE, 3);
final int[] inputs = new int[] { 0, 1 };
final int[] outputs = new int[] { 2 };
this.inventory = new Inventory<>(4, "TileAssemblingMachine", 64, this);
this.inventory = new Inventory<>(4, "TileAssemblingMachine", 64, this).withConfiguredAccess();
this.crafter = new RecipeCrafter(Reference.ASSEMBLING_MACHINE_RECIPE, this, 2, 2, this.inventory, inputs, outputs);
}

View file

@ -49,7 +49,7 @@ public class TileChemicalReactor extends TileGenericMachine implements IContaine
super("ChemicalReactor", maxInput, maxEnergy, ModBlocks.CHEMICAL_REACTOR, 3);
final int[] inputs = new int[] { 0, 1 };
final int[] outputs = new int[] { 2 };
this.inventory = new Inventory<>(4, "TileChemicalReactor", 64, this);
this.inventory = new Inventory<>(4, "TileChemicalReactor", 64, this).withConfiguredAccess();
this.crafter = new RecipeCrafter(Reference.CHEMICAL_REACTOR_RECIPE, this, 2, 2, this.inventory, inputs, outputs);
}

View file

@ -49,7 +49,7 @@ public class TileCompressor extends TileGenericMachine implements IContainerProv
super("Compressor", maxInput, maxEnergy, ModBlocks.COMPRESSOR, 2);
final int[] inputs = new int[] { 0 };
final int[] outputs = new int[] { 1 };
this.inventory = new Inventory<>(3, "TileCompressor", 64, this);
this.inventory = new Inventory<>(3, "TileCompressor", 64, this).withConfiguredAccess();
this.crafter = new RecipeCrafter(Reference.COMPRESSOR_RECIPE, this, 2, 1, this.inventory, inputs, outputs);
}

View file

@ -51,7 +51,7 @@ public class TileElectricFurnace extends TilePowerAcceptor
@ConfigRegistry(config = "machines", category = "electric_furnace", key = "ElectricFurnaceMaxEnergy", comment = "Electric Furnace Max Energy (Value in EU)")
public static int maxEnergy = 1000;
public Inventory<TileElectricFurnace> inventory = new Inventory<>(3, "TileElectricFurnace", 64, this);
public Inventory<TileElectricFurnace> inventory = new Inventory<>(3, "TileElectricFurnace", 64, this).withConfiguredAccess();
public int progress;
public int fuelScale = 100;
public int cost = 6;

View file

@ -49,7 +49,7 @@ public class TileExtractor extends TileGenericMachine implements IContainerProvi
super("Extractor", maxInput, maxEnergy, ModBlocks.EXTRACTOR, 2);
final int[] inputs = new int[] { 0 };
final int[] outputs = new int[] { 1 };
this.inventory = new Inventory<>(3, "TileExtractor", 64, this);
this.inventory = new Inventory<>(3, "TileExtractor", 64, this).withConfiguredAccess();
this.crafter = new RecipeCrafter(Reference.EXTRACTOR_RECIPE, this, 2, 1, this.inventory, inputs, outputs);
}

View file

@ -49,7 +49,7 @@ public class TileGrinder extends TileGenericMachine implements IContainerProvide
super("Grinder", maxInput, maxEnergy, ModBlocks.GRINDER, 2);
final int[] inputs = new int[] { 0 };
final int[] outputs = new int[] { 1 };
this.inventory = new Inventory<>(3, "TileGrinder", 64, this);
this.inventory = new Inventory<>(3, "TileGrinder", 64, this).withConfiguredAccess();
this.crafter = new RecipeCrafter(Reference.GRINDER_RECIPE, this, 2, 1, this.inventory, inputs, outputs);
}

View file

@ -51,7 +51,7 @@ public class TileIndustrialElectrolyzer extends TileGenericMachine implements IC
super("IndustrialElectrolyzer", maxInput, maxEnergy, ModBlocks.INDUSTRIAL_ELECTROLYZER, 6);
final int[] inputs = new int[] { 0, 1 };
final int[] outputs = new int[] { 2, 3, 4, 5 };
this.inventory = new Inventory<>(7, "TileIndustrialElectrolyzer", 64, this);
this.inventory = new Inventory<>(7, "TileIndustrialElectrolyzer", 64, this).withConfiguredAccess();
this.crafter = new RecipeCrafter(Reference.INDUSTRIAL_ELECTROLYZER_RECIPE, this, 2, 4, this.inventory, inputs, outputs);
}

View file

@ -51,7 +51,7 @@ public class TileRecycler extends TilePowerAcceptor
@ConfigRegistry(config = "machines", category = "recycler", key = "RecyclerMaxEnergy", comment = "Recycler Max Energy (Value in EU)")
public static int maxEnergy = 1000;
private final Inventory inventory = new Inventory<>(3, "TileRecycler", 64, this);
private final Inventory inventory = new Inventory<>(3, "TileRecycler", 64, this).withConfiguredAccess();
private final int cost = 2;
private final int time = 15;
private final int chance = 6;

View file

@ -69,7 +69,7 @@ public class TileRollingMachine extends TilePowerAcceptor
public int[] craftingSlots = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8 };
private InventoryCrafting craftCache;
public Inventory<TileRollingMachine> inventory = new Inventory<>(12, "TileRollingMachine", 64, this);
public Inventory<TileRollingMachine> inventory = new Inventory<>(12, "TileRollingMachine", 64, this).withConfiguredAccess();
public boolean isRunning;
public int tickTime;
@Nonnull

View file

@ -49,7 +49,7 @@ public class TileScrapboxinator extends TileGenericMachine implements IContainer
super("Scrapboxinator", maxInput, maxEnergy, ModBlocks.SCRAPBOXINATOR, 2);
final int[] inputs = new int[] { 0 };
final int[] outputs = new int[] { 1 };
this.inventory = new Inventory<>(3, "TileScrapboxinator", 64, this);
this.inventory = new Inventory<>(3, "TileScrapboxinator", 64, this).withConfiguredAccess();
this.crafter = new ScrapboxRecipeCrafter(this, this.inventory, inputs, outputs);
}