Started redoing config
This commit is contained in:
parent
2eac072a92
commit
ad36dfcddb
7 changed files with 116 additions and 83 deletions
|
@ -28,30 +28,41 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
import reborncore.api.power.EnumPowerTier;
|
||||
import reborncore.api.recipe.IRecipeCrafterProvider;
|
||||
import reborncore.api.tile.IInventoryProvider;
|
||||
import reborncore.common.IWrenchable;
|
||||
import reborncore.common.powerSystem.TilePowerAcceptor;
|
||||
import reborncore.common.recipes.RecipeCrafter;
|
||||
import reborncore.common.registration.RebornRegistry;
|
||||
import reborncore.common.registration.impl.ConfigRegistry;
|
||||
import reborncore.common.util.Inventory;
|
||||
|
||||
import techreborn.api.Reference;
|
||||
import techreborn.client.container.IContainerProvider;
|
||||
import techreborn.client.container.builder.BuiltContainer;
|
||||
import techreborn.client.container.builder.ContainerBuilder;
|
||||
import techreborn.init.ModBlocks;
|
||||
import techreborn.lib.ModInfo;
|
||||
|
||||
@RebornRegistry(modID = ModInfo.MOD_ID)
|
||||
public class TileAssemblingMachine extends TilePowerAcceptor
|
||||
implements IWrenchable, ISidedInventory, IInventoryProvider, IRecipeCrafterProvider, IContainerProvider {
|
||||
implements IWrenchable, ISidedInventory, IInventoryProvider, IRecipeCrafterProvider, IContainerProvider {
|
||||
|
||||
@ConfigRegistry(config = "machines", category = "assembling_machine", key = "AssemblingMachineMaxInput", comment = "Assembling Machine Max Input (Value in EU)")
|
||||
public static int MAX_INPUT = 128;
|
||||
@ConfigRegistry(config = "machines", category = "assembling_machine", key = "AssemblingMachineMaxStorage", comment = "Assembling Machine Max Storage (Value in EU)")
|
||||
public static int MAX_STORAGE = 10000;
|
||||
@ConfigRegistry(config = "machines", category = "assembling_machine", key = "AssemblingMachineTier", comment = "Assembling Machine Tier")
|
||||
public static int TIER = 2;
|
||||
// @ConfigRegistry(config = "machines", category = "assembling_machine", key = "AssemblingMachineWrenchDropRate", comment = "Assembling Machine Wrench Drop Rate")
|
||||
public static float WRENCH_DROP_RATE = 1.0F;
|
||||
|
||||
public int tickTime;
|
||||
public Inventory inventory = new Inventory(8, "TileAssemblingMachine", 64, this);
|
||||
public RecipeCrafter crafter;
|
||||
|
||||
public TileAssemblingMachine() {
|
||||
super(2);
|
||||
super(TIER);
|
||||
// Input slots
|
||||
final int[] inputs = new int[2];
|
||||
inputs[0] = 0;
|
||||
|
@ -84,7 +95,7 @@ implements IWrenchable, ISidedInventory, IInventoryProvider, IRecipeCrafterProvi
|
|||
|
||||
@Override
|
||||
public float getWrenchDropRate() {
|
||||
return 1.0F;
|
||||
return WRENCH_DROP_RATE;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -96,15 +107,15 @@ implements IWrenchable, ISidedInventory, IInventoryProvider, IRecipeCrafterProvi
|
|||
return false;
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public void addWailaInfo(List<String> info)
|
||||
// {
|
||||
// super.addWailaInfo(info);
|
||||
// info.add("Power Stored " + energy.getEnergyStored() +" EU");
|
||||
// if(crafter.currentRecipe !=null){
|
||||
// info.add("Power Usage " + crafter.currentRecipe.euPerTick() + " EU/t");
|
||||
// }
|
||||
// }
|
||||
// @Override
|
||||
// public void addWailaInfo(List<String> info)
|
||||
// {
|
||||
// super.addWailaInfo(info);
|
||||
// info.add("Power Stored " + energy.getEnergyStored() +" EU");
|
||||
// if(crafter.currentRecipe !=null){
|
||||
// info.add("Power Usage " + crafter.currentRecipe.euPerTick() + " EU/t");
|
||||
// }
|
||||
// }
|
||||
|
||||
public int getProgressScaled(final int scale) {
|
||||
if (this.crafter.currentTickTime != 0) {
|
||||
|
@ -115,7 +126,7 @@ implements IWrenchable, ISidedInventory, IInventoryProvider, IRecipeCrafterProvi
|
|||
|
||||
@Override
|
||||
public double getBaseMaxPower() {
|
||||
return 10000;
|
||||
return MAX_STORAGE;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -135,7 +146,7 @@ implements IWrenchable, ISidedInventory, IInventoryProvider, IRecipeCrafterProvi
|
|||
|
||||
@Override
|
||||
public double getBaseMaxInput() {
|
||||
return 128;
|
||||
return MAX_INPUT;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -171,8 +182,8 @@ implements IWrenchable, ISidedInventory, IInventoryProvider, IRecipeCrafterProvi
|
|||
@Override
|
||||
public BuiltContainer createContainer(final EntityPlayer player) {
|
||||
return new ContainerBuilder("assemblingmachine").player(player.inventory).inventory(8, 84).hotbar(8, 142)
|
||||
.addInventory().tile(this).slot(0, 47, 17).slot(1, 65, 17).outputSlot(2, 116, 35).energySlot(3, 56, 53)
|
||||
.upgradeSlot(4, 152, 8).upgradeSlot(5, 152, 26).upgradeSlot(6, 152, 44).upgradeSlot(7, 152, 62)
|
||||
.syncEnergyValue().syncCrafterValue().addInventory().create();
|
||||
.addInventory().tile(this).slot(0, 47, 17).slot(1, 65, 17).outputSlot(2, 116, 35).energySlot(3, 56, 53)
|
||||
.upgradeSlot(4, 152, 8).upgradeSlot(5, 152, 26).upgradeSlot(6, 152, 44).upgradeSlot(7, 152, 62)
|
||||
.syncEnergyValue().syncCrafterValue().addInventory().create();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue