diff options
| author | Draknyte1 <Draknyte1@hotmail.com> | 2016-08-14 19:59:40 +1000 |
|---|---|---|
| committer | Draknyte1 <Draknyte1@hotmail.com> | 2016-08-14 19:59:40 +1000 |
| commit | bf2225eb1b02d0095c9136a4ad37cc267f1ec107 (patch) | |
| tree | a61c421bf57435dc7a7f4b327a94d1e7c8ed6073 /src/Java/miscutil/core | |
| parent | 32680544ce167c84afd22ca018a9bd1845513f92 (diff) | |
| download | GT5-Unofficial-bf2225eb1b02d0095c9136a4ad37cc267f1ec107.tar.gz GT5-Unofficial-bf2225eb1b02d0095c9136a4ad37cc267f1ec107.tar.bz2 GT5-Unofficial-bf2225eb1b02d0095c9136a4ad37cc267f1ec107.zip | |
+ Added the basework for Super Conductivity related machines & cabling.
> Lossless power transfer is always nice, eh?
% Refactored a few tooltips on machines.
% Refactored some classes around.
- Removed some obscure legacy code, which added a Cobblestone fueled boiler (Why?)
Diffstat (limited to 'src/Java/miscutil/core')
33 files changed, 4816 insertions, 395 deletions
diff --git a/src/Java/miscutil/core/block/base/BlockBaseModular.java b/src/Java/miscutil/core/block/base/BlockBaseModular.java index 106eb50954..5e0bc163c2 100644 --- a/src/Java/miscutil/core/block/base/BlockBaseModular.java +++ b/src/Java/miscutil/core/block/base/BlockBaseModular.java @@ -28,13 +28,13 @@ public class BlockBaseModular extends BasicBlock{ this.setBlockName(getLocalizedName()); if (thisBlock == BlockTypes.STANDARD){ - LanguageRegistry.addName(this, "Block of "+unlocalizedName); + LanguageRegistry.addName(this, "Block of "+blockMaterial); } else if (thisBlock == BlockTypes.FRAME){ - LanguageRegistry.addName(this, unlocalizedName+ " Frame Box"); + LanguageRegistry.addName(this, blockMaterial+ " Frame Box"); } else { - LanguageRegistry.addName(this, unlocalizedName); + LanguageRegistry.addName(this, blockMaterial); } //setOreDict(unlocalizedName, blockType); diff --git a/src/Java/miscutil/core/handler/COMPAT_HANDLER.java b/src/Java/miscutil/core/handler/COMPAT_HANDLER.java index 174b9f005e..8c408bdd4f 100644 --- a/src/Java/miscutil/core/handler/COMPAT_HANDLER.java +++ b/src/Java/miscutil/core/handler/COMPAT_HANDLER.java @@ -33,6 +33,7 @@ import miscutil.core.handler.registration.gregtech.GregtechRocketFuelGenerator; import miscutil.core.handler.registration.gregtech.GregtechSafeBlock; import miscutil.core.handler.registration.gregtech.GregtechSolarGenerators; import miscutil.core.handler.registration.gregtech.GregtechSteamCondenser; +import miscutil.core.handler.registration.gregtech.GregtechSuperConductionPoint; import miscutil.core.item.ModItems; import miscutil.core.lib.CORE; import miscutil.core.lib.LoadedMods; @@ -84,6 +85,7 @@ public class COMPAT_HANDLER { GregtechConduits.run(); GregtechSteamCondenser.run(); GregtechSafeBlock.run(); + GregtechSuperConductionPoint.run(); GregtechIronBlastFurnace.run(); GregtechIndustrialCentrifuge.run(); GregtechIndustrialCokeOven.run(); diff --git a/src/Java/miscutil/core/handler/events/PickaxeBlockBreakEventHandler.java b/src/Java/miscutil/core/handler/events/PickaxeBlockBreakEventHandler.java index 9f5cdb943e..c8865ee02e 100644 --- a/src/Java/miscutil/core/handler/events/PickaxeBlockBreakEventHandler.java +++ b/src/Java/miscutil/core/handler/events/PickaxeBlockBreakEventHandler.java @@ -5,7 +5,7 @@ import gregtech.api.metatileentity.BaseMetaPipeEntity; import gregtech.api.metatileentity.BaseMetaTileEntity; import gregtech.api.metatileentity.BaseTileEntity; import miscutil.core.util.Utils; -import miscutil.core.xmod.gregtech.api.metatileentity.implementations.base.GregtechMetaSafeBlockBase; +import miscutil.core.xmod.gregtech.api.metatileentity.implementations.base.machines.GregtechMetaSafeBlockBase; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; diff --git a/src/Java/miscutil/core/handler/registration/gregtech/GregtechCobbleGenerator.java b/src/Java/miscutil/core/handler/registration/gregtech/GregtechCobbleGenerator.java deleted file mode 100644 index eae786f4aa..0000000000 --- a/src/Java/miscutil/core/handler/registration/gregtech/GregtechCobbleGenerator.java +++ /dev/null @@ -1,51 +0,0 @@ -package miscutil.core.handler.registration.gregtech; - -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OreDictNames; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.util.GT_ModHandler; -import miscutil.core.xmod.gregtech.api.enums.GregtechItemList; -import miscutil.core.xmod.gregtech.api.metatileentity.implementations.base.GregtechSteelBoiler; -import cpw.mods.fml.common.FMLLog; - -public class GregtechCobbleGenerator -{ - public static void run() - { - if (miscutil.core.lib.LoadedMods.Gregtech){ - FMLLog.info("Registering Cobblestone Powered Engines."); - run1(); - } - - } - - private static void run1() - { - //Cobble Generators - // ItemList.Machine_Steel_Boiler.set(new GT_MetaTileEntity_Boiler_Steel(101, "boiler.steel", "High Pressure Coal Boiler").getStackForm(1L)); - // GT_ModHandler.addCraftingRecipe(ItemList.Machine_Steel_Boiler.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "PPP", "P P", "BFB", Character.valueOf('F'), OreDictNames.craftingFurnace, Character.valueOf('P'), OrePrefixes.plate.get(Materials.Steel), Character.valueOf('B'), new ItemStack(Blocks.brick_block, 1) }); - - GregtechItemList.Cobble_Generator_ULV.set(new GregtechSteelBoiler(760, "CobGen.01.tier.00", "Ultra Low Voltage Cobblestone Generator", 0, "You're shit.").getStackForm(1L)); - GregtechItemList.Cobble_Generator_LV.set(new GregtechSteelBoiler(761, "CobGen.01.tier.01", "Low Voltage Cobblestone Generator", 1, "Still Pretty garbage, bro.").getStackForm(1L)); - GregtechItemList.Cobble_Generator_MV.set(new GregtechSteelBoiler(762, "CobGen.01.tier.02", "Medium Voltage Cobblestone Generator", 2, "Testy Test.").getStackForm(1L)); - GregtechItemList.Cobble_Generator_HV.set(new GregtechSteelBoiler(763, "CobGen.01.tier.03", "High Voltage Cobblestone Generator", 3, "").getStackForm(1L)); - GregtechItemList.Cobble_Generator_EV.set(new GregtechSteelBoiler(764, "CobGen.01.tier.04", "Extreme Voltage Cobblestone Generator", 4, "").getStackForm(1L)); - GregtechItemList.Cobble_Generator_IV.set(new GregtechSteelBoiler(765, "CobGen.01.tier.05", "Insane Voltage Cobblestone Generator", 5, "").getStackForm(1L)); - GregtechItemList.Cobble_Generator_LuV.set(new GregtechSteelBoiler(766, "CobGen.01.tier.06", "Ludicrous Voltage Cobblestone Generator", 6, "").getStackForm(1L)); - GregtechItemList.Cobble_Generator_ZPM.set(new GregtechSteelBoiler(767, "CobGen.01.tier.07", "ZPM Voltage Cobblestone Generator", 7, "").getStackForm(1L)); - GregtechItemList.Cobble_Generator_UV.set(new GregtechSteelBoiler(768, "CobGen.01.tier.08", "Ultimate Voltage Cobblestone Generator", 8, "").getStackForm(1L)); - GregtechItemList.Cobble_Generator_MAX.set(new GregtechSteelBoiler(769, "CobGen.01.tier.09", "MAX Voltage Cobblestone Generator", 9, "").getStackForm(1L)); - - GT_ModHandler.addCraftingRecipe(GregtechItemList.Cobble_Generator_ULV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "WTW", "WMW", Character.valueOf('M'), ItemList.Hull_ULV, Character.valueOf('W'), OrePrefixes.wireGt04.get(Materials.Lead), Character.valueOf('T'), OreDictNames.craftingChest }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Cobble_Generator_LV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "WTW", "WMW", Character.valueOf('M'), ItemList.Hull_LV, Character.valueOf('W'), OrePrefixes.wireGt04.get(Materials.Tin), Character.valueOf('T'), OreDictNames.craftingChest }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Cobble_Generator_MV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "WTW", "WMW", Character.valueOf('M'), ItemList.Hull_MV, Character.valueOf('W'), OrePrefixes.wireGt04.get(Materials.AnyCopper), Character.valueOf('T'), OreDictNames.craftingChest }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Cobble_Generator_HV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "WTW", "WMW", Character.valueOf('M'), ItemList.Hull_HV, Character.valueOf('W'), OrePrefixes.wireGt04.get(Materials.Gold), Character.valueOf('T'), OreDictNames.craftingChest }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Cobble_Generator_EV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "WTW", "WMW", Character.valueOf('M'), ItemList.Hull_EV, Character.valueOf('W'), OrePrefixes.wireGt04.get(Materials.Aluminium), Character.valueOf('T'), OreDictNames.craftingChest }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Cobble_Generator_IV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "WTW", "WMW", Character.valueOf('M'), ItemList.Hull_IV, Character.valueOf('W'), OrePrefixes.wireGt04.get(Materials.Tungsten), Character.valueOf('T'), OreDictNames.craftingChest }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Cobble_Generator_LuV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "WTW", "WMW", Character.valueOf('M'), ItemList.Hull_LuV, Character.valueOf('W'), OrePrefixes.wireGt04.get(Materials.Osmium), Character.valueOf('T'), OreDictNames.craftingChest }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Cobble_Generator_ZPM.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "WTW", "WMW", Character.valueOf('M'), ItemList.Hull_ZPM, Character.valueOf('W'), OrePrefixes.wireGt04.get(Materials.Osmium), Character.valueOf('T'), OreDictNames.craftingChest }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Cobble_Generator_UV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "WTW", "WMW", Character.valueOf('M'), ItemList.Hull_UV, Character.valueOf('W'), OrePrefixes.wireGt04.get(Materials.Osmium), Character.valueOf('T'), OreDictNames.craftingChest }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Cobble_Generator_MAX.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "WTW", "WMW", Character.valueOf('M'), ItemList.Hull_MAX, Character.valueOf('W'), OrePrefixes.wireGt04.get(Materials.Superconductor), Character.valueOf('T'), OreDictNames.craftingChest }); - } -} diff --git a/src/Java/miscutil/core/handler/registration/gregtech/GregtechConduits.java b/src/Java/miscutil/core/handler/registration/gregtech/GregtechConduits.java index 9c10df196c..7a70e7873b 100644 --- a/src/Java/miscutil/core/handler/registration/gregtech/GregtechConduits.java +++ b/src/Java/miscutil/core/handler/registration/gregtech/GregtechConduits.java @@ -7,7 +7,9 @@ import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_OreDictUnificator; import miscutil.core.lib.LoadedMods; import miscutil.core.util.Utils; +import miscutil.core.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials; import miscutil.core.xmod.gregtech.api.metatileentity.implementations.GregtechMetaPipeEntity_Cable; +import miscutil.core.xmod.gregtech.api.metatileentity.implementations.GregtechMetaPipeEntity_SuperConductor; public class GregtechConduits { /** @@ -37,6 +39,9 @@ public class GregtechConduits { wireFactory("RedstoneAlloy", 32, 30645, 1, 4, 1); } + superConductorFactory("Superconductor", 524288, 30660, 0, 0, 8); + superConductorFactory("VoidMetal", 512, 30661, 0, 0, 8); + } private static void wireFactory(String Material, int Voltage, int ID, long insulatedLoss, long uninsulatedLoss, long Amps){ @@ -100,4 +105,54 @@ public class GregtechConduits { GT_OreDictUnificator.registerOre(OrePrefixes.cableGt12, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 10, "cable." + aMaterial.name().toLowerCase() + ".12", "12x " + aMaterial.mDefaultLocalName + " Cable", 1.0F, aMaterial, aLossInsulated, 12L * aAmperage, aVoltage, true, false).getStackForm(1L)); } } + + private static void superConductorFactory(String Material, int Voltage, int ID, long insulatedLoss, long uninsulatedLoss, long Amps){ + GT_Materials T = GT_Materials.valueOf(Material); + int V = 0; + if (Voltage == 8){ + V = 0; + } + else if (Voltage == 32){ + V = 1; + } + else if (Voltage == 128){ + V = 2; + } + else if (Voltage == 512){ + V = 3; + } + else if (Voltage == 2048){ + V = 4; + } + else if (Voltage == 8196){ + V = 5; + } + else if (Voltage == 32768){ + V = 6; + } + else if (Voltage == 131072){ + V = 7; + } + else if (Voltage == 524288){ + V = 8; + } + else if (Voltage == Integer.MAX_VALUE){ + V = 9; + } + else { + Utils.LOG_ERROR("Failed to set voltage on "+Material+". Invalid voltage of "+Voltage+"V set."); + Utils.LOG_ERROR(Material+" has defaulted to 8v."); + V = 0; + } + //makeWires(T, ID, 2L, 4L, 2L, GT_Values.V[V], true, false); + makeSuperConductors(T, ID, insulatedLoss, uninsulatedLoss, Amps, GT_Values.V[V], true, false); + //makeWires(T, ID, bEC ? 2L : 2L, bEC ? 4L : 4L, 2L, gregtech.api.enums.GT_Values.V[V], true, false); + } + + private static void makeSuperConductors(GT_Materials aMaterial, int aStartID, long aLossInsulated, long aLoss, long aAmperage, long aVoltage, boolean aInsulatable, boolean aAutoInsulated) + { + Utils.LOG_WARNING("Gregtech5u Content | Registered "+aMaterial.name() +" as a new Super Conductor."); + GT_OreDictUnificator.registerOre(OrePrefixes.wireGt16, aMaterial, new GregtechMetaPipeEntity_SuperConductor(aStartID + 5, "wire." + aMaterial.name().toLowerCase() + ".16", "16x " + aMaterial.mDefaultLocalName + " Wire", 1.0F, aMaterial, aLoss, 16L * aAmperage, aVoltage, false, !aAutoInsulated).getStackForm(1L)); + + } } diff --git a/src/Java/miscutil/core/handler/registration/gregtech/GregtechSuperConductionPoint.java b/src/Java/miscutil/core/handler/registration/gregtech/GregtechSuperConductionPoint.java new file mode 100644 index 0000000000..d2434dd46f --- /dev/null +++ b/src/Java/miscutil/core/handler/registration/gregtech/GregtechSuperConductionPoint.java @@ -0,0 +1,27 @@ +package miscutil.core.handler.registration.gregtech; + +import miscutil.core.util.Utils; +import miscutil.core.xmod.gregtech.api.enums.GregtechItemList; +import miscutil.core.xmod.gregtech.common.tileentities.generators.GregtechMetaTileEntitySuperCondensor; + +public class GregtechSuperConductionPoint +{ + + + + public static void run() + { + if (miscutil.core.lib.LoadedMods.Gregtech){ + Utils.LOG_INFO("Gregtech5u Content | Registering Super Conductor Input Node."); + run1(); + } + + } + + private static void run1() + { + //Steam Condensors + GregtechItemList.SuperConductorInputNode.set(new GregtechMetaTileEntitySuperCondensor(801, "superconductor.01.input.single", "Super Condensor", 3).getStackForm(1L)); + + } +} diff --git a/src/Java/miscutil/core/item/general/ItemCloakingDevice.java b/src/Java/miscutil/core/item/general/ItemCloakingDevice.java index 64e45f34b9..b54bb08a87 100644 --- a/src/Java/miscutil/core/item/general/ItemCloakingDevice.java +++ b/src/Java/miscutil/core/item/general/ItemCloakingDevice.java @@ -27,7 +27,7 @@ public class ItemCloakingDevice extends Item implements IElectricItem, IElectric private final String unlocalizedName = "personalCloakingDevice"; private final ItemStack thisStack; - private final static int maxValueEU = 100000000; + private final static int maxValueEU = 8196*20*5*60; protected double chargeEU = 0; public ItemCloakingDevice(){ @@ -131,7 +131,7 @@ public class ItemCloakingDevice extends Item implements IElectricItem, IElectric list.add(""); list.add(EnumChatFormatting.GOLD+"IC2/EU Information"+EnumChatFormatting.GRAY); list.add(EnumChatFormatting.GRAY+"Tier: ["+EnumChatFormatting.YELLOW+getTier(thisStack)+EnumChatFormatting.GRAY+"] Transfer Limit: ["+EnumChatFormatting.YELLOW+getTransferLimit(thisStack)+EnumChatFormatting.GRAY +"Eu/t]"); - list.add(EnumChatFormatting.GRAY+"Current Power: ["+EnumChatFormatting.YELLOW+(long) getCharge(stack)+EnumChatFormatting.GRAY+"Eu]"); + list.add(EnumChatFormatting.GRAY+"Current Power: ["+EnumChatFormatting.YELLOW+(long) getCharge(stack)+EnumChatFormatting.GRAY+"Eu] ["+EnumChatFormatting.YELLOW+MathUtils.findPercentage(getCharge(stack), getMaxCharge(stack))+EnumChatFormatting.GRAY +"%]"); list.add(EnumChatFormatting.GRAY+"Time Remaining: ["+EnumChatFormatting.YELLOW+secondsLeft(stack)+ EnumChatFormatting.GRAY +" seconds]"); super.addInformation(stack, aPlayer, list, bool); } diff --git a/src/Java/miscutil/core/item/general/ItemHealingDevice.java b/src/Java/miscutil/core/item/general/ItemHealingDevice.java index 65c0dc2626..385ab06fdd 100644 --- a/src/Java/miscutil/core/item/general/ItemHealingDevice.java +++ b/src/Java/miscutil/core/item/general/ItemHealingDevice.java @@ -8,6 +8,7 @@ import java.util.List; import miscutil.core.creative.AddToCreativeTab; import miscutil.core.lib.CORE; +import miscutil.core.util.Utils; import miscutil.core.util.item.UtilsItems; import miscutil.core.util.math.MathUtils; import net.minecraft.entity.Entity; @@ -25,7 +26,7 @@ public class ItemHealingDevice extends Item implements IElectricItem, IElectricI private final String unlocalizedName = "personalHealingDevice"; private final ItemStack thisStack; - private final static int maxValueEU = 100000000; + private final static int maxValueEU = 1000000000; protected double chargeEU = 0; public ItemHealingDevice(){ @@ -88,18 +89,18 @@ public class ItemHealingDevice extends Item implements IElectricItem, IElectricI @Override public int getTier(ItemStack itemStack) { - return 4; + return 5; } @Override public double getTransferLimit(ItemStack itemStack) { - return 8196; + return 32784; } @Override public String getItemStackDisplayName(ItemStack p_77653_1_) { - return (EnumChatFormatting.WHITE+"Personal Healing NanoBooster"+EnumChatFormatting.GRAY); + return (EnumChatFormatting.BLUE+"Personal Healing NanoBooster"+EnumChatFormatting.RESET); } @Override @@ -118,8 +119,8 @@ public class ItemHealingDevice extends Item implements IElectricItem, IElectricI public double secondsLeft(ItemStack stack){ double r = 0; - r = getCharge(stack)/(8196*20); - return MathUtils.decimalRounding(r); + r = getCharge(stack)/(1638400/4); + return (int) r; } @Override @@ -130,7 +131,7 @@ public class ItemHealingDevice extends Item implements IElectricItem, IElectricI list.add(""); list.add(EnumChatFormatting.GOLD+"IC2/EU Information"+EnumChatFormatting.GRAY); list.add(EnumChatFormatting.GRAY+"Tier: ["+EnumChatFormatting.YELLOW+getTier(thisStack)+EnumChatFormatting.GRAY+"] Transfer Limit: ["+EnumChatFormatting.YELLOW+getTransferLimit(thisStack)+EnumChatFormatting.GRAY +"Eu/t]"); - list.add(EnumChatFormatting.GRAY+"Current Power: ["+EnumChatFormatting.YELLOW+(long) getCharge(stack)+EnumChatFormatting.GRAY+"Eu]"); + list.add(EnumChatFormatting.GRAY+"Current Power: ["+EnumChatFormatting.YELLOW+(long) getCharge(stack)+EnumChatFormatting.GRAY+"Eu] ["+EnumChatFormatting.YELLOW+MathUtils.findPercentage(getCharge(stack), getMaxCharge(stack))+EnumChatFormatting.GRAY +"%]"); list.add(EnumChatFormatting.GRAY+"Uses Remaining: ["+EnumChatFormatting.YELLOW+secondsLeft(stack)+ EnumChatFormatting.GRAY +"]"); super.addInformation(stack, aPlayer, list, bool); } @@ -211,11 +212,15 @@ public class ItemHealingDevice extends Item implements IElectricItem, IElectricI @Override //TODO public void onWornTick(ItemStack arg0, EntityLivingBase arg1) { if (!arg1.worldObj.isRemote){ - if (getCharge(arg0) >= 1638400){ - if (arg1.getHealth() < arg1.getMaxHealth()-2){ - arg1.heal(2); + if (getCharge(arg0) >= 1638400/4){ + if (arg1.getHealth() < arg1.getMaxHealth()){ + float rx = arg1.getMaxHealth()-arg1.getHealth(); + Utils.LOG_INFO("rx:"+rx); + arg1.heal(rx*2); + discharge(arg0, (1638400/4)*rx, 6, true, true, false); + Utils.messagePlayer((EntityPlayer) arg1, "Your NanoBooster Whirs! Leaving you feeling stronger. It Healed "+rx+" hp."); + Utils.messagePlayer((EntityPlayer) arg1, "You check it's remaining uses, it has "+secondsLeft(arg0)+"."); } - discharge(arg0, 1638400, 6, true, true, false); } } } diff --git a/src/Java/miscutil/core/item/tool/staballoy/StaballoyAxe.java b/src/Java/miscutil/core/item/tool/staballoy/StaballoyAxe.java index 0e66f7aae3..667c57fddc 100644 --- a/src/Java/miscutil/core/item/tool/staballoy/StaballoyAxe.java +++ b/src/Java/miscutil/core/item/tool/staballoy/StaballoyAxe.java @@ -82,7 +82,7 @@ public class StaballoyAxe extends ItemAxe{ private int check(World par1World, int x, int y, int z, int xo, int yo,int zo) { int f=0; - int o=x+z*40+y*400; + int o=x+z*20+y*400; if (tre[o]==needcheck){ tre[o]=ignore; Block bit = par1World.getBlock(x+xo, y+yo, z+zo); @@ -107,18 +107,18 @@ public class StaballoyAxe extends ItemAxe{ boolean f; for (f=true;f==true;){ f=false; - for (int y=-10;y<110;y++) - for(int z=0;z<40;z++) - for(int x=0;x<40;x++){ + for (int y=0;y<80;y++) + for(int z=0;z<20;z++) + for(int x=0;x<20;x++){ int r=check(par1World,x,y,z,xo,yo,zo); if (r==3) return 3; if (r==2) return 2; if (r==1) f=true; } - for (int y=109;y>=-10;y--) - for(int z=39;z>=0;z--) - for(int x=39;x>=0;x--){ + for (int y=79;y>=0;y--) + for(int z=19;z>=0;z--) + for(int x=19;x>=0;x--){ int r=check(par1World,x,y,z,xo,yo,zo); if (r==2) return 3; if (r==2) return 2; @@ -130,11 +130,11 @@ public class StaballoyAxe extends ItemAxe{ private int check2(World par1World, int x, int y, int z, int xo, int yo,int zo) { int f=0; - int o=x+z*40+y*400; + int o=x+z*20+y*400; if (tre[o]==needcheck){ tre[o]=ignore; Block bit = par1World.getBlock(x+xo, y+yo, z+zo); - if (bit instanceof BlockLog || (bit.getUnlocalizedName().toLowerCase().contains("log")) || (bit.getUnlocalizedName().toLowerCase().contains("wood"))){ + if (bit instanceof BlockLog){ f=1; tre[o]=harvest; //if (bit instanceof BlockLog){ @@ -156,18 +156,18 @@ public class StaballoyAxe extends ItemAxe{ boolean f; for (f=true;f==true;){ f=false; - for (int y=-10;y<110;y++) - for(int z=0;z<40;z++) - for(int x=0;x<40;x++){ + for (int y=0;y<80;y++) + for(int z=0;z<20;z++) + for(int x=0;x<20;x++){ int r=check2(par1World,x,y,z,xo,yo,zo); if (r==3) return 3; if (r==2) return 2; if (r==1) f=true; } - for (int y=109;y>=-10;y--) - for(int z=39;z>=0;z--) - for(int x=39;x>=0;x--){ + for (int y=79;y>=0;y--) + for(int z=19;z>=0;z--) + for(int x=19;x>=0;x--){ int r=check2(par1World,x,y,z,xo,yo,zo); if (r==2) return 3; if (r==2) return 2; @@ -178,15 +178,15 @@ public class StaballoyAxe extends ItemAxe{ } public void exploadTree(World par1World,int xo,int yo,int zo, EntityPlayer plr){ - for (int y=-10;y<110;y++) - for(int z=0;z<40;z++) - for(int x=0;x<40;x++){ - int o=x+z*40+y*400; + for (int y=0;y<80;y++) + for(int z=0;z<20;z++) + for(int x=0;x<20;x++){ + int o=x+z*20+y*400; if (tre[o]==harvest){ Block bit = par1World.getBlock(x+xo, y+yo, z+zo); int met = par1World.getBlockMetadata(x+xo, y+yo, z+zo); - if ((bit instanceof BlockLog)||(bit instanceof BlockLeavesBase) || (bit.getUnlocalizedName().toLowerCase().contains("log")) || (bit.getUnlocalizedName().toLowerCase().contains("wood"))){ + if ((bit instanceof BlockLog)||(bit instanceof BlockLeavesBase) || (bit.getUnlocalizedName().toLowerCase().contains("log")) || (bit.getUnlocalizedName().toLowerCase().contains("wood"))){ bit.harvestBlock(par1World, plr, x+xo, y+yo, z+zo,met); par1World.setBlockToAir(x+xo, y+yo, z+zo); } @@ -244,7 +244,7 @@ public class StaballoyAxe extends ItemAxe{ } } - if (bit instanceof BlockLog || (bit.getUnlocalizedName().toLowerCase().contains("log")) || (bit.getUnlocalizedName().toLowerCase().contains("wood"))){ + if (bit instanceof BlockLog || (bit.getUnlocalizedName().toLowerCase().contains("log")) || (bit.getUnlocalizedName().toLowerCase().contains("wood"))){ //LoonTools.log("cutting tree @ "+x+" "+y+" "+z+" "); for (int n=0;n<32000;n++) tre[n]=unchecked; int met = wld.getBlockMetadata(x, y, z); diff --git a/src/Java/miscutil/core/xmod/gregtech/api/enums/GregtechItemList.java b/src/Java/miscutil/core/xmod/gregtech/api/enums/GregtechItemList.java index 2000a1df34..6f8935c51d 100644 --- a/src/Java/miscutil/core/xmod/gregtech/api/enums/GregtechItemList.java +++ b/src/Java/miscutil/core/xmod/gregtech/api/enums/GregtechItemList.java @@ -97,7 +97,9 @@ public enum GregtechItemList implements GregtechItemContainer { Food_Baked_Raisin_Bread, - Industrial_SinterFurnace; + Industrial_SinterFurnace, + + SuperConductorInputNode; public static final GregtechItemList[] DYE_ONLY_ITEMS = { diff --git a/src/Java/miscutil/core/xmod/gregtech/api/enums/GregtechOrePrefixes.java b/src/Java/miscutil/core/xmod/gregtech/api/enums/GregtechOrePrefixes.java index ba6ad6ce41..824f7c99cb 100644 --- a/src/Java/miscutil/core/xmod/gregtech/api/enums/GregtechOrePrefixes.java +++ b/src/Java/miscutil/core/xmod/gregtech/api/enums/GregtechOrePrefixes.java @@ -308,6 +308,7 @@ public enum GregtechOrePrefixes { Neutronic(-1, TextureSet.SET_NONE, 1.0F, 0, 0, 0, 255, 255, 255, 0, "LuV Tier", 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray, Arrays.asList(new TC_AspectStack(TC_Aspects.ELECTRUM, 6), new TC_AspectStack(TC_Aspects.MACHINA, 6))), Quantum(-1, TextureSet.SET_NONE, 1.0F, 0, 0, 0, 255, 255, 255, 0, "ZPM Tier", 0, 0, -1, 0, false, false |
