Update to support RC changes

This commit is contained in:
modmuss50 2017-06-12 20:06:15 +01:00
parent f3726fd174
commit 0cf3e43992
No known key found for this signature in database
GPG key ID: 203A5ED4D3E48BEA
28 changed files with 29 additions and 169 deletions

View file

@ -49,8 +49,6 @@ public class ConfigTechReborn {
public static boolean disableRailcraftSteelNuggetRecipe;
// Power
public static int pumpExtractEU;
public static int LVTransformerMaxInput;
public static int LVTransformerMaxOutput;
public static int MVTransformerMaxInput;
@ -76,25 +74,6 @@ public class ConfigTechReborn {
public static int CentrifugeCharge;
public static int ThermalGeneratorCharge;
// Tier
public static int IronDrillTier;
public static int DiamondDrillTier;
public static int AdvancedDrillTier;
public static int IronChainsawTier;
public static int DiamondChainsawTier;
public static int AdvancedChainsawTier;
public static int SteelJackhammerTier;
public static int DiamondJackhammerTier;
public static int AdvancedJackhammerTier;
public static int LapotronPackTier;
public static int LapotronicOrbTier;
public static int LithiumBatpackTier;
public static int OmniToolTier;
public static int RockCutterTier;
public static int CloakingDeviceTier;
public static int CentrifugeTier;
public static int ThermalGeneratorTier;
public static boolean FreqTransmitterChat;
public static boolean FreqTransmitterTooltip;
public static boolean NanosaberChat;
@ -165,10 +144,6 @@ public class ConfigTechReborn {
FortuneSecondaryOreMultiplierPerLevel = config.get(CATEGORY_WORLD, "FortuneSecondaryOreMultiplierPerLevel", 0.5,
"FortuneSecondaryOreMultiplierPerLevel").getDouble();
// Power
pumpExtractEU = config.get(CATEGORY_POWER, "Pump extract eu", 20, "How much eu should the pump use to extract the fluid")
.getInt();
//Transformers
LVTransformerMaxInput = config.get(CATEGORY_POWER, "LV Transformer Max Input", 128, "Set the max input for the LV Trasnformer")
.getInt();
@ -244,57 +219,6 @@ public class ConfigTechReborn {
ThermalGeneratorCharge = config.get(CATEGORY_POWER, "ThermalGenerator MaxCharge", 1000000,
"Set the max charge for the ThermalGenerator").getInt();
// Tier
IronDrillTier = config.get(CATEGORY_POWER, "IronDrill Tier", 2, "Set the Tier of the iron drill").getInt();
DiamondDrillTier = config.get(CATEGORY_POWER, "DiamondDrill Tier", 2, "Set the Tier of the diamond drill")
.getInt();
AdvancedDrillTier = config.get(CATEGORY_POWER, "AdvancedDrill Tier", 2, "Set the Tier of the advanced drill")
.getInt();
IronChainsawTier = config.get(CATEGORY_POWER, "IronChainsaw Tier", 2, "Set the Tier of the iron chainsaw")
.getInt();
DiamondChainsawTier = config
.get(CATEGORY_POWER, "DiamondChainsaw Tier", 2, "Set the Tier of the diamond chainsaw").getInt();
AdvancedChainsawTier = config
.get(CATEGORY_POWER, "AdvancedChainsaw Tier", 2, "Set the Tier of the advanced chainsaw").getInt();
AdvancedJackhammerTier = config.get(CATEGORY_POWER, "AdvancedJackhammer Tier", 2, "Set the Tier of the advanced jackhammer")
.getInt();
DiamondJackhammerTier = config
.get(CATEGORY_POWER, "DiamondJackhammer Tier", 2, "Set the Tier of the diamond jackhammer").getInt();
SteelJackhammerTier = config
.get(CATEGORY_POWER, "SteelJackhammer Tier", 2, "Set the Tier of the steel jackhammer").getInt();
LapotronPackTier = config.get(CATEGORY_POWER, "LapotronPack Tier", 2, "Set the Tier of the LapotronPack")
.getInt();
LapotronicOrbTier = config.get(CATEGORY_POWER, "LapotronicOrb Tier", 2, "Set the Tier of the LapotronicOrb")
.getInt();
LithiumBatpackTier = config.get(CATEGORY_POWER, "LithiumBatpack Tier", 3, "Set the Tier of the LithiumBatpack")
.getInt();
OmniToolTier = config.get(CATEGORY_POWER, "OmniTool Tier", 3, "Set the Tier of the OmniTool").getInt();
RockCutterTier = config.get(CATEGORY_POWER, "RockCutter Tier", 2, "Set the Tier of the RockCutter").getInt();
CloakingDeviceTier = config.get(CATEGORY_POWER, "CloakingDevice Tier", 2, "Set the Tier of the CloakingDevice")
.getInt();
CloakingDeviceEUTick = config.get(CATEGORY_POWER, "CloakingDevice EUTick", 10000, "CloakingDevice EUTick")
.getInt();
CentrifugeTier = config.get(CATEGORY_POWER, "Centrifuge Tier", 1, "Set the Tier of the Centrifuge").getInt();
ThermalGeneratorTier = config
.get(CATEGORY_POWER, "ThermalGenerator Tier", 1, "Set the Tier of the ThermalGenerator").getInt();
//Features
FreqTransmitterChat = config
.get(CATEGORY_FEATURES, "Frequency Transmitter Chat messages", true, "Allow Frequency Transmitter chat messages")

View file

@ -44,7 +44,6 @@ import techreborn.init.ModItems;
public class ItemLapotronPack extends ItemArmor implements IEnergyItemInfo {
public static final int maxCharge = ConfigTechReborn.LapotronPackCharge;
public static final int tier = ConfigTechReborn.LapotronPackTier;
public double transferLimit = 100000;
public ItemLapotronPack() {
@ -80,11 +79,6 @@ public class ItemLapotronPack extends ItemArmor implements IEnergyItemInfo {
return transferLimit;
}
@Override
public int getStackTier(ItemStack stack) {
return tier;
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@SideOnly(Side.CLIENT)
public void getSubItems(Item item,

View file

@ -43,7 +43,6 @@ import techreborn.init.ModItems;
public class ItemLithiumBatpack extends ItemArmor implements IEnergyItemInfo {
public static final int maxCharge = ConfigTechReborn.LithiumBatpackCharge;
public static final int tier = ConfigTechReborn.LithiumBatpackTier;
public double transferLimit = 10000;
public ItemLithiumBatpack() {
@ -97,11 +96,6 @@ public class ItemLithiumBatpack extends ItemArmor implements IEnergyItemInfo {
return transferLimit;
}
@Override
public int getStackTier(ItemStack stack) {
return tier;
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@SideOnly(Side.CLIENT)
@Override

View file

@ -42,9 +42,8 @@ public class ItemBattery extends ItemTRNoDestroy implements IEnergyItemInfo {
String name;
int maxEnergy = 0;
int maxTransfer = 0;
int tier = 0;
public ItemBattery(String name, int maxEnergy, int maxTransfer, int tier) {
public ItemBattery(String name, int maxEnergy, int maxTransfer) {
super();
setMaxStackSize(1);
setMaxDamage(1);
@ -52,7 +51,6 @@ public class ItemBattery extends ItemTRNoDestroy implements IEnergyItemInfo {
this.name = name;
this.maxEnergy = maxEnergy;
this.maxTransfer = maxTransfer;
this.tier = tier;
this.addPropertyOverride(new ResourceLocation("techreborn:empty"), new IItemPropertyGetter() {
@SideOnly(Side.CLIENT)
public float apply(ItemStack stack,
@ -87,9 +85,4 @@ public class ItemBattery extends ItemTRNoDestroy implements IEnergyItemInfo {
public double getMaxTransfer(ItemStack stack) {
return maxTransfer;
}
@Override
public int getStackTier(ItemStack stack) {
return tier;
}
}

View file

@ -35,7 +35,7 @@ import techreborn.init.ModItems;
public class ItemEnergyCrystal extends ItemBattery {
public ItemEnergyCrystal() {
super("energyCrystal", 100000, 512, 1);
super("energyCrystal", 100000, 512);
}
@SuppressWarnings({ "rawtypes", "unchecked" })

View file

@ -35,7 +35,7 @@ import techreborn.init.ModItems;
public class ItemLapotronCrystal extends ItemBattery {
public ItemLapotronCrystal() {
super("lapotronCrystal", 1000000, 512, 2);
super("lapotronCrystal", 1000000, 512);
}
@SuppressWarnings({ "rawtypes", "unchecked" })

View file

@ -36,7 +36,7 @@ import techreborn.init.ModItems;
public class ItemLapotronicOrb extends ItemBattery {
public ItemLapotronicOrb() {
super("lapotronicorb", ConfigTechReborn.LapotronicOrbMaxCharge, 10000, ConfigTechReborn.LapotronicOrbTier);
super("lapotronicorb", ConfigTechReborn.LapotronicOrbMaxCharge, 10000);
}
@SuppressWarnings({ "rawtypes", "unchecked" })

View file

@ -35,7 +35,7 @@ import techreborn.init.ModItems;
public class ItemLithiumBattery extends ItemBattery {
public ItemLithiumBattery() {
super("lithiumBattery", 100000, 512, 1);
super("lithiumBattery", 100000, 512);
}
@SuppressWarnings({ "rawtypes", "unchecked" })

View file

@ -35,7 +35,7 @@ import techreborn.init.ModItems;
public class ItemReBattery extends ItemBattery {
public ItemReBattery() {
super("rebattery", 10000, 64, 1);
super("rebattery", 10000, 64);
}
@SuppressWarnings({ "rawtypes", "unchecked" })

View file

@ -39,7 +39,7 @@ public class ItemAdvancedChainsaw extends ItemChainsaw {
public ItemAdvancedChainsaw() {
super(ToolMaterial.DIAMOND, "techreborn.advancedChainsaw", ConfigTechReborn.AdvancedChainsawCharge,
ConfigTechReborn.AdvancedDrillTier, 4.0F);
4.0F);
this.cost = 250;
}

View file

@ -51,7 +51,7 @@ public class ItemAdvancedDrill extends ItemDrill {
public ItemAdvancedDrill() {
super(ToolMaterial.DIAMOND, "techreborn.advancedDrill", ConfigTechReborn.AdvancedDrillCharge,
ConfigTechReborn.AdvancedDrillTier, 4.0F, 20F);
4.0F, 20F);
this.cost = 250;
}

View file

@ -36,8 +36,7 @@ import techreborn.init.ModItems;
public class ItemAdvancedJackhammer extends ItemJackhammer {
public ItemAdvancedJackhammer() {
super(ToolMaterial.IRON, "techreborn.advancedJackhammer", ConfigTechReborn.AdvancedJackhammerCharge,
ConfigTechReborn.AdvancedJackhammerTier);
super(ToolMaterial.IRON, "techreborn.advancedJackhammer", ConfigTechReborn.AdvancedJackhammerCharge);
this.cost = 250;
this.efficiencyOnProperMaterial = 60F;
}

View file

@ -46,14 +46,13 @@ import java.util.Random;
public class ItemChainsaw extends ItemAxe implements IEnergyItemInfo {
public static int tier = 1;
public int maxCharge = 1;
public int cost = 250;
public float unpoweredSpeed = 2.0F;
public double transferLimit = 100;
public boolean isBreaking = false;
public ItemChainsaw(ToolMaterial material, String unlocalizedName, int energyCapacity, int tier,
public ItemChainsaw(ToolMaterial material, String unlocalizedName, int energyCapacity,
float unpoweredSpeed) {
super(material);
efficiencyOnProperMaterial = 20F;
@ -61,7 +60,6 @@ public class ItemChainsaw extends ItemAxe implements IEnergyItemInfo {
setMaxStackSize(1);
setUnlocalizedName(unlocalizedName);
this.maxCharge = energyCapacity;
this.tier = tier;
this.unpoweredSpeed = unpoweredSpeed;
this.addPropertyOverride(new ResourceLocation("techreborn:animated"), new IItemPropertyGetter() {
@ -125,9 +123,4 @@ public class ItemChainsaw extends ItemAxe implements IEnergyItemInfo {
return transferLimit;
}
@Override
public int getStackTier(ItemStack stack) {
return tier;
}
}

View file

@ -41,7 +41,6 @@ import techreborn.init.ModItems;
import techreborn.items.ItemTRNoDestroy;
public class ItemCloakingDevice extends ItemTRNoDestroy implements IEnergyItemInfo {
public static int Teir = ConfigTechReborn.CloakingDeviceTier;
public static int MaxCharge = ConfigTechReborn.CloakingDeviceCharge;
public static int Limit = 100;
public static boolean isActive;
@ -85,11 +84,6 @@ public class ItemCloakingDevice extends ItemTRNoDestroy implements IEnergyItemIn
return Limit;
}
@Override
public int getStackTier(ItemStack stack) {
return Teir;
}
public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) {
ItemStack itemstack1 = player.getItemStackFromSlot(EntityEquipmentSlot.CHEST);

View file

@ -39,7 +39,7 @@ public class ItemDiamondChainsaw extends ItemChainsaw {
public ItemDiamondChainsaw() {
super(ToolMaterial.DIAMOND, "techreborn.diamondChainsaw", ConfigTechReborn.DiamondChainsawCharge,
ConfigTechReborn.DiamondChainsawTier, 2.5F);
2.5F);
this.cost = 250;
}

View file

@ -39,7 +39,7 @@ public class ItemDiamondDrill extends ItemDrill {
public ItemDiamondDrill() {
super(ToolMaterial.DIAMOND, "techreborn.diamondDrill", ConfigTechReborn.DiamondDrillCharge,
ConfigTechReborn.DiamondDrillTier, 0.5F, 15F);
0.5F, 15F);
this.cost = 250;
}

View file

@ -36,8 +36,7 @@ import techreborn.init.ModItems;
public class ItemDiamondJackhammer extends ItemJackhammer {
public ItemDiamondJackhammer() {
super(ToolMaterial.DIAMOND, "techreborn.diamondJackhammer", ConfigTechReborn.DiamondJackhammerCharge,
ConfigTechReborn.DiamondJackhammerTier);
super(ToolMaterial.DIAMOND, "techreborn.diamondJackhammer", ConfigTechReborn.DiamondJackhammerCharge);
this.cost = 100;
this.efficiencyOnProperMaterial = 16F;
}

View file

@ -41,20 +41,18 @@ import java.util.Random;
public class ItemDrill extends ItemPickaxe implements IEnergyItemInfo {
public static int tier = 1;
public int maxCharge = 1;
public int cost = 250;
public float unpoweredSpeed = 2.0F;
public double transferLimit = 100;
public ItemDrill(ToolMaterial material, String unlocalizedName, int energyCapacity, int tier, float unpoweredSpeed, float efficiencyOnProperMaterial) {
public ItemDrill(ToolMaterial material, String unlocalizedName, int energyCapacity, float unpoweredSpeed, float efficiencyOnProperMaterial) {
super(material);
this.efficiencyOnProperMaterial = efficiencyOnProperMaterial;
setCreativeTab(TechRebornCreativeTab.instance);
setMaxStackSize(1);
setUnlocalizedName(unlocalizedName);
this.maxCharge = energyCapacity;
this.tier = tier;
this.unpoweredSpeed = unpoweredSpeed;
}
@ -112,9 +110,4 @@ public class ItemDrill extends ItemPickaxe implements IEnergyItemInfo {
return transferLimit;
}
@Override
public int getStackTier(ItemStack stack) {
return tier;
}
}

View file

@ -92,11 +92,6 @@ public class ItemElectricTreetap extends ItemTRNoDestroy implements IEnergyItemI
return 200;
}
@Override
public int getStackTier(ItemStack stack) {
return tier;
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@SideOnly(Side.CLIENT)
@Override

View file

@ -47,12 +47,11 @@ import java.util.Random;
public class ItemJackhammer extends ItemPickaxe implements IEnergyItemInfo {
public static int tier = 1;
public int maxCharge = 1;
public int cost = 250;
public double transferLimit = 100;
public ItemJackhammer(ToolMaterial material, String unlocalizedName, int energyCapacity, int tier) {
public ItemJackhammer(ToolMaterial material, String unlocalizedName, int energyCapacity) {
super(material);
efficiencyOnProperMaterial = 20F;
setCreativeTab(TechRebornCreativeTab.instance);
@ -60,7 +59,6 @@ public class ItemJackhammer extends ItemPickaxe implements IEnergyItemInfo {
setMaxDamage(240);
setUnlocalizedName(unlocalizedName);
this.maxCharge = energyCapacity;
this.tier = tier;
}
@Override
@ -118,11 +116,6 @@ public class ItemJackhammer extends ItemPickaxe implements IEnergyItemInfo {
return transferLimit;
}
@Override
public int getStackTier(ItemStack stack) {
return tier;
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@SideOnly(Side.CLIENT)
@Override

View file

@ -217,8 +217,4 @@ public class ItemNanosaber extends ItemSword implements IEnergyItemInfo {
return 512;
}
@Override
public int getStackTier(ItemStack stack) {
return 2;
}
}

View file

@ -50,7 +50,6 @@ import java.util.List;
public class ItemOmniTool extends ItemPickaxe implements IEnergyItemInfo {
public static final int maxCharge = ConfigTechReborn.OmniToolCharge;
public static final int tier = ConfigTechReborn.OmniToolTier;
public int cost = 100;
public int hitCost = 125;
@ -135,11 +134,6 @@ public class ItemOmniTool extends ItemPickaxe implements IEnergyItemInfo {
return 200;
}
@Override
public int getStackTier(ItemStack stack) {
return 2;
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@SideOnly(Side.CLIENT)
@Override

View file

@ -51,7 +51,6 @@ import java.util.Random;
public class ItemRockCutter extends ItemPickaxe implements IEnergyItemInfo {
public static final int maxCharge = ConfigTechReborn.RockCutterCharge;
public static final int tier = ConfigTechReborn.RockCutterTier;
public int cost = 500;
public ItemRockCutter() {
@ -132,10 +131,6 @@ public class ItemRockCutter extends ItemPickaxe implements IEnergyItemInfo {
return 200;
}
@Override
public int getStackTier(ItemStack stack) {
return 2;
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@SideOnly(Side.CLIENT)

View file

@ -39,7 +39,7 @@ public class ItemSteelChainsaw extends ItemChainsaw {
public ItemSteelChainsaw() {
super(ToolMaterial.IRON, "techreborn.ironChainsaw", ConfigTechReborn.IronChainsawCharge,
ConfigTechReborn.IronChainsawTier, 2.0F);
2.0F);
this.cost = 50;
}

View file

@ -39,7 +39,7 @@ public class ItemSteelDrill extends ItemDrill {
public ItemSteelDrill() {
super(ToolMaterial.IRON, "techreborn.ironDrill", ConfigTechReborn.IronDrillCharge,
ConfigTechReborn.IronDrillTier, 0.5F, 10F);
0.5F, 10F);
this.cost = 50;
}

View file

@ -36,8 +36,7 @@ import techreborn.init.ModItems;
public class ItemSteelJackhammer extends ItemJackhammer {
public ItemSteelJackhammer() {
super(ToolMaterial.DIAMOND, "techreborn.steelJackhammer", ConfigTechReborn.SteelJackhammerCharge,
ConfigTechReborn.SteelJackhammerTier);
super(ToolMaterial.DIAMOND, "techreborn.steelJackhammer", ConfigTechReborn.SteelJackhammerCharge);
this.cost = 50;
this.efficiencyOnProperMaterial = 12F;
}

View file

@ -40,16 +40,22 @@ import net.minecraftforge.fluids.IFluidBlock;
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
import reborncore.common.powerSystem.PowerSystem;
import reborncore.common.powerSystem.TilePowerAcceptor;
import reborncore.common.registration.RebornRegistry;
import reborncore.common.registration.impl.ConfigRegistry;
import reborncore.common.util.Tank;
import techreborn.config.ConfigTechReborn;
import techreborn.lib.ModInfo;
import java.util.List;
/**
* Created by modmuss50 on 08/05/2016.
*/
@RebornRegistry(modID = ModInfo.MOD_ID)
public class TilePump extends TilePowerAcceptor {
@ConfigRegistry(config = "machines", category = "pump", key = "PumpEUCost", comment = "Pump cost for one block of fluid (Value in EU)")
public static int pumpExtractEU = 20;
public Tank tank = new Tank("TilePump", 10000, this);
public TilePump() {
@ -59,11 +65,11 @@ public class TilePump extends TilePowerAcceptor {
@Override
public void updateEntity() {
super.updateEntity();
if (!world.isRemote && world.getTotalWorldTime() % 10 == 0 && !tank.isFull() && tank.getCapacity() - tank.getFluidAmount() >= 1000 && canUseEnergy(ConfigTechReborn.pumpExtractEU)) {
if (!world.isRemote && world.getTotalWorldTime() % 10 == 0 && !tank.isFull() && tank.getCapacity() - tank.getFluidAmount() >= 1000 && canUseEnergy(pumpExtractEU)) {
FluidStack fluidStack = drainBlock(world, pos.down(), false);
if (fluidStack != null) {
tank.fill(drainBlock(world, pos.down(), true), true);
useEnergy(ConfigTechReborn.pumpExtractEU);
useEnergy(pumpExtractEU);
}
tank.compareAndUpdate();
}
@ -73,7 +79,7 @@ public class TilePump extends TilePowerAcceptor {
public void addInfo(List<String> info, boolean isRealTile) {
super.addInfo(info, isRealTile);
info.add(TextFormatting.LIGHT_PURPLE + "Eu per extract " + TextFormatting.GREEN
+ PowerSystem.getLocaliszedPower(ConfigTechReborn.pumpExtractEU));
+ PowerSystem.getLocaliszedPower(pumpExtractEU));
info.add(TextFormatting.LIGHT_PURPLE + "Speed: " + TextFormatting.GREEN
+ "1000mb/5 sec");
}

View file

@ -49,7 +49,6 @@ import techreborn.api.recipe.machines.IndustrialGrinderRecipe;
import techreborn.client.container.IContainerProvider;
import techreborn.client.container.builder.BuiltContainer;
import techreborn.client.container.builder.ContainerBuilder;
import techreborn.config.ConfigTechReborn;
import techreborn.init.ModBlocks;
public class TileIndustrialGrinder extends TilePowerAcceptor implements IWrenchable, IInventoryProvider,
@ -62,7 +61,7 @@ public class TileIndustrialGrinder extends TilePowerAcceptor implements IWrencha
public MultiblockChecker multiblockChecker;
public TileIndustrialGrinder() {
super(ConfigTechReborn.CentrifugeTier);
super();
// TODO configs
final int[] inputs = new int[2];