diff --git a/README.md b/README.md index 6fc1497..a2aa085 100644 --- a/README.md +++ b/README.md @@ -28,11 +28,13 @@ Programmable Hatches Mod 其中你需要注意的是: -本Mod目前单文件适配GTNH整合包 2.6.0 2.6.1版本,2.7.0版本请下载带有gtnh270后缀的版本,不支持GTNH整合包 2.5.0 及以下的版本。 +本Mod目前正在维护的版本支持GTNH整合包 2.7.0版本,不支持GTNH整合包 2.5.0 及以下的版本。 若最新版Mod不能在支持的整合包版本运行,请提issue。 -同时,本Mod对2.5.1的支持已经终止,v0.0.18p28是最后一个明确支持2.5.1的版本,尽管在此之后的版本可能可以在2.5.1正常运行,但原则上不再处理仅在2.5.1出现的不兼容问题。 +同时,本Mod对2.6.0与2.6.1的支持已经终止,最后一个明确支持2.6.0与2.6.1的版本是v0.0.20,之后的版本不可能在2.7.0以下的版本运行。 + +本Mod对2.5.1的支持已经终止,v0.0.18p28是最后一个明确支持2.5.1的版本,尽管在此之后的版本可能可以在2.5.1正常运行,但原则上不再处理仅在2.5.1出现的不兼容问题。 ### 关于MOD语言 diff --git a/dependencies.gradle b/dependencies.gradle index 28ba924..4675759 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -34,57 +34,124 @@ * For more details, see https://docs.gradle.org/8.0.1/userguide/java_library_plugin.html#sec:java_library_configurations_graph */ dependencies { - -api("com.github.GTNewHorizons:NotEnoughEnergistics:1.5.1:dev") - api("com.github.GTNewHorizons:StructureLib:1.3.1:dev") + api('com.github.GTNewHorizons:GT5-Unofficial:5.09.51.06:dev') + + api("com.github.GTNewHorizons:StructureLib:1.4.0:dev") api("net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev") - api("com.github.GTNewHorizons:NotEnoughItems:2.5.27-GTNH:dev") - api("com.github.GTNewHorizons:GTNHLib:0.2.11:dev") - api("com.github.GTNewHorizons:ModularUI:1.1.42:dev") - api("com.github.GTNewHorizons:ModularUI2:2.1.2-1.7.10:dev") - api("com.github.GTNewHorizons:waila:1.7.3:dev") - api("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-356-GTNH:dev") - api("com.github.GTNewHorizons:AE2FluidCraft-Rework:1.2.29-gtnh:dev") - - - api("com.github.GTNewHorizons:Avaritia:1.49:dev") - api("com.github.GTNewHorizons:Avaritiaddons:1.7.1-GTNH:dev") - api('com.github.GTNewHorizons:Angelica:1.0.0-alpha42:api') { transitive = false } - api("com.github.GTNewHorizons:AppleCore:3.3.0:dev") { transitive = false } + api("com.github.GTNewHorizons:NotEnoughItems:2.6.51-GTNH:dev") + api("com.github.GTNewHorizons:NotEnoughIds:2.1.6:dev") + api("com.github.GTNewHorizons:GTNHLib:0.5.22:dev") + api("com.github.GTNewHorizons:ModularUI:1.2.17:dev") + api("com.github.GTNewHorizons:ModularUI2:2.1.16-1.7.10:dev") +// api("com.github.GTNewHorizons:ModularUI2:99.99.99:dev") + api("com.github.GTNewHorizons:waila:1.8.2:dev") + api("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-501-GTNH:dev") + api("com.github.GTNewHorizons:AE2FluidCraft-Rework:1.3.51-gtnh:dev") + api('com.github.GTNewHorizons:Yamcl:0.6.0:dev') + api("com.github.GTNewHorizons:Postea:1.0.13:dev") + + compileOnlyApi('com.github.GTNewHorizons:ThaumicTinkerer:2.10.2:dev') + compileOnlyApi("com.github.GTNewHorizons:Mobs-Info:0.4.7-GTNH:dev") + compileOnlyApi("com.github.GTNewHorizons:Navigator:1.0.15:dev") + api('com.github.GTNewHorizons:Baubles:1.0.4:dev') {transitive=false} + // Required to prevent an older bauble api from Extra Utilities from loading first in the javac classpath + compileOnly('com.github.GTNewHorizons:Baubles:1.0.4:dev') {transitive=false} + + devOnlyNonPublishable("com.github.GTNewHorizons:Infernal-Mobs:1.10.0-GTNH:dev") + + api("com.github.GTNewHorizons:Avaritia:1.56:dev") + + api('com.github.GTNewHorizons:Angelica:1.0.0-beta26:api') { transitive = false } + api("com.github.GTNewHorizons:AppleCore:3.3.4:dev") { transitive = false } api("com.github.GTNewHorizons:BuildCraft:7.1.39:dev") { transitive = false } - api("com.github.GTNewHorizons:EnderIO:2.7.4:dev") { transitive = false } - - api("com.github.GTNewHorizons:ForestryMC:4.8.9:dev") { transitive = false } - api("com.github.GTNewHorizons:Railcraft:9.15.8:dev") { transitive = false } + api("com.github.GTNewHorizons:EnderIO:2.8.22:dev") { transitive = false } + api("com.github.GTNewHorizons:ForestryMC:4.9.19:dev") { transitive = false } + api("com.github.GTNewHorizons:ProjectRed:4.10.5-GTNH:dev") { transitive = false } + api("com.github.GTNewHorizons:Railcraft:9.15.15:dev") { transitive = false } + //compileOnly("TGregworks:TGregworks:1.7.10-GTNH-1.0.26:deobf") {transitive = false} + compileOnly("com.github.GTNewHorizons:ThaumicBases:1.7.7:dev") { transitive = false } api("com.github.GTNewHorizons:EnderCore:0.4.6:dev") { transitive = false } - api("com.github.GTNewHorizons:Galacticraft:3.1.5-GTNH:dev") { transitive = false } - api("com.github.GTNewHorizons:TinkersConstruct:1.11.15-GTNH:dev") { transitive = true } - api("com.github.GTNewHorizons:Chisel:2.14.1-GTNH:dev") { transitive = false } + compileOnly('com.github.GTNewHorizons:VisualProspecting:1.3.28:dev') { transitive = false } + api("com.github.GTNewHorizons:Galaxy-Space-GTNH:1.1.100-GTNH:dev") { transitive = false } + + api("com.github.GTNewHorizons:Galacticraft:3.2.8-GTNH:dev") { transitive = false } + api("com.github.GTNewHorizons:TinkersConstruct:1.12.16-GTNH:dev") + + api("com.github.GTNewHorizons:Chisel:2.15.3-GTNH:dev") { transitive = false } api("com.github.GTNewHorizons:Translocators:1.2.1:dev") { transitive = false } - api("curse.maven:cofh-core-69162:2388751") { transitive = false } - api("com.github.GTNewHorizons:Nuclear-Control:2.6.2:dev") { transitive = false } - api("thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev") { transitive = false } - api('com.github.GTNewHorizons:Botania:1.10.12-GTNH:dev') { transitive = false } - api('com.github.GTNewHorizons:HoloInventory:2.4.7-GTNH:dev') { transitive = false } - api('com.github.GTNewHorizons:BlockRenderer6343:1.1.6:dev') - api("com.google.auto.value:auto-value-annotations:1.10.1") { transitive = false } + api rfg.deobf("curse.maven:cofh-core-69162:2388751") + api("com.github.GTNewHorizons:Nuclear-Control:2.6.7:dev") { transitive = false } + api("thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev") { transitive = false } + implementation("com.github.GTNewHorizons:Hodgepodge:2.6.0:dev") + api('com.github.GTNewHorizons:Botania:1.12.1-GTNH:dev') { transitive = false } + api('com.github.GTNewHorizons:HoloInventory:2.4.13-GTNH:dev') { transitive = false } + api rfg.deobf("curse.maven:extra-utilities-225561:2264384") + compileOnly rfg.deobf('curse.maven:minefactory-reloaded-66672:2366150') + api("com.github.GTNewHorizons:OpenComputers:1.10.27-GTNH:dev") {transitive = false} + // https://www.curseforge.com/minecraft/mc-mods/advancedsolarpanels + api rfg.deobf('curse.maven:advsolar-362768:2885953') + api('com.github.GTNewHorizons:ThaumicEnergistics:1.6.27-GTNH:dev') {transitive = false} + api("com.github.GTNewHorizons:BloodMagic:1.6.9:dev") { transitive = false } + api("com.github.GTNewHorizons:CraftTweaker:3.4.0:dev") { transitive = false } + compileOnly("com.github.GTNewHorizons:BetterLoadingScreen:1.7.0-GTNH:dev") { transitive = false } + compileOnly rfg.deobf("curse.maven:biomes-o-plenty-220318:2499612") + + compileOnly('com.github.GTNewHorizons:SC2:2.2.0:dev') {transitive=false} + compileOnly('com.github.GTNewHorizons:Binnie:2.4.4:dev') {transitive = false} + api('curse.maven:PlayerAPI-228969:2248928') {transitive=false} + api('com.github.GTNewHorizons:BlockRenderer6343:1.2.16:dev'){transitive=false} + + compileOnly("com.google.auto.value:auto-value-annotations:1.10.1") { transitive = false } annotationProcessor("com.google.auto.value:auto-value:1.10.1") - api('com.github.GTNewHorizons:GTplusplus:1.11.58:dev') - - api("com.github.GTNewHorizons:OpenComputers:1.9.14-GTNH:dev") - api('com.github.GTNewHorizons:GT5-Unofficial:5.09.45.163:dev') - api("com.github.GTNewHorizons:ForgeMultipart:1.4.8:dev") { transitive = false } - api("com.github.GTNewHorizons:ae2stuff:0.8.2-GTNH:dev") - api("com.github.GTNewHorizons:CraftTweaker:3.3.1:dev") { transitive = false } - api('com.github.GTNewHorizons:GigaGramFab:0.3.19:dev') + + // For testing forestry integration (iApiary, combs, tree growth simulator) + // runtimeOnlyNonPublishable("com.github.GTNewHorizons:ForestryMC:4.9.19:dev") + // runtimeOnlyNonPublishable('com.github.GTNewHorizons:neiaddons:1.16.0:dev') + // runtimeOnlyNonPublishable('com.github.GTNewHorizons:MagicBees:2.8.5-GTNH:dev') + // runtimeOnlyNonPublishable('com.github.GTNewHorizons:Binnie:2.4.4:dev') + + // testImplementation(platform('org.junit:junit-bom:5.9.2')) + // testImplementation('org.junit.jupiter:junit-jupiter') + // testImplementation("org.mockito:mockito-core:3.+") + + // functionalTestImplementation(platform('org.junit:junit-bom:5.9.2')) + //functionalTestImplementation('org.junit.jupiter:junit-jupiter') + // functionalTestImplementation('org.junit.platform:junit-platform-engine') + // functionalTestImplementation('org.junit.platform:junit-platform-launcher') + // functionalTestImplementation('org.junit.platform:junit-platform-reporting') + + runtimeOnlyNonPublishable("com.github.GTNewHorizons:DuraDisplay:1.3.4:dev") + api('com.github.GTNewHorizons:EnderIO:2.8.22:dev') + + // For testing + //runtimeOnlyNonPublishable('com.github.GTNewHorizons:TCNEIAdditions:1.4.2:dev') + + // Speeds up mod identification and loading in dev + // runtimeOnlyNonPublishable(rfg.deobf("CoreTweaks:CoreTweaks:0.3.3.2")) + + + api("com.github.GTNewHorizons:NotEnoughEnergistics:1.6.4:dev") + api("com.github.GTNewHorizons:OpenComputers:1.11.0-GTNH:dev") + + api("com.github.GTNewHorizons:ForgeMultipart:1.5.0:dev") { transitive = false } + api("com.github.GTNewHorizons:ae2stuff:0.8.5-GTNH:dev") + api("com.github.GTNewHorizons:CraftTweaker:3.4.0:dev") { transitive = false } + - api("com.github.GTNewHorizons:ProjectRed:4.9.3-GTNH:dev") - api("com.github.GTNewHorizons:MrTJPCore:1.1.6:dev") + api("com.github.GTNewHorizons:ProjectRed:4.10.5-GTNH:dev") + api("com.github.GTNewHorizons:MrTJPCore:1.2.1:dev") - api('com.github.GTNewHorizons:Navigator:1.0.12:dev') + api('com.github.GTNewHorizons:Navigator:1.0.15:dev') runtimeOnlyNonPublishable(rfg.deobf('maven.modrinth:journeymap:5.2.6')) - api("com.github.GTNewHorizons:Baubles:1.0.4:dev") - api("com.github.GTNewHorizons:ironchest:6.0.85:dev") + + api("com.github.GTNewHorizons:ironchest:6.0.87:dev") + + + + //////// + + + } diff --git a/src/main/java/reobf/proghatches/ae/BlockStorageProxy.java b/src/main/java/reobf/proghatches/ae/BlockStorageProxy.java index 07a97b9..5278514 100644 --- a/src/main/java/reobf/proghatches/ae/BlockStorageProxy.java +++ b/src/main/java/reobf/proghatches/ae/BlockStorageProxy.java @@ -10,7 +10,7 @@ import appeng.items.tools.quartz.ToolQuartzCuttingKnife; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import gregtech.common.blocks.GT_Material_Machines; +import gregtech.common.blocks.MaterialMachines; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; @@ -35,7 +35,7 @@ public class BlockStorageProxy extends BlockContainer implements INameAndToolti private IIcon blockIconAlt2; public BlockStorageProxy() { - super(new GT_Material_Machines()); + super(new MaterialMachines()); setHardness(1); setHarvestLevel("pickaxe", 1); diff --git a/src/main/java/reobf/proghatches/ae/ItemPartMAP2P.java b/src/main/java/reobf/proghatches/ae/ItemPartMAP2P.java index 0ee72ac..9a7661a 100644 --- a/src/main/java/reobf/proghatches/ae/ItemPartMAP2P.java +++ b/src/main/java/reobf/proghatches/ae/ItemPartMAP2P.java @@ -9,7 +9,7 @@ import appeng.api.parts.IPartItem; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.enums.GT_Values; +import gregtech.api.enums.GTValues; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; @@ -40,10 +40,10 @@ public IPart createPartFromItemStack(ItemStack is) { public String getItemStackDisplayName(ItemStack stack) { /*int damage=stack.getItemDamage(); if(damage>=1&&damage<=15){ - return StatCollector.translateToLocalFormatted("item.proghatches.part.eu.source.superconduct.name",GT_Values.VN[damage-1]); + return StatCollector.translateToLocalFormatted("item.proghatches.part.eu.source.superconduct.name",GTValues.VN[damage-1]); } if(damage>=16&&damage<=30){ - return StatCollector.translateToLocalFormatted("item.proghatches.part.eu.source.normal.name",GT_Values.VN[damage-16]); + return StatCollector.translateToLocalFormatted("item.proghatches.part.eu.source.normal.name",GTValues.VN[damage-16]); } */ return super.getItemStackDisplayName(stack); } diff --git a/src/main/java/reobf/proghatches/ae/PartAmountMaintainer.java b/src/main/java/reobf/proghatches/ae/PartAmountMaintainer.java index 49cec75..f34e261 100644 --- a/src/main/java/reobf/proghatches/ae/PartAmountMaintainer.java +++ b/src/main/java/reobf/proghatches/ae/PartAmountMaintainer.java @@ -89,9 +89,9 @@ import appeng.util.prioitylist.PrecisePriorityList; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.gui.modularui.GT_UITextures; -import gregtech.api.util.GT_Util; -import gregtech.api.util.GT_Utility; +import gregtech.api.gui.modularui.GTUITextures; +import gregtech.api.util.GTUtil; +import gregtech.api.util.GTUtility; import mrtjp.projectred.core.ItemPart; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.entity.player.EntityPlayer; @@ -101,11 +101,13 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.StatCollector; import net.minecraft.util.Vec3; +import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; import reobf.proghatches.eucrafting.EUUtil; import reobf.proghatches.eucrafting.IGuiProvidingPart; import reobf.proghatches.gt.metatileentity.util.polyfill.NumericWidget; +import reobf.proghatches.util.ProghatchesUtil; public class PartAmountMaintainer extends PartBasicState implements IGuiProvidingPart,IGridTickable,IPowerChannelState, ICraftingRequester{ @@ -581,7 +583,7 @@ protected void phantomClick(ClickData clickData, ItemStack cursorStack) { .setTextColor(Color.WHITE.normal) .setSize(60, 18) .setPos(60+18, 3) - .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD) + .setBackground(GTUITextures.BACKGROUND_TEXT_FIELD) .addTooltips(Arrays.asList( StatCollector.translateToLocal("proghatches.amountmaintainer.amount.0"), StatCollector.translateToLocal("proghatches.amountmaintainer.amount.1"), @@ -594,15 +596,15 @@ protected void phantomClick(ClickData clickData, ItemStack cursorStack) { builder.widget(new CycleButtonWidget().setGetter(()->mode) .setSetter(s->mode=s).setLength(2) .setTextureGetter(s->{ - if(s==0)return GT_UITextures.OVERLAY_BUTTON_VOID_EXCESS_ITEM; - if(s==1)return GT_UITextures.OVERLAY_BUTTON_VOID_EXCESS_FLUID; - return GT_UITextures.OVERLAY_BUTTON_VOID_EXCESS_ALL; + if(s==0)return GTUITextures.OVERLAY_BUTTON_VOID_EXCESS_ITEM; + if(s==1)return GTUITextures.OVERLAY_BUTTON_VOID_EXCESS_FLUID; + return GTUITextures.OVERLAY_BUTTON_VOID_EXCESS_ALL; }) .addTooltip(0, StatCollector.translateToLocal("proghatches.amountmaintainer.phantomclick.mode.0")) .addTooltip(1, StatCollector.translateToLocal("proghatches.amountmaintainer.phantomclick.mode.1")) .setBackground(() -> { { - return new IDrawable[] { GT_UITextures.BUTTON_STANDARD, + return new IDrawable[] { GTUITextures.BUTTON_STANDARD, }; } }) @@ -615,7 +617,7 @@ protected void phantomClick(ClickData clickData, ItemStack cursorStack) { .setSetter(s->redstone=s).setLength(4) .setTextureGetter(s->{ - return GT_UITextures.OVERLAY_BUTTON_REDSTONE_ON; + return GTUITextures.OVERLAY_BUTTON_REDSTONE_ON; }) .addTooltip(0, StatCollector.translateToLocal("proghatches.amountmaintainer.redstone.mode.0")) .addTooltip(1, StatCollector.translateToLocal("proghatches.amountmaintainer.redstone.mode.1")) @@ -624,7 +626,7 @@ protected void phantomClick(ClickData clickData, ItemStack cursorStack) { .setBackground(() -> { { - return new IDrawable[] { GT_UITextures.BUTTON_STANDARD, + return new IDrawable[] { GTUITextures.BUTTON_STANDARD, }; } }) @@ -633,11 +635,11 @@ protected void phantomClick(ClickData clickData, ItemStack cursorStack) { .setPos(3+4, 3+18)); - builder.widget(new DrawableWidget().setDrawable(GT_UITextures.OVERLAY_BUTTON_REDSTONE_ON).setPos(3+4+20, 3+18).setSize(18,18).setEnabled(s->{return on;}) + builder.widget(new DrawableWidget().setDrawable(GTUITextures.OVERLAY_BUTTON_REDSTONE_ON).setPos(3+4+20, 3+18).setSize(18,18).setEnabled(s->{return on;}) .addTooltip(StatCollector.translateToLocalFormatted("proghatches.amountmaintainer.redstone.state.on",amount)) ) ; - builder.widget(new DrawableWidget().setDrawable(GT_UITextures.OVERLAY_BUTTON_REDSTONE_OFF).setPos(3+4+20, 3+18).setSize(18,18).setEnabled(s->!on) + builder.widget(new DrawableWidget().setDrawable(GTUITextures.OVERLAY_BUTTON_REDSTONE_OFF).setPos(3+4+20, 3+18).setSize(18,18).setEnabled(s->!on) .addTooltip(StatCollector.translateToLocalFormatted("proghatches.amountmaintainer.redstone.state.off")) ) ; @@ -668,10 +670,10 @@ public int getSlotLimit(int slot) { .setTextureGetter(s->{ if(s==0)return new ItemDrawable(new ItemStack(Items.redstone)); if(s==1)return new ItemDrawable(new ItemStack(Items.gunpowder)); - if(s==2)return GT_UITextures.OVERLAY_BUTTON_REDSTONE_ON; - if(s==3)return GT_UITextures.OVERLAY_BUTTON_REDSTONE_OFF; - if(s==4)return GT_UITextures.OVERLAY_BUTTON_ARROW_GREEN_UP; - return GT_UITextures.OVERLAY_BUTTON_ARROW_GREEN_DOWN; + if(s==2)return GTUITextures.OVERLAY_BUTTON_REDSTONE_ON; + if(s==3)return GTUITextures.OVERLAY_BUTTON_REDSTONE_OFF; + if(s==4)return GTUITextures.OVERLAY_BUTTON_ARROW_GREEN_UP; + return GTUITextures.OVERLAY_BUTTON_ARROW_GREEN_DOWN; }) .addTooltip(0, StatCollector.translateToLocal("proghatches.amountmaintainer.rscard.mode.0")) .addTooltip(1, StatCollector.translateToLocal("proghatches.amountmaintainer.rscard.mode.1")) @@ -684,7 +686,7 @@ public int getSlotLimit(int slot) { .setBackground(() -> { { - return new IDrawable[] { GT_UITextures.BUTTON_STANDARD, + return new IDrawable[] { GTUITextures.BUTTON_STANDARD, }; } }) @@ -761,6 +763,18 @@ public void readFromNBT(NBTTagCompound data) { amount=data.getLong("amount"); lastredstone=data.getBoolean("lastredstone" ); mark[0]=ItemStack.loadItemStackFromNBT(data.getCompoundTag("mark")); + + exit:{ + FluidStack fs = GTUtility.getFluidFromDisplayStack(mark[0]); + if(fs==null){break exit;} + String name= data.getString("fluid_ID_string"); + if(name.isEmpty()){break exit;} + Fluid f=FluidRegistry.getFluid(name); + if(f==null){break exit;} + if(f==fs.getFluid()){break exit;} + fs=new FluidStack(f, fs.amount); + } + upgrade[0]=ItemStack.loadItemStackFromNBT(data.getCompoundTag("upgrade")); upgrade[1]=ItemStack.loadItemStackFromNBT(data.getCompoundTag("upgrade1")); super.readFromNBT(data); @@ -780,7 +794,14 @@ public void writeToNBT(NBTTagCompound data) { data.setInteger("redstone", redstone); data.setLong("amount", amount); data.setBoolean("lastredstone", lastredstone); - if(mark[0]!=null)data.setTag("mark", mark[0].writeToNBT(new NBTTagCompound())); + if(mark[0]!=null){ + + data.setTag("mark", mark[0].writeToNBT(new NBTTagCompound())); + FluidStack fs = GTUtility.getFluidFromDisplayStack(mark[0]); + if(fs!=null){String name=FluidRegistry.getFluidName(fs); + data.setString("fluid_ID_string", name);} + + } if(upgrade[0]!=null)data.setTag("upgrade", upgrade[0].writeToNBT(new NBTTagCompound())); if(upgrade[1]!=null)data.setTag("upgrade1", upgrade[1].writeToNBT(new NBTTagCompound())); super.writeToNBT(data); @@ -827,10 +848,12 @@ public IAEStack maybe(StorageChannel c){ if(c==StorageChannel.ITEMS)return maybeItem(); return maybeFluid(); } + + public AEItemStack maybeItem(){ if(mark[0]==null)return null; - FluidStack fs = GT_Utility.getFluidFromDisplayStack(mark[0]); + FluidStack fs = GTUtility.getFluidFromDisplayStack(mark[0]); if(fs==null){ AEItemStack is=AEItemStack.create(mark[0]); is.setStackSize(requestedAmount()); @@ -852,7 +875,7 @@ public boolean isOn(){ public AEFluidStack maybeFluid(){ if(mark[0]==null)return null; - FluidStack fs = GT_Utility.getFluidFromDisplayStack(mark[0]); + FluidStack fs = GTUtility.getFluidFromDisplayStack(mark[0]); if(fs!=null){ AEFluidStack is=AEFluidStack.create(fs); is.setStackSize(requestedAmount()); @@ -862,9 +885,9 @@ public AEFluidStack maybeFluid(){ } private ItemStack tryConvertToFluid(ItemStack is){ - FluidStack fs = GT_Utility.getFluidForFilledItem(is, true); + FluidStack fs = GTUtility.getFluidForFilledItem(is, true); if(fs!=null){ - return GT_Utility.getFluidDisplayStack(fs, false); + return GTUtility.getFluidDisplayStack(fs, false); } return null; diff --git a/src/main/java/reobf/proghatches/ae/PartStockingExportBus.java b/src/main/java/reobf/proghatches/ae/PartStockingExportBus.java index 33aeb9f..3bbdf40 100644 --- a/src/main/java/reobf/proghatches/ae/PartStockingExportBus.java +++ b/src/main/java/reobf/proghatches/ae/PartStockingExportBus.java @@ -45,7 +45,7 @@ import appeng.util.prioitylist.OreFilteredList; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.gui.modularui.GTUITextures; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.InventoryCrafting; diff --git a/src/main/java/reobf/proghatches/ae/PartStockingFluidExportBus.java b/src/main/java/reobf/proghatches/ae/PartStockingFluidExportBus.java index 6c339e0..86a8749 100644 --- a/src/main/java/reobf/proghatches/ae/PartStockingFluidExportBus.java +++ b/src/main/java/reobf/proghatches/ae/PartStockingFluidExportBus.java @@ -44,7 +44,7 @@ import appeng.util.prioitylist.OreFilteredList; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.gui.modularui.GTUITextures; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; diff --git a/src/main/java/reobf/proghatches/ae/TileCyclicPatternSubmitter.java b/src/main/java/reobf/proghatches/ae/TileCyclicPatternSubmitter.java index 8e97bb7..81cb191 100644 --- a/src/main/java/reobf/proghatches/ae/TileCyclicPatternSubmitter.java +++ b/src/main/java/reobf/proghatches/ae/TileCyclicPatternSubmitter.java @@ -57,7 +57,7 @@ import appeng.me.cluster.implementations.CraftingCPUCluster; import appeng.me.helpers.AENetworkProxy; import appeng.me.helpers.IGridProxyable; -import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.gui.modularui.GTUITextures; import gregtech.api.gui.modularui.GUITextureSet; import mcp.mobius.waila.api.IWailaConfigHandler; import mcp.mobius.waila.api.IWailaDataAccessor; @@ -546,7 +546,7 @@ public ModularWindow createWindow() { /* * final CoverInfo coverInfo = uiBuildContext.getTile() * .getCoverInfoAtSide(uiBuildContext.getCoverSide()); final - * GT_CoverBehaviorBase behavior = coverInfo.getCoverBehavior(); + * CoverBehaviorBase behavior = coverInfo.getCoverBehavior(); * if (coverInfo.getMinimumTickRate() > 0 && * behavior.allowsTickRateAddition()) { builder.widget( new * GT_CoverTickRateButton(coverInfo, builder).setPos(getGUIWidth() - @@ -578,10 +578,10 @@ public boolean isItemValid(int slot, ItemStack stack) { builder.widget(new FakeSyncWidget.IntegerSyncer(() -> index, s ->{ index = s;updateComparator();})); builder.widget(new FakeSyncWidget.BooleanSyncer(() -> on, s -> on = s)); //builder.widget(new FakeSyncWidget.IntegerSyncer(() -> tankselected, s -> tankselected = s)); - final IDrawable[] background = new IDrawable[] { GUITextureSet.DEFAULT.getItemSlot(), GT_UITextures.OVERLAY_SLOT_PATTERN_ME}; - final IDrawable[] special = new IDrawable[] { GUITextureSet.DEFAULT.getItemSlot(), GT_UITextures.OVERLAY_SLOT_PATTERN_ME, + final IDrawable[] background = new IDrawable[] { GUITextureSet.DEFAULT.getItemSlot(), GTUITextures.OVERLAY_SLOT_PATTERN_ME}; + final IDrawable[] special = new IDrawable[] { GUITextureSet.DEFAULT.getItemSlot(), GTUITextures.OVERLAY_SLOT_PATTERN_ME, new ItemDrawable(new ItemStack(MyMod.progcircuit)) - //GT_UITextures.OVERLAY_BUTTON_CROSS + //GTUITextures.OVERLAY_BUTTON_CROSS }; @@ -639,15 +639,15 @@ public IDrawable[] getBackground() { builder.widget(new CycleButtonWidget().setToggle(()->abortingMode, s->abortingMode=s) .setTextureGetter(s->{ - if(s==0)return GT_UITextures.OVERLAY_BUTTON_CROSS; + if(s==0)return GTUITextures.OVERLAY_BUTTON_CROSS; - return GT_UITextures.OVERLAY_BUTTON_CHECKMARK; + return GTUITextures.OVERLAY_BUTTON_CHECKMARK; }) .addTooltip(0, StatCollector.translateToLocal("proghatches.submitter.mode.0")) .addTooltip(1, StatCollector.translateToLocal("proghatches.submitter.mode.1")) .setBackground(() -> { { - return new IDrawable[] { GT_UITextures.BUTTON_STANDARD, + return new IDrawable[] { GTUITextures.BUTTON_STANDARD, }; } }) @@ -678,11 +678,11 @@ public IDrawable[] getBackground() { ) .setBackground(() -> { if (on) { - return new IDrawable[] { GT_UITextures.BUTTON_STANDARD_PRESSED, - GT_UITextures.OVERLAY_BUTTON_POWER_SWITCH_ON }; + return new IDrawable[] { GTUITextures.BUTTON_STANDARD_PRESSED, + GTUITextures.OVERLAY_BUTTON_POWER_SWITCH_ON }; } else { - return new IDrawable[] { GT_UITextures.BUTTON_STANDARD, - GT_UITextures.OVERLAY_BUTTON_POWER_SWITCH_OFF }; + return new IDrawable[] { GTUITextures.BUTTON_STANDARD, + GTUITextures.OVERLAY_BUTTON_POWER_SWITCH_OFF }; } }) @@ -712,10 +712,10 @@ public int getSlotLimit(int slot) { .setTextureGetter(s->{ if(s==0)return new ItemDrawable(new ItemStack(Items.redstone)); if(s==1)return new ItemDrawable(new ItemStack(Items.gunpowder)); - if(s==2)return GT_UITextures.OVERLAY_BUTTON_REDSTONE_ON; - if(s==3)return GT_UITextures.OVERLAY_BUTTON_REDSTONE_OFF; - if(s==4)return GT_UITextures.OVERLAY_BUTTON_ARROW_GREEN_UP; - return GT_UITextures.OVERLAY_BUTTON_ARROW_GREEN_DOWN; + if(s==2)return GTUITextures.OVERLAY_BUTTON_REDSTONE_ON; + if(s==3)return GTUITextures.OVERLAY_BUTTON_REDSTONE_OFF; + if(s==4)return GTUITextures.OVERLAY_BUTTON_ARROW_GREEN_UP; + return GTUITextures.OVERLAY_BUTTON_ARROW_GREEN_DOWN; }) .addTooltip(0, StatCollector.translateToLocal("proghatches.amountmaintainer.rscard.mode.0")) .addTooltip(1, StatCollector.translateToLocal("proghatches.amountmaintainer.rscard.mode.1")) @@ -728,7 +728,7 @@ public int getSlotLimit(int slot) { .setBackground(() -> { { - return new IDrawable[] { GT_UITextures.BUTTON_STANDARD, + return new IDrawable[] { GTUITextures.BUTTON_STANDARD, }; } }) @@ -740,7 +740,7 @@ public int getSlotLimit(int slot) { final IDrawable[] background0 = new IDrawable[] { GUITextureSet.DEFAULT.getFluidSlot() }; final IDrawable[] special0 = new IDrawable[] { GUITextureSet.DEFAULT.getFluidSlot(), - GT_UITextures.OVERLAY_SLOT_ARROW_ME }; + GTUITextures.OVERLAY_SLOT_ARROW_ME }; @@ -748,15 +748,15 @@ public int getSlotLimit(int slot) { */ builder.widget(new CycleButtonWidget().setToggle(()->asManyAsPossible, s->asManyAsPossible=s) .setTextureGetter(s->{ - if(s==0)return GT_UITextures.OVERLAY_BUTTON_CROSS; + if(s==0)return GTUITextures.OVERLAY_BUTTON_CROSS; - return GT_UITextures.OVERLAY_BUTTON_CHECKMARK; + return GTUITextures.OVERLAY_BUTTON_CHECKMARK; }) .addTooltip(0, StatCollector.translateToLocal("proghatches.submitter.number.mode.0")) .addTooltip(1, StatCollector.translateToLocal("proghatches.submitter.number.mode.1")) .setBackground(() -> { { - return new IDrawable[] { GT_UITextures.BUTTON_STANDARD, + return new IDrawable[] { GTUITextures.BUTTON_STANDARD, }; } }) @@ -765,15 +765,15 @@ public int getSlotLimit(int slot) { .setPos(120+20, 3+20+20)); builder.widget(new CycleButtonWidget().setToggle(()->skipIfFail, s->skipIfFail=s) .setTextureGetter(s->{ - if(s==0)return GT_UITextures.OVERLAY_BUTTON_CROSS; + if(s==0)return GTUITextures.OVERLAY_BUTTON_CROSS; - return GT_UITextures.OVERLAY_BUTTON_CHECKMARK; + return GTUITextures.OVERLAY_BUTTON_CHECKMARK; }) .addTooltip(0, StatCollector.translateToLocal("proghatches.submitter.skip.mode.0")) .addTooltip(1, StatCollector.translateToLocal("proghatches.submitter.skip.mode.1")) .setBackground(() -> { { - return new IDrawable[] { GT_UITextures.BUTTON_STANDARD, + return new IDrawable[] { GTUITextures.BUTTON_STANDARD, }; } }) @@ -790,13 +790,13 @@ public UIBuildContext getUIBuildContext() { * public boolean isCoverValid() { return !getUIBuildContext().getTile() * .isDead() && getUIBuildContext().getTile() * .getCoverBehaviorAtSideNew(getUIBuildContext().getCoverSide()) != - * GregTech_API.sNoBehavior; } + * GregTechAPI.sNoBehavior; } */ protected void addTitleToUI(ModularWindow.Builder builder) { /* * ItemStack coverItem = - * GT_Utility.intToStack(getUIBuildContext().getCoverID()); if + * GTUtility.intToStack(getUIBuildContext().getCoverID()); if * (coverItem != null) { builder.widget( new * ItemDrawable(coverItem).asWidget() .setPos(5, 5) .setSize(16, * 16)) .widget( new diff --git a/src/main/java/reobf/proghatches/ae/TileStorageProxy.java b/src/main/java/reobf/proghatches/ae/TileStorageProxy.java index df129ee..71e282f 100644 --- a/src/main/java/reobf/proghatches/ae/TileStorageProxy.java +++ b/src/main/java/reobf/proghatches/ae/TileStorageProxy.java @@ -54,9 +54,9 @@ import appeng.me.storage.MEMonitorPassThrough; import appeng.me.storage.NullInventory; import appeng.util.prioitylist.OreFilteredList; -import gregtech.api.gui.modularui.GT_UITextures; -import gregtech.api.util.GT_Utility; -import gregtech.api.util.GT_Utility.ItemId; +import gregtech.api.gui.modularui.GTUITextures; +import gregtech.api.util.GTUtility; +import gregtech.api.util.GTUtility.ItemId; import li.cil.oc.api.network.SidedEnvironment; import net.minecraft.init.Items; import net.minecraft.inventory.IInventory; @@ -929,17 +929,17 @@ public ModularWindow createWindow(UIBuildContext buildContext) { .setSetter(s->{this.fuzzmode=s;gridChanged();}) .setGetter(()->this.fuzzmode) .setTextureGetter(s->{ - if(s==0)return GT_UITextures.OVERLAY_BUTTON_CROSS; + if(s==0)return GTUITextures.OVERLAY_BUTTON_CROSS; - return GT_UITextures.OVERLAY_BUTTON_CHECKMARK; + return GTUITextures.OVERLAY_BUTTON_CHECKMARK; }) .addTooltip(0, StatCollector.translateToLocal("proghatch.proxy.disable")) .addTooltip(1, StatCollector.translateToLocal("proghatch.proxy.Strict")) .addTooltip(4, StatCollector.translateToLocal("proghatch.proxy.ignoreNBT")) .addTooltip(3, StatCollector.translateToLocal("proghatch.proxy.oredict")) .addTooltip(2, StatCollector.translateToLocal("proghatch.proxy.passthrough")) - .setBackground(GT_UITextures.BUTTON_STANDARD) + .setBackground(GTUITextures.BUTTON_STANDARD) .setTooltipShowUpDelay(TOOLTIP_DELAY) .setPos(3,3+18*4) .setSize(18, 18) @@ -955,7 +955,7 @@ public ModularWindow createWindow(UIBuildContext buildContext) { .setFocusOnGuiOpen(true).setTextColor(Color.WHITE.dark(1)) - .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD.withOffset(-1, -1, 2, 2)) + .setBackground(GTUITextures.BACKGROUND_TEXT_FIELD.withOffset(-1, -1, 2, 2)) .setPos(3+20,3+18*4+1).setSize(16*8,16)); diff --git a/src/main/java/reobf/proghatches/ae/render/TESRMAInterface.java b/src/main/java/reobf/proghatches/ae/render/TESRMAInterface.java index 24b494a..d86b442 100644 --- a/src/main/java/reobf/proghatches/ae/render/TESRMAInterface.java +++ b/src/main/java/reobf/proghatches/ae/render/TESRMAInterface.java @@ -102,15 +102,14 @@ public void renderTileEntityAt( tessellator.draw(); - - - GL11.glDisable(GL11.GL_TEXTURE_2D); - - if(ifc.yfx>0.01){ - ifc.yfx=ifc.yfx*0.99f; - + GL11.glPushAttrib(GL11.GL_LIGHTING_BIT); + GL11.glDisable(GL11.GL_TEXTURE_2D); + GL11.glDisable(GL11.GL_LIGHTING); + + if(ifc.yfx>0.01){ + ifc.yfx=ifc.yfx*0.99f; GL11.glDisable(GL11.GL_CULL_FACE); - GL11.glBegin(GL11.GL_QUADS); + GL11.glBegin(GL11.GL_QUADS); GL11.glColor3d(b1/2,b2/2, b3/2); @@ -163,8 +162,8 @@ public void renderTileEntityAt( - - + GL11.glPopAttrib(); + //GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_TEXTURE_2D); diff --git a/src/main/java/reobf/proghatches/block/BlockIOHub.java b/src/main/java/reobf/proghatches/block/BlockIOHub.java index 943b174..55b1ba7 100644 --- a/src/main/java/reobf/proghatches/block/BlockIOHub.java +++ b/src/main/java/reobf/proghatches/block/BlockIOHub.java @@ -9,7 +9,7 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.multitileentity.multiblock.base.MultiBlockPart; -import gregtech.common.blocks.GT_Material_Machines; +import gregtech.common.blocks.MaterialMachines; import net.minecraft.block.BlockContainer; import net.minecraft.client.renderer.texture.IIconRegister; @@ -24,7 +24,7 @@ public class BlockIOHub extends BlockContainer { private IIcon inv_me_slave; public BlockIOHub() { - super(new GT_Material_Machines()); + super(new MaterialMachines()); setHardness(1); setHarvestLevel("pickaxe", 1); diff --git a/src/main/java/reobf/proghatches/block/TileIOHub.java b/src/main/java/reobf/proghatches/block/TileIOHub.java index a1f4ff4..f90daf8 100644 --- a/src/main/java/reobf/proghatches/block/TileIOHub.java +++ b/src/main/java/reobf/proghatches/block/TileIOHub.java @@ -86,7 +86,7 @@ import appeng.me.GridAccessException; import appeng.me.helpers.AENetworkProxy; import appeng.me.helpers.IGridProxyable; -import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.gui.modularui.GTUITextures; import gregtech.api.gui.modularui.GUITextureSet; import li.cil.oc.api.internal.MultiTank; import li.cil.oc.api.network.Component; @@ -397,7 +397,11 @@ public class OCApi/* extends test*/ implements li.cil.oc.api.network.Environment public Object[] getCustomName(final Context context, final Arguments args) { return new Object[] { TileIOHub.this.getInventoryName() }; } - +@Override +public Object[] getItemsInNetworkById(Context arg0, Arguments arg1) { + // TODO Auto-generated method stub + return NetworkControl$class.getItemsInNetworkById(this, arg0, arg1); +} @Callback(doc = "function(address:string):boolean -- Swap the inventory between this IO Hub and another IO Hub. Return whether operation successes.") public Object[] swap(final Context context, final Arguments args) { markDirty(); @@ -1545,7 +1549,7 @@ public ModularWindow createWindow() { /* * final CoverInfo coverInfo = uiBuildContext.getTile() * .getCoverInfoAtSide(uiBuildContext.getCoverSide()); final - * GT_CoverBehaviorBase behavior = coverInfo.getCoverBehavior(); + * CoverBehaviorBase behavior = coverInfo.getCoverBehavior(); * if (coverInfo.getMinimumTickRate() > 0 && * behavior.allowsTickRateAddition()) { builder.widget( new * GT_CoverTickRateButton(coverInfo, builder).setPos(getGUIWidth() - @@ -1567,7 +1571,7 @@ protected void addUIWidgets(ModularWindow.Builder builder) { builder.widget(new FakeSyncWidget.IntegerSyncer(() -> tankselected, s -> tankselected = s)); final IDrawable[] background = new IDrawable[] { GUITextureSet.DEFAULT.getItemSlot() }; final IDrawable[] special = new IDrawable[] { GUITextureSet.DEFAULT.getItemSlot(), - GT_UITextures.OVERLAY_SLOT_ARROW_ME }; + GTUITextures.OVERLAY_SLOT_ARROW_ME }; sc.widget(SlotGroup.ofItemHandler(inventoryHandler, 4) .startFromSlot(0).endAtSlot(31).background(background) @@ -1591,7 +1595,7 @@ public IDrawable[] getBackground() { final IDrawable[] background0 = new IDrawable[] { GUITextureSet.DEFAULT.getFluidSlot() }; final IDrawable[] special0 = new IDrawable[] { GUITextureSet.DEFAULT.getFluidSlot(), - GT_UITextures.OVERLAY_SLOT_ARROW_ME }; + GTUITextures.OVERLAY_SLOT_ARROW_ME }; sc.widget(SlotGroup.ofFluidTanks(Arrays.asList(ft), 1) @@ -1629,13 +1633,13 @@ public UIBuildContext getUIBuildContext() { * public boolean isCoverValid() { return !getUIBuildContext().getTile() * .isDead() && getUIBuildContext().getTile() * .getCoverBehaviorAtSideNew(getUIBuildContext().getCoverSide()) != - * GregTech_API.sNoBehavior; } + * GregTechAPI.sNoBehavior; } */ protected void addTitleToUI(ModularWindow.Builder builder) { /* * ItemStack coverItem = - * GT_Utility.intToStack(getUIBuildContext().getCoverID()); if + * GTUtility.intToStack(getUIBuildContext().getCoverID()); if * (coverItem != null) { builder.widget( new * ItemDrawable(coverItem).asWidget() .setPos(5, 5) .setSize(16, * 16)) .widget( new diff --git a/src/main/java/reobf/proghatches/block/TileReactorSyncer.java b/src/main/java/reobf/proghatches/block/TileReactorSyncer.java index 48356da..356681a 100644 --- a/src/main/java/reobf/proghatches/block/TileReactorSyncer.java +++ b/src/main/java/reobf/proghatches/block/TileReactorSyncer.java @@ -25,7 +25,7 @@ import com.gtnewhorizons.modularui.common.widget.TextWidget; import com.gtnewhorizons.modularui.common.widget.textfield.TextFieldWidget; -import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.gui.modularui.GTUITextures; import gregtech.api.gui.modularui.GUITextureSet; import gregtech.common.gui.modularui.widget.CoverCycleButtonWidget; import ic2.core.block.reactor.tileentity.TileEntityNuclearReactorElectric; @@ -190,8 +190,8 @@ protected void addUIWidgets(ModularWindow.Builder builderx) { .setGetter(() -> skipCycleZero ? 1 : 0).setSetter(s ->skipCycleZero = s == 1).setLength(2) .setTextureGetter(i -> { if (i == 1) - return GT_UITextures.OVERLAY_BUTTON_EXPORT; - return GT_UITextures.OVERLAY_BUTTON_IMPORT; + return GTUITextures.OVERLAY_BUTTON_EXPORT; + return GTUITextures.OVERLAY_BUTTON_IMPORT; }) .addTooltip(1, LangManager.translateToLocal("tile.reactor_syncer.skip.true")) @@ -220,22 +220,22 @@ protected void addUIWidgets(ModularWindow.Builder builderx) { .setSynced(true,true) .setPos(20*fi, 0) .setSize(20,20) - .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD.withOffset(-1, -1, 2, 2) + .setBackground(GTUITextures.BACKGROUND_TEXT_FIELD.withOffset(-1, -1, 2, 2) )); builder.widget(new ButtonWidget() .setOnClick((a,b)->{values[fi]=15;markDirty();}) - .setBackground(GT_UITextures.BUTTON_STANDARD,GT_UITextures.OVERLAY_BUTTON_ARROW_GREEN_UP) + .setBackground(GTUITextures.BUTTON_STANDARD,GTUITextures.OVERLAY_BUTTON_ARROW_GREEN_UP) .setPos(20*fi, 40) .setSize(20,20) ); builder.widget(new ButtonWidget() .setOnClick((a,b)->{values[fi]=0;markDirty();}) - .setBackground(GT_UITextures.BUTTON_STANDARD,GT_UITextures.OVERLAY_BUTTON_ARROW_GREEN_DOWN) + .setBackground(GTUITextures.BUTTON_STANDARD,GTUITextures.OVERLAY_BUTTON_ARROW_GREEN_DOWN) .setPos(20*fi, 60) .setSize(20,20) ); - builder.widget(new DrawableWidget().setDrawable(GT_UITextures.PICTURE_RADIATION_WARNING) + builder.widget(new DrawableWidget().setDrawable(GTUITextures.PICTURE_RADIATION_WARNING) .setPos(0, 20) .setSize(20,20) ); @@ -267,13 +267,13 @@ public UIBuildContext getUIBuildContext() { * public boolean isCoverValid() { return !getUIBuildContext().getTile() * .isDead() && getUIBuildContext().getTile() * .getCoverBehaviorAtSideNew(getUIBuildContext().getCoverSide()) != - * GregTech_API.sNoBehavior; } + * GregTechAPI.sNoBehavior; } */ protected void addTitleToUI(ModularWindow.Builder builder) { /* * ItemStack coverItem = - * GT_Utility.intToStack(getUIBuildContext().getCoverID()); if + * GTUtility.intToStack(getUIBuildContext().getCoverID()); if * (coverItem != null) { builder.widget( new * ItemDrawable(coverItem).asWidget() .setPos(5, 5) .setSize(16, * 16)) .widget( new diff --git a/src/main/java/reobf/proghatches/eucrafting/AECover.java b/src/main/java/reobf/proghatches/eucrafting/AECover.java index 0888e3e..b665209 100644 --- a/src/main/java/reobf/proghatches/eucrafting/AECover.java +++ b/src/main/java/reobf/proghatches/eucrafting/AECover.java @@ -1,6 +1,6 @@ package reobf.proghatches.eucrafting; -import static gregtech.api.enums.GT_Values.NW; +import static gregtech.api.enums.GTValues.NW; import java.lang.reflect.Method; import java.util.ArrayList; @@ -34,15 +34,15 @@ import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.gui.modularui.GT_CoverUIBuildContext; -import gregtech.api.gui.modularui.GT_UIInfos; +import gregtech.api.gui.modularui.CoverUIBuildContext; +import gregtech.api.gui.modularui.GTUIInfos; import gregtech.api.interfaces.tileentity.ICoverable; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.CoverableTileEntity; -import gregtech.api.net.GT_Packet_SendCoverData; -import gregtech.api.util.GT_CoverBehaviorBase; + +import gregtech.api.util.CoverBehaviorBase; import gregtech.api.util.ISerializableObject; -import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_AssemblyLine; + import gregtech.crossmod.waila.GregtechWailaDataProvider; import io.netty.buffer.ByteBuf; import net.minecraft.client.Minecraft; @@ -65,7 +65,7 @@ import reobf.proghatches.main.MyMod; import reobf.proghatches.util.StackTraceUtil; -public class AECover extends GT_CoverBehaviorBase { +public class AECover extends CoverBehaviorBase { public static boolean mixinReady;//mixin will set this to true @@ -537,7 +537,7 @@ public default boolean nonShiftClick(ForgeDirection side, int aCoverID, Data aCo public default void update(ICoverable aTileEntity) { } - public default void addUIWidgets(Builder builder, GT_CoverUIBuildContext gt_CoverUIBuildContext) { + public default void addUIWidgets(Builder builder, CoverUIBuildContext CoverUIBuildContext) { } default boolean hasAEGUI() { @@ -648,7 +648,7 @@ protected boolean onCoverRightClickImpl(ForgeDirection side, int aCoverID, Data @Override protected Data onCoverScrewdriverClickImpl(ForgeDirection side, int aCoverID, Data aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { - if (aCoverVariable.hasModularGUI())GT_UIInfos.openCoverUI(aTileEntity, aPlayer, side); + if (aCoverVariable.hasModularGUI())GTUIInfos.openCoverUI(aTileEntity, aPlayer, side); return super.onCoverScrewdriverClickImpl(side, aCoverID, aCoverVariable, aTileEntity, aPlayer, aX, aY, aZ); } @@ -660,7 +660,7 @@ private boolean openGUI(ForgeDirection side, int aCoverID, Data aCoverVariable, if (aCoverVariable.hasModularGUI()&&Optional.ofNullable(aPlayer.getHeldItem()).map(ItemStack::getItem) .orElse(null)==MyMod.eu_tool ) { - GT_UIInfos.openCoverUI(aTileEntity, aPlayer, side); + GTUIInfos.openCoverUI(aTileEntity, aPlayer, side); return true; @@ -692,7 +692,7 @@ protected boolean onCoverShiftRightClickImpl(ForgeDirection side, int aCoverID, /*NW.sendPacketToAllPlayersInRange(aPlayer.getEntityWorld(), - new GT_Packet_SendCoverData(side, aCoverID, aCoverVariable, aTileEntity), aTileEntity.getXCoord(), + new GTPacketSendCoverData(side, aCoverID, aCoverVariable, aTileEntity), aTileEntity.getXCoord(), aTileEntity.getZCoord()); */ @@ -897,21 +897,21 @@ public boolean hasCoverGUI() { return true; } - @Override + //@Override public boolean useModularUI() { // TODO Auto-generated method stub return true; } @Override - public ModularWindow createWindow(GT_CoverUIBuildContext buildContext) { + public ModularWindow createWindow(CoverUIBuildContext buildContext) { return new AECoverUIFactory(buildContext, ((Data) buildContext.getTile().getComplexCoverDataAtSide(buildContext.getCoverSide()))).createWindow(); } private class AECoverUIFactory extends UIFactory { - public AECoverUIFactory(GT_CoverUIBuildContext buildContext, Data d) { + public AECoverUIFactory(CoverUIBuildContext buildContext, Data d) { super(buildContext); this.data = d; } diff --git a/src/main/java/reobf/proghatches/eucrafting/BlockEUInterface.java b/src/main/java/reobf/proghatches/eucrafting/BlockEUInterface.java index 85e067e..6d2a68a 100644 --- a/src/main/java/reobf/proghatches/eucrafting/BlockEUInterface.java +++ b/src/main/java/reobf/proghatches/eucrafting/BlockEUInterface.java @@ -22,9 +22,9 @@ import appeng.util.Platform; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.GregTech_API; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_Utility; +import gregtech.api.GregTechAPI; +import gregtech.api.util.GTModHandler; +import gregtech.api.util.GTUtility; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.RenderBlocks; @@ -109,8 +109,8 @@ public boolean onActivated(final World world, final int x, final int y, final in final int facing, final float hitX, final float hitY, final float hitZ) { if ( player.getHeldItem()!=null&& - (GT_Utility.isStackInList(player.getHeldItem(), GregTech_API.sScrewdriverList)) - && (GT_ModHandler.damageOrDechargeItem(player.getHeldItem(), 1, 200, player)) + (GTUtility.isStackInList(player.getHeldItem(), GregTechAPI.sScrewdriverList)) + && (GTModHandler.damageOrDechargeItem(player.getHeldItem(), 1, 200, player)) ) { diff --git a/src/main/java/reobf/proghatches/eucrafting/ILazer.java b/src/main/java/reobf/proghatches/eucrafting/ILazer.java index f6cda55..0d9e42c 100644 --- a/src/main/java/reobf/proghatches/eucrafting/ILazer.java +++ b/src/main/java/reobf/proghatches/eucrafting/ILazer.java @@ -3,7 +3,7 @@ import java.util.Collection; import java.util.List; -import com.github.technus.tectech.mechanics.pipe.IConnectsToEnergyTunnel; +import tectech.mechanics.pipe.IConnectsToEnergyTunnel; import gregtech.api.interfaces.tileentity.IColoredTileEntity; import net.minecraft.tileentity.TileEntity; diff --git a/src/main/java/reobf/proghatches/eucrafting/InterfaceData.java b/src/main/java/reobf/proghatches/eucrafting/InterfaceData.java index 4be9df3..d81bbc9 100644 --- a/src/main/java/reobf/proghatches/eucrafting/InterfaceData.java +++ b/src/main/java/reobf/proghatches/eucrafting/InterfaceData.java @@ -1,6 +1,6 @@ package reobf.proghatches.eucrafting; -import static gregtech.api.enums.GT_Values.NW; +import static gregtech.api.enums.GTValues.NW; import java.util.ArrayList; import java.util.EnumSet; @@ -41,8 +41,8 @@ import appeng.util.Platform; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.relauncher.Side; -import gregtech.api.gui.modularui.GT_CoverUIBuildContext; -import gregtech.api.net.GT_Packet_SendCoverData; +import gregtech.api.gui.modularui.CoverUIBuildContext; + import gregtech.api.util.ISerializableObject; import io.netty.buffer.ByteBuf; import net.minecraft.entity.player.EntityPlayer; @@ -482,11 +482,11 @@ public TileEntity fakeTile() { return faketile; } @Override -public void addUIWidgets(Builder builder, GT_CoverUIBuildContext gt_CoverUIBuildContext) { - if (hasAEGUI() && !gt_CoverUIBuildContext.getPlayer().getEntityWorld().isRemote) { - gt_CoverUIBuildContext.getPlayer() +public void addUIWidgets(Builder builder, CoverUIBuildContext CoverUIBuildContext) { + if (hasAEGUI() && !CoverUIBuildContext.getPlayer().getEntityWorld().isRemote) { + CoverUIBuildContext.getPlayer() .openGui(MyMod.instance, side.ordinal(), - gt_CoverUIBuildContext.getPlayer().getEntityWorld(), this.getPos().x, + CoverUIBuildContext.getPlayer().getEntityWorld(), this.getPos().x, this.getPos().y, this.getPos().z);} } diff --git a/src/main/java/reobf/proghatches/eucrafting/InterfaceP2PData.java b/src/main/java/reobf/proghatches/eucrafting/InterfaceP2PData.java index f8fb12a..5535b7d 100644 --- a/src/main/java/reobf/proghatches/eucrafting/InterfaceP2PData.java +++ b/src/main/java/reobf/proghatches/eucrafting/InterfaceP2PData.java @@ -53,7 +53,7 @@ import appeng.util.Platform; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.relauncher.Side; -import gregtech.api.gui.modularui.GT_CoverUIBuildContext; +import gregtech.api.gui.modularui.CoverUIBuildContext; import gregtech.api.interfaces.tileentity.ICoverable; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Items; @@ -716,11 +716,11 @@ public String name() { return null; } @Override - public void addUIWidgets(Builder builder, GT_CoverUIBuildContext gt_CoverUIBuildContext) { - if (hasAEGUI() && !gt_CoverUIBuildContext.getPlayer().getEntityWorld().isRemote) { - gt_CoverUIBuildContext.getPlayer() + public void addUIWidgets(Builder builder, CoverUIBuildContext CoverUIBuildContext) { + if (hasAEGUI() && !CoverUIBuildContext.getPlayer().getEntityWorld().isRemote) { + CoverUIBuildContext.getPlayer() .openGui(MyMod.instance, side.ordinal(), - gt_CoverUIBuildContext.getPlayer().getEntityWorld(), this.getPos().x, + CoverUIBuildContext.getPlayer().getEntityWorld(), this.getPos().x, this.getPos().y, this.getPos().z);} } diff --git a/src/main/java/reobf/proghatches/eucrafting/InterfaceP2PEUData.java b/src/main/java/reobf/proghatches/eucrafting/InterfaceP2PEUData.java index ad31a4d..ccb9651 100644 --- a/src/main/java/reobf/proghatches/eucrafting/InterfaceP2PEUData.java +++ b/src/main/java/reobf/proghatches/eucrafting/InterfaceP2PEUData.java @@ -54,14 +54,14 @@ import appeng.util.Platform; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.relauncher.Side; -import gregtech.api.gui.modularui.GT_CoverUIBuildContext; -import gregtech.api.gui.modularui.GT_UIInfos; -import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.gui.modularui.CoverUIBuildContext; +import gregtech.api.gui.modularui.GTUIInfos; +import gregtech.api.gui.modularui.GTUITextures; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.ICoverable; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.interfaces.tileentity.IMachineProgress; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; +import gregtech.api.metatileentity.implementations.MTEMultiBlockBase; import gregtech.api.util.ISerializableObject; import gregtech.common.gui.modularui.widget.CoverCycleButtonWidget; @@ -537,8 +537,8 @@ public void update(ICoverable aTileEntity) { if ((aTileEntity instanceof IGregTechTileEntity)) { IGregTechTileEntity mt = (IGregTechTileEntity) aTileEntity; IMetaTileEntity meta = mt.getMetaTileEntity(); - if (meta != null && meta instanceof GT_MetaTileEntity_MultiBlockBase) { - GT_MetaTileEntity_MultiBlockBase multi = (GT_MetaTileEntity_MultiBlockBase) meta; + if (meta != null && meta instanceof MTEMultiBlockBase) { + MTEMultiBlockBase multi = (MTEMultiBlockBase) meta; if (multi.getStoredFluids().isEmpty()) { ArrayList in = multi.getStoredInputs(); @@ -777,7 +777,7 @@ public boolean getRedstone() { @Override - public void addUIWidgets(Builder builder, GT_CoverUIBuildContext ss) { + public void addUIWidgets(Builder builder, CoverUIBuildContext ss) { @@ -808,7 +808,7 @@ public void addUIWidgets(Builder builder, GT_CoverUIBuildContext ss) { widget.getContext().openSyncedWindow(777); } - }).setPlayClickSound(true).setBackground(GT_UITextures.BUTTON_STANDARD, ICON) + }).setPlayClickSound(true).setBackground(GTUITextures.BUTTON_STANDARD, ICON) .addTooltips(ImmutableList .of(LangManager.translateToLocalFormatted("programmable_hatches.cover.ae.configure"))) .setSize(16, 16).setPos(startX + spaceX * 6, startY + spaceY * 3)); @@ -832,8 +832,8 @@ public void addUIWidgets(Builder builder, GT_CoverUIBuildContext ss) { worksensitive = s == 1; }).setLength(2).setTextureGetter(i -> { if (i == 1) - return GT_UITextures.OVERLAY_BUTTON_EXPORT; - return GT_UITextures.OVERLAY_BUTTON_IMPORT; + return GTUITextures.OVERLAY_BUTTON_EXPORT; + return GTUITextures.OVERLAY_BUTTON_IMPORT; }) .addTooltip(0, LangManager.translateToLocal("programmable_hatches.cover.ae.worksensitive.false")) @@ -845,8 +845,8 @@ public void addUIWidgets(Builder builder, GT_CoverUIBuildContext ss) { delay = s == 1; }).setLength(2).setTextureGetter(i -> { if (i == 1) - return GT_UITextures.OVERLAY_BUTTON_EXPORT; - return GT_UITextures.OVERLAY_BUTTON_IMPORT; + return GTUITextures.OVERLAY_BUTTON_EXPORT; + return GTUITextures.OVERLAY_BUTTON_IMPORT; }) .addTooltip(0, LangManager.translateToLocal("programmable_hatches.cover.ae.delay.false")) @@ -858,8 +858,8 @@ public void addUIWidgets(Builder builder, GT_CoverUIBuildContext ss) { inputdetect = s == 1; }).setLength(2).setTextureGetter(i -> { if (i == 1) - return GT_UITextures.OVERLAY_BUTTON_EXPORT; - return GT_UITextures.OVERLAY_BUTTON_IMPORT; + return GTUITextures.OVERLAY_BUTTON_EXPORT; + return GTUITextures.OVERLAY_BUTTON_IMPORT; }) .addTooltip(0, LangManager.translateToLocal("programmable_hatches.cover.ae.inputdetect.false")) @@ -878,8 +878,8 @@ private ModularWindow createWindow(EntityPlayer ss, int rgb) { worksensitive = s == 1; }).setLength(2).setTextureGetter(i -> { if (i == 1) - return GT_UITextures.OVERLAY_BUTTON_EXPORT; - return GT_UITextures.OVERLAY_BUTTON_IMPORT; + return GTUITextures.OVERLAY_BUTTON_EXPORT; + return GTUITextures.OVERLAY_BUTTON_IMPORT; }) .addTooltip(0, LangManager.translateToLocal("programmable_hatches.cover.ae.worksensitive.false")) @@ -891,8 +891,8 @@ private ModularWindow createWindow(EntityPlayer ss, int rgb) { delay = s == 1; }).setLength(2).setTextureGetter(i -> { if (i == 1) - return GT_UITextures.OVERLAY_BUTTON_EXPORT; - return GT_UITextures.OVERLAY_BUTTON_IMPORT; + return GTUITextures.OVERLAY_BUTTON_EXPORT; + return GTUITextures.OVERLAY_BUTTON_IMPORT; }) .addTooltip(0, LangManager.translateToLocal("programmable_hatches.cover.ae.delay.false")) @@ -904,8 +904,8 @@ private ModularWindow createWindow(EntityPlayer ss, int rgb) { inputdetect = s == 1; }).setLength(2).setTextureGetter(i -> { if (i == 1) - return GT_UITextures.OVERLAY_BUTTON_EXPORT; - return GT_UITextures.OVERLAY_BUTTON_IMPORT; + return GTUITextures.OVERLAY_BUTTON_EXPORT; + return GTUITextures.OVERLAY_BUTTON_IMPORT; }) .addTooltip(0, LangManager.translateToLocal("programmable_hatches.cover.ae.inputdetect.false")) diff --git a/src/main/java/reobf/proghatches/eucrafting/InterfaceP2PNoFluidData.java b/src/main/java/reobf/proghatches/eucrafting/InterfaceP2PNoFluidData.java index ad9d444..1550f38 100644 --- a/src/main/java/reobf/proghatches/eucrafting/InterfaceP2PNoFluidData.java +++ b/src/main/java/reobf/proghatches/eucrafting/InterfaceP2PNoFluidData.java @@ -50,7 +50,7 @@ import appeng.util.Platform; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.relauncher.Side; -import gregtech.api.gui.modularui.GT_CoverUIBuildContext; +import gregtech.api.gui.modularui.CoverUIBuildContext; import gregtech.api.interfaces.tileentity.ICoverable; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Items; @@ -694,14 +694,14 @@ public ForgeDirection getActualSide() { // TODO Auto-generated method stub return side; }@Override - public void addUIWidgets(Builder builder, GT_CoverUIBuildContext gt_CoverUIBuildContext) { + public void addUIWidgets(Builder builder, CoverUIBuildContext CoverUIBuildContext) { if( - (hasAEGUI() && !gt_CoverUIBuildContext.getPlayer().getEntityWorld().isRemote) + (hasAEGUI() && !CoverUIBuildContext.getPlayer().getEntityWorld().isRemote) ) { - gt_CoverUIBuildContext.getPlayer() + CoverUIBuildContext.getPlayer() .openGui(MyMod.instance, side.ordinal(), - gt_CoverUIBuildContext.getPlayer().getEntityWorld(), this.getPos().x, + CoverUIBuildContext.getPlayer().getEntityWorld(), this.getPos().x, this.getPos().y, this.getPos().z);} } } diff --git a/src/main/java/reobf/proghatches/eucrafting/ItemPartEUSource.java b/src/main/java/reobf/proghatches/eucrafting/ItemPartEUSource.java index e39ef20..f80f672 100644 --- a/src/main/java/reobf/proghatches/eucrafting/ItemPartEUSource.java +++ b/src/main/java/reobf/proghatches/eucrafting/ItemPartEUSource.java @@ -8,7 +8,7 @@ import appeng.api.parts.IPartItem; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.enums.GT_Values; +import gregtech.api.enums.GTValues; import gregtech.api.enums.Textures; import gregtech.api.enums.Textures.BlockIcons.CustomIcon; import net.minecraft.client.renderer.texture.IIconRegister; @@ -40,10 +40,10 @@ public PartEUSource createPartFromItemStack(ItemStack is) { public String getItemStackDisplayName(ItemStack stack) { int damage=stack.getItemDamage(); if(damage>=1&&damage<=15){ - return StatCollector.translateToLocalFormatted("item.proghatches.part.eu.source.superconduct.name",GT_Values.VN[damage-1]); + return StatCollector.translateToLocalFormatted("item.proghatches.part.eu.source.superconduct.name",GTValues.VN[damage-1]); } if(damage>=16&&damage<=30){ - return StatCollector.translateToLocalFormatted("item.proghatches.part.eu.source.normal.name",GT_Values.VN[damage-16]); + return StatCollector.translateToLocalFormatted("item.proghatches.part.eu.source.normal.name",GTValues.VN[damage-16]); } return super.getItemStackDisplayName(stack); } diff --git a/src/main/java/reobf/proghatches/eucrafting/ItemPartLazerP2P.java b/src/main/java/reobf/proghatches/eucrafting/ItemPartLazerP2P.java index 71e3306..4738dbf 100644 --- a/src/main/java/reobf/proghatches/eucrafting/ItemPartLazerP2P.java +++ b/src/main/java/reobf/proghatches/eucrafting/ItemPartLazerP2P.java @@ -9,7 +9,7 @@ import appeng.api.parts.IPartItem; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.enums.GT_Values; +import gregtech.api.enums.GTValues; import gregtech.api.enums.Textures; import gregtech.api.enums.Textures.BlockIcons.CustomIcon; import net.minecraft.client.renderer.texture.IIconRegister; @@ -41,10 +41,10 @@ public IPart createPartFromItemStack(ItemStack is) { public String getItemStackDisplayName(ItemStack stack) { int damage=stack.getItemDamage(); if(damage>=1&&damage<=15){ - return StatCollector.translateToLocalFormatted("item.proghatches.part.eu.source.superconduct.name",GT_Values.VN[damage-1]); + return StatCollector.translateToLocalFormatted("item.proghatches.part.eu.source.superconduct.name",GTValues.VN[damage-1]); } if(damage>=16&&damage<=30){ - return StatCollector.translateToLocalFormatted("item.proghatches.part.eu.source.normal.name",GT_Values.VN[damage-16]); + return StatCollector.translateToLocalFormatted("item.proghatches.part.eu.source.normal.name",GTValues.VN[damage-16]); } return super.getItemStackDisplayName(stack); } diff --git a/src/main/java/reobf/proghatches/eucrafting/PartEUP2PInterface.java b/src/main/java/reobf/proghatches/eucrafting/PartEUP2PInterface.java index 2f099b9..e6f859e 100644 --- a/src/main/java/reobf/proghatches/eucrafting/PartEUP2PInterface.java +++ b/src/main/java/reobf/proghatches/eucrafting/PartEUP2PInterface.java @@ -124,16 +124,16 @@ import appeng.util.item.AEFluidStack; import appeng.util.item.AEItemStack; import cofh.api.energy.IEnergyReceiver; -import gregtech.api.GregTech_API; -import gregtech.api.enums.GT_Values; -import gregtech.api.gui.modularui.GT_CoverUIBuildContext; -import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.GregTechAPI; +import gregtech.api.enums.GTValues; +import gregtech.api.gui.modularui.CoverUIBuildContext; +import gregtech.api.gui.modularui.GTUITextures; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IEnergyConnected; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_Utility; +import gregtech.api.metatileentity.implementations.MTEMultiBlockBase; +import gregtech.api.util.GTModHandler; +import gregtech.api.util.GTUtility; import gregtech.common.gui.modularui.widget.CoverCycleButtonWidget; import gregtech.common.tileentities.machines.IDualInputHatch; import ic2.api.energy.tile.IEnergySink; @@ -412,8 +412,8 @@ public boolean onPartActivate(final EntityPlayer player, final Vec3 pos) { */ if ( player.getHeldItem()!=null&& - (GT_Utility.isStackInList(player.getHeldItem(), GregTech_API.sScrewdriverList)) - && (GT_ModHandler.damageOrDechargeItem(player.getHeldItem(), 1, 200, player)) + (GTUtility.isStackInList(player.getHeldItem(), GregTechAPI.sScrewdriverList)) + && (GTModHandler.damageOrDechargeItem(player.getHeldItem(), 1, 200, player)) ) @@ -1316,7 +1316,7 @@ public ModularWindow.Builder addWidgetsOut(ModularWindow.Builder builder, int ys .setSetter(s -> duty = i2d(s)) .setLength(4) .setTextureGetter(i -> { - return GT_UITextures.OVERLAY_BUTTON_CROSS; + return GTUITextures.OVERLAY_BUTTON_CROSS; }) .addTooltip(0, LangManager.translateToLocal("proghatches.eucreafting.duty.all")) @@ -1336,9 +1336,9 @@ public ModularWindow.Builder addWidgetsOut(ModularWindow.Builder builder, int ys .setTextureGetter(i -> { return (buttonIcon[inx]); /*if (i == 0) - return GT_UITextures.OVERLAY_BUTTON_CHECKMARK; + return GTUITextures.OVERLAY_BUTTON_CHECKMARK; - return GT_UITextures.OVERLAY_BUTTON_CROSS;*/ + return GTUITextures.OVERLAY_BUTTON_CROSS;*/ }) .addTooltip(0, LangManager.translateToLocal("proghatches.eucreafting.duty.0."+inx)) @@ -1348,10 +1348,10 @@ public ModularWindow.Builder addWidgetsOut(ModularWindow.Builder builder, int ys .setBackground(() -> { if (c.getState()==0) { - return new IDrawable[] { GT_UITextures.BUTTON_STANDARD_PRESSED, + return new IDrawable[] { GTUITextures.BUTTON_STANDARD_PRESSED, }; } else { - return new IDrawable[] { GT_UITextures.BUTTON_STANDARD, + return new IDrawable[] { GTUITextures.BUTTON_STANDARD, }; } }) @@ -1431,9 +1431,9 @@ public ModularWindow.Builder addWidgets(ModularWindow.Builder builder, int yshif .setTextureGetter(i -> { return (buttonIcon[inx]); /*if (i == 0) - return GT_UITextures.OVERLAY_BUTTON_CHECKMARK; + return GTUITextures.OVERLAY_BUTTON_CHECKMARK; - return GT_UITextures.OVERLAY_BUTTON_CROSS;*/ + return GTUITextures.OVERLAY_BUTTON_CROSS;*/ }) .addTooltip(0, LangManager.translateToLocal("proghatches.eucreafting.duty.0."+inx)) @@ -1443,10 +1443,10 @@ public ModularWindow.Builder addWidgets(ModularWindow.Builder builder, int yshif .setBackground(() -> { if (c.getState()==0) { - return new IDrawable[] { GT_UITextures.BUTTON_STANDARD_PRESSED, + return new IDrawable[] { GTUITextures.BUTTON_STANDARD_PRESSED, }; } else { - return new IDrawable[] { GT_UITextures.BUTTON_STANDARD, + return new IDrawable[] { GTUITextures.BUTTON_STANDARD, }; } }) @@ -1459,7 +1459,7 @@ public ModularWindow.Builder addWidgets(ModularWindow.Builder builder, int yshif .setSetter(s -> duty = i2d(s)) .setLength(4) .setTextureGetter(i -> { - return GT_UITextures.OVERLAY_BUTTON_CROSS; + return GTUITextures.OVERLAY_BUTTON_CROSS; }) .addTooltip(0, LangManager.translateToLocal("proghatches.eucreafting.duty.all")) @@ -1484,7 +1484,7 @@ public ModularWindow.Builder addWidgets(ModularWindow.Builder builder, int yshif DimensionalCoord wc=(DimensionalCoord) new DimensionalCoord(getTile()).add(this.getSide(), 1); bl=wc.getWorld().getBlock(wc.x, wc.y, wc.z); ItemStack ist = bl.getPickBlock(new MovingObjectPosition (buildContext.getPlayer()), buildContext.getPlayer().worldObj,wc.x, wc.y, wc.z, buildContext.getPlayer()); - s.setBackground(GT_UITextures.BUTTON_STANDARD, new ItemDrawable(ist)); + s.setBackground(GTUITextures.BUTTON_STANDARD, new ItemDrawable(ist)); }) .setSize(16,16) .setPos(8+20, 60) @@ -1497,9 +1497,9 @@ public ModularWindow.Builder addWidgets(ModularWindow.Builder builder, int yshif .setGetter(() -> (redstoneticks > 0) ? 1 : 0).setSetter(s -> redstoneticks = s).setLength(2) .setTextureGetter(i -> { if (i == 1) - return GT_UITextures.OVERLAY_BUTTON_CHECKMARK; + return GTUITextures.OVERLAY_BUTTON_CHECKMARK; - return GT_UITextures.OVERLAY_BUTTON_CROSS; + return GTUITextures.OVERLAY_BUTTON_CROSS; }) .addTooltip(0, LangManager.translateToLocal("proghatches.eucreafting.finish.false")) @@ -1513,8 +1513,8 @@ public ModularWindow.Builder addWidgets(ModularWindow.Builder builder, int yshif * CoverCycleButtonWidget().setSynced(false, true)) .setGetter(() -> * recycle ? 1 : 0) .setSetter(s -> recycle = s == 1) .setLength(2) * .setTextureGetter(i -> { if (i == 1) return - * GT_UITextures.OVERLAY_BUTTON_CHECKMARK; return - * GT_UITextures.OVERLAY_BUTTON_CROSS; }) + * GTUITextures.OVERLAY_BUTTON_CHECKMARK; return + * GTUITextures.OVERLAY_BUTTON_CROSS; }) * * .addTooltip(0, * LangManager.translateToLocal("proghatches.part.recycle.false")) @@ -1526,8 +1526,8 @@ public ModularWindow.Builder addWidgets(ModularWindow.Builder builder, int yshif * CoverCycleButtonWidget().setSynced(false, true)) .setGetter(() -> * onoff ? 1 : 0) .setSetter(s -> {onoff = s == 1;postEvent();}) * .setLength(2) .setTextureGetter(i -> { if (i == 1) return - * GT_UITextures.OVERLAY_BUTTON_POWER_SWITCH_ON; return - * GT_UITextures.OVERLAY_BUTTON_POWER_SWITCH_OFF; }) + * GTUITextures.OVERLAY_BUTTON_POWER_SWITCH_ON; return + * GTUITextures.OVERLAY_BUTTON_POWER_SWITCH_OFF; }) * * .addTooltip(0, * LangManager.translateToLocal("proghatches.part.onoff.false")) @@ -1578,7 +1578,7 @@ public ModularWindow.Builder addWidgets(ModularWindow.Builder builder, int yshif }).setPattern(BaseTextFieldWidget.NATURAL_NUMS).setMaxLength(50).setScrollBar().setFocusOnGuiOpen(false) .setTextColor(Color.WHITE.dark(1)) - .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD.withOffset(-1, -1, 2, 2)).setPos(16, 16 + yshift) + .setBackground(GTUITextures.BACKGROUND_TEXT_FIELD.withOffset(-1, -1, 2, 2)).setPos(16, 16 + yshift) .setSize(16 * 8, 16); return o; @@ -1586,13 +1586,13 @@ public ModularWindow.Builder addWidgets(ModularWindow.Builder builder, int yshif builder.widget(gen.apply(() -> this.voltage, a -> { this.voltage = a; }).setPos(16, 16 + yshift).dynamicTooltip(() -> { - String a = GT_Values.VN[0], b; + String a = GTValues.VN[0], b; long v = 8; - for (int i = 0; i < GT_Values.V.length - 1; i++) { + for (int i = 0; i < GTValues.V.length - 1; i++) { - if (voltage > GT_Values.V[i]) { - a = GT_Values.VN[i + 1]; - v = GT_Values.V[i + 1]; + if (voltage > GTValues.V[i]) { + a = GTValues.VN[i + 1]; + v = GTValues.V[i + 1]; } } b = Math.floor((100 * (float) voltage / v)) + "%"; @@ -1735,36 +1735,36 @@ private long doOutput(long aVoltage, long aAmperage, ForgeDirection side) { return rUsedAmperes; } - } else if (GregTech_API.mOutputRF && te instanceof IEnergyReceiver) { - int rfOut = (int) (aVoltage * (long) GregTech_API.mEUtoRF / 100L); + } else if (GregTechAPI.mOutputRF && te instanceof IEnergyReceiver) { + int rfOut = (int) (aVoltage * (long) GregTechAPI.mEUtoRF / 100L); if (((IEnergyReceiver) te).receiveEnergy(oppositeSide, rfOut, true) == rfOut) { ((IEnergyReceiver) te).receiveEnergy(oppositeSide, rfOut, false); return 1L; } - if (GregTech_API.mRFExplosions && GregTech_API.sMachineExplosions + if (GregTechAPI.mRFExplosions && GregTechAPI.sMachineExplosions && ((IEnergyReceiver) te).getMaxEnergyStored(oppositeSide) < rfOut * 600 - && rfOut > 32 * GregTech_API.mEUtoRF / 100) { - float tStrength = (long) rfOut < GT_Values.V[0] ? 1.0F - : ((long) rfOut < GT_Values.V[1] ? 2.0F - : ((long) rfOut < GT_Values.V[2] ? 3.0F - : ((long) rfOut < GT_Values.V[3] ? 4.0F - : ((long) rfOut < GT_Values.V[4] ? 5.0F - : ((long) rfOut < GT_Values.V[4] * 2L ? 6.0F - : ((long) rfOut < GT_Values.V[5] ? 7.0F - : ((long) rfOut < GT_Values.V[6] + && rfOut > 32 * GregTechAPI.mEUtoRF / 100) { + float tStrength = (long) rfOut < GTValues.V[0] ? 1.0F + : ((long) rfOut < GTValues.V[1] ? 2.0F + : ((long) rfOut < GTValues.V[2] ? 3.0F + : ((long) rfOut < GTValues.V[3] ? 4.0F + : ((long) rfOut < GTValues.V[4] ? 5.0F + : ((long) rfOut < GTValues.V[4] * 2L ? 6.0F + : ((long) rfOut < GTValues.V[5] ? 7.0F + : ((long) rfOut < GTValues.V[6] ? 8.0F - : ((long) rfOut < GT_Values.V[7] + : ((long) rfOut < GTValues.V[7] ? 9.0F : 10.0F)))))))); int tX = te.xCoord; int tY = te.yCoord; int tZ = te.zCoord; World tWorld = te.getWorldObj(); - GT_Utility.sendSoundToPlayers(tWorld, GregTech_API.sSoundList.get(209), 1.0F, -1.0F, tX, tY, + GTUtility.sendSoundToPlayers(tWorld, GregTechAPI.sSoundList.get(209), 1.0F, -1.0F, tX, tY, tZ); tWorld.setBlock(tX, tY, tZ, Blocks.air); - if (GregTech_API.sMachineExplosions) { + if (GregTechAPI.sMachineExplosions) { tWorld.createExplosion(null, (double) tX + 0.5D, (double) tY + 0.5D, (double) tZ + 0.5D, tStrength, true); } diff --git a/src/main/java/reobf/proghatches/eucrafting/PartEUSource.java b/src/main/java/reobf/proghatches/eucrafting/PartEUSource.java index 2be4025..8c3a63d 100644 --- a/src/main/java/reobf/proghatches/eucrafting/PartEUSource.java +++ b/src/main/java/reobf/proghatches/eucrafting/PartEUSource.java @@ -15,7 +15,7 @@ import javax.annotation.concurrent.Immutable; -import com.github.technus.tectech.thing.metaTileEntity.pipe.GT_MetaTileEntity_Pipe_Energy; + import com.glodblock.github.client.textures.FCPartsTexture; import com.google.common.collect.ImmutableList; import com.gtnewhorizons.modularui.api.ModularUITextures; @@ -59,13 +59,13 @@ import appeng.util.item.AEItemStack; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.GregTech_API; -import gregtech.api.enums.GT_Values; -import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.GregTechAPI; +import gregtech.api.enums.GTValues; +import gregtech.api.gui.modularui.GTUITextures; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTUtility; import gregtech.common.gui.modularui.widget.CoverCycleButtonWidget; import mcp.mobius.waila.api.IWailaConfigHandler; import mcp.mobius.waila.api.IWailaDataAccessor; @@ -486,8 +486,8 @@ public ModularWindow createWindow(UIBuildContext buildContext) { builder.widget(((CycleButtonWidget) new CoverCycleButtonWidget().setSynced(false, true)) .setGetter(() -> recycle ? 1 : 0).setSetter(s -> recycle = s == 1).setLength(2).setTextureGetter(i -> { if (i == 1) - return GT_UITextures.OVERLAY_BUTTON_CHECKMARK; - return GT_UITextures.OVERLAY_BUTTON_CROSS; + return GTUITextures.OVERLAY_BUTTON_CHECKMARK; + return GTUITextures.OVERLAY_BUTTON_CROSS; }) .addTooltip(0, LangManager.translateToLocal("proghatches.part.recycle.false")) @@ -500,8 +500,8 @@ public ModularWindow createWindow(UIBuildContext buildContext) { postEvent(); }).setLength(2).setTextureGetter(i -> { if (i == 1) - return GT_UITextures.OVERLAY_BUTTON_POWER_SWITCH_ON; - return GT_UITextures.OVERLAY_BUTTON_POWER_SWITCH_OFF; + return GTUITextures.OVERLAY_BUTTON_POWER_SWITCH_ON; + return GTUITextures.OVERLAY_BUTTON_POWER_SWITCH_OFF; }) .addTooltip(0, LangManager.translateToLocal("proghatches.part.onoff.false")) @@ -542,7 +542,7 @@ public ModularWindow createWindow(UIBuildContext buildContext) { }).setPattern(BaseTextFieldWidget.NATURAL_NUMS).setMaxLength(50).setScrollBar().setFocusOnGuiOpen(false) .setTextColor(Color.WHITE.dark(1)) - .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD.withOffset(-1, -1, 2, 2)).setPos(16, 16) + .setBackground(GTUITextures.BACKGROUND_TEXT_FIELD.withOffset(-1, -1, 2, 2)).setPos(16, 16) .setSize(16 * 8, 16); return o; @@ -550,13 +550,13 @@ public ModularWindow createWindow(UIBuildContext buildContext) { builder.widget(gen.apply(() -> this.voltage, a -> { this.voltage = a; }).setPos(16, 16).dynamicTooltip(() -> { - String a = GT_Values.VN[0], b; + String a = GTValues.VN[0], b; long v = 8; - for (int i = 0; i < GT_Values.V.length - 1; i++) { + for (int i = 0; i < GTValues.V.length - 1; i++) { - if (voltage > GT_Values.V[i]) { - a = GT_Values.VN[i + 1]; - v = GT_Values.V[i + 1]; + if (voltage > GTValues.V[i]) { + a = GTValues.VN[i + 1]; + v = GTValues.V[i + 1]; } } b = Math.floor((100 * (float) voltage / v)) + "%"; @@ -600,10 +600,10 @@ public ItemStack getIS(){ public long maxWorkingVoltage(){ int damage=this.getIS().getItemDamage(); if(damage>=1&&damage<=15){ - return GT_Values.V[damage-1]; + return GTValues.V[damage-1]; } if(damage>=16&&damage<=30){ - return GT_Values.V[damage-16]; + return GTValues.V[damage-16]; } return Long.MAX_VALUE; } @@ -646,7 +646,7 @@ public long injectEnergyUnits(long aVoltage, long aAmperage) { if(aVoltage>maxWorkingVoltage()){ TileEntity t = this.host.getTile(); t.getWorldObj().createExplosion(null, t.xCoord+0.5,t.yCoord+0.5,t.zCoord+0.5, 2, true); - GT_Utility.sendSoundToPlayers(t.getWorldObj(), GregTech_API.sSoundList.get(209), 1.0F, -1.0F, t.xCoord,t.yCoord,t.zCoord); + GTUtility.sendSoundToPlayers(t.getWorldObj(), GregTechAPI.sSoundList.get(209), 1.0F, -1.0F, t.xCoord,t.yCoord,t.zCoord); this.host.removePart(side, false); } diff --git a/src/main/java/reobf/proghatches/eucrafting/PartLazerP2P.java b/src/main/java/reobf/proghatches/eucrafting/PartLazerP2P.java index 164d5fd..921c7d4 100644 --- a/src/main/java/reobf/proghatches/eucrafting/PartLazerP2P.java +++ b/src/main/java/reobf/proghatches/eucrafting/PartLazerP2P.java @@ -7,10 +7,9 @@ import java.util.List; import java.util.function.Consumer; -import com.github.technus.tectech.mechanics.pipe.IConnectsToEnergyTunnel; -import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_DynamoTunnel; -import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyTunnel; -import com.github.technus.tectech.thing.metaTileEntity.pipe.GT_MetaTileEntity_Pipe_Energy; +import tectech.mechanics.pipe.IConnectsToEnergyTunnel; +import tectech.thing.metaTileEntity.pipe.MTEPipeEnergy; + import com.google.common.base.Optional; import com.google.common.collect.ImmutableList; @@ -27,11 +26,11 @@ import appeng.parts.p2p.PartP2PTunnelStatic; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.enums.GT_Values; +import gregtech.api.enums.GTValues; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock; +import gregtech.api.metatileentity.implementations.MTETieredMachineBlock; import net.minecraft.block.Block; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.init.Blocks; @@ -194,11 +193,11 @@ private S getBackward() { ){ return (S) (aMetaTileEntity); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Pipe_Energy) { - if (((GT_MetaTileEntity_Pipe_Energy) aMetaTileEntity).connectionCount < 2) { + } else if (aMetaTileEntity instanceof MTEPipeEnergy) { + if (((MTEPipeEnergy) aMetaTileEntity).connectionCount < 2) { return null; } else { - ((GT_MetaTileEntity_Pipe_Energy) aMetaTileEntity).markUsed(); + ((MTEPipeEnergy) aMetaTileEntity).markUsed(); } continue; } @@ -246,11 +245,11 @@ public Object getForward() { // && opposite.getOpposite() == tGTTileEntity.getFrontFacing() ) { return ( aMetaTileEntity); - } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Pipe_Energy) { - if (((GT_MetaTileEntity_Pipe_Energy) aMetaTileEntity).connectionCount < 2) { + } else if (aMetaTileEntity instanceof MTEPipeEnergy) { + if (((MTEPipeEnergy) aMetaTileEntity).connectionCount < 2) { return null; } else { - ((GT_MetaTileEntity_Pipe_Energy) aMetaTileEntity).markUsed(); + ((MTEPipeEnergy) aMetaTileEntity).markUsed(); } continue; } @@ -311,8 +310,8 @@ > void moveForward(S s,RestrictedTarget dd0 D dd=(D) dd0.target; dd0.callback.forEach(st->{ - if(s instanceof GT_MetaTileEntity_TieredMachineBlock) - st.accept(GT_Values.V[((GT_MetaTileEntity_TieredMachineBlock) s).mTier]); + if(s instanceof MTETieredMachineBlock) + st.accept(GTValues.V[((MTETieredMachineBlock) s).mTier]); }); diff --git a/src/main/java/reobf/proghatches/eucrafting/TileFluidInterface_EU.java b/src/main/java/reobf/proghatches/eucrafting/TileFluidInterface_EU.java index ef0a236..90bf1f2 100644 --- a/src/main/java/reobf/proghatches/eucrafting/TileFluidInterface_EU.java +++ b/src/main/java/reobf/proghatches/eucrafting/TileFluidInterface_EU.java @@ -48,13 +48,13 @@ import appeng.tile.misc.TileInterface; import appeng.util.item.AEItemStack; import cofh.api.energy.IEnergyReceiver; -import gregtech.api.GregTech_API; -import gregtech.api.enums.GT_Values; -import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.GregTechAPI; +import gregtech.api.enums.GTValues; +import gregtech.api.gui.modularui.GTUITextures; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IEnergyConnected; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTUtility; import gregtech.common.gui.modularui.widget.CoverCycleButtonWidget; import ic2.api.energy.tile.IEnergySink; import mcp.mobius.waila.api.IWailaConfigHandler; @@ -973,9 +973,9 @@ public ModularWindow createWindow(UIBuildContext buildContext) { .setGetter(() -> (redstoneticks > 0) ? 1 : 0).setSetter(s -> redstoneticks = s).setLength(2) .setTextureGetter(i -> { if (i == 1) - return GT_UITextures.OVERLAY_BUTTON_CHECKMARK; + return GTUITextures.OVERLAY_BUTTON_CHECKMARK; - return GT_UITextures.OVERLAY_BUTTON_CROSS; + return GTUITextures.OVERLAY_BUTTON_CROSS; }) .addTooltip(0, LangManager.translateToLocal("proghatches.eucreafting.finish.false")) @@ -988,8 +988,8 @@ public ModularWindow createWindow(UIBuildContext buildContext) { * CoverCycleButtonWidget().setSynced(false, true)) .setGetter(() -> * onoff ? 1 : 0) .setSetter(s -> {onoff = s == 1;postEvent();}) * .setLength(2) .setTextureGetter(i -> { if (i == 1) return - * GT_UITextures.OVERLAY_BUTTON_POWER_SWITCH_ON; return - * GT_UITextures.OVERLAY_BUTTON_POWER_SWITCH_OFF; }) + * GTUITextures.OVERLAY_BUTTON_POWER_SWITCH_ON; return + * GTUITextures.OVERLAY_BUTTON_POWER_SWITCH_OFF; }) * * .addTooltip(0, * LangManager.translateToLocal("proghatches.part.onoff.false")) @@ -1040,7 +1040,7 @@ public ModularWindow createWindow(UIBuildContext buildContext) { }).setPattern(BaseTextFieldWidget.NATURAL_NUMS).setMaxLength(50).setScrollBar().setFocusOnGuiOpen(false) .setTextColor(Color.WHITE.dark(1)) - .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD.withOffset(-1, -1, 2, 2)).setPos(16, 16) + .setBackground(GTUITextures.BACKGROUND_TEXT_FIELD.withOffset(-1, -1, 2, 2)).setPos(16, 16) .setSize(16 * 8, 16); return o; @@ -1048,13 +1048,13 @@ public ModularWindow createWindow(UIBuildContext buildContext) { builder.widget(gen.apply(() -> this.voltage, a -> { this.voltage = a; }).setPos(16, 16).dynamicTooltip(() -> { - String a = GT_Values.VN[0], b; + String a = GTValues.VN[0], b; long v = 8; - for (int i = 0; i < GT_Values.V.length - 1; i++) { + for (int i = 0; i < GTValues.V.length - 1; i++) { - if (voltage > GT_Values.V[i]) { - a = GT_Values.VN[i + 1]; - v = GT_Values.V[i + 1]; + if (voltage > GTValues.V[i]) { + a = GTValues.VN[i + 1]; + v = GTValues.V[i + 1]; } } b = Math.floor((100 * (float) voltage / v)) + "%"; @@ -1138,36 +1138,36 @@ private long doOutput(long aVoltage, long aAmperage, ForgeDirection side) { return rUsedAmperes; } - } else if (GregTech_API.mOutputRF && te instanceof IEnergyReceiver) { - int rfOut = (int) (aVoltage * (long) GregTech_API.mEUtoRF / 100L); + } else if (GregTechAPI.mOutputRF && te instanceof IEnergyReceiver) { + int rfOut = (int) (aVoltage * (long) GregTechAPI.mEUtoRF / 100L); if (((IEnergyReceiver) te).receiveEnergy(oppositeSide, rfOut, true) == rfOut) { ((IEnergyReceiver) te).receiveEnergy(oppositeSide, rfOut, false); return 1L; } - if (GregTech_API.mRFExplosions && GregTech_API.sMachineExplosions + if (GregTechAPI.mRFExplosions && GregTechAPI.sMachineExplosions && ((IEnergyReceiver) te).getMaxEnergyStored(oppositeSide) < rfOut * 600 - && rfOut > 32 * GregTech_API.mEUtoRF / 100) { - float tStrength = (long) rfOut < GT_Values.V[0] ? 1.0F - : ((long) rfOut < GT_Values.V[1] ? 2.0F - : ((long) rfOut < GT_Values.V[2] ? 3.0F - : ((long) rfOut < GT_Values.V[3] ? 4.0F - : ((long) rfOut < GT_Values.V[4] ? 5.0F - : ((long) rfOut < GT_Values.V[4] * 2L ? 6.0F - : ((long) rfOut < GT_Values.V[5] ? 7.0F - : ((long) rfOut < GT_Values.V[6] + && rfOut > 32 * GregTechAPI.mEUtoRF / 100) { + float tStrength = (long) rfOut < GTValues.V[0] ? 1.0F + : ((long) rfOut < GTValues.V[1] ? 2.0F + : ((long) rfOut < GTValues.V[2] ? 3.0F + : ((long) rfOut < GTValues.V[3] ? 4.0F + : ((long) rfOut < GTValues.V[4] ? 5.0F + : ((long) rfOut < GTValues.V[4] * 2L ? 6.0F + : ((long) rfOut < GTValues.V[5] ? 7.0F + : ((long) rfOut < GTValues.V[6] ? 8.0F - : ((long) rfOut < GT_Values.V[7] + : ((long) rfOut < GTValues.V[7] ? 9.0F : 10.0F)))))))); int tX = te.xCoord; int tY = te.yCoord; int tZ = te.zCoord; World tWorld = te.getWorldObj(); - GT_Utility.sendSoundToPlayers(tWorld, GregTech_API.sSoundList.get(209), 1.0F, -1.0F, tX, tY, + GTUtility.sendSoundToPlayers(tWorld, GregTechAPI.sSoundList.get(209), 1.0F, -1.0F, tX, tY, tZ); tWorld.setBlock(tX, tY, tZ, Blocks.air); - if (GregTech_API.sMachineExplosions) { + if (GregTechAPI.sMachineExplosions) { tWorld.createExplosion(null, (double) tX + 0.5D, (double) tY + 0.5D, (double) tZ + 0.5D, tStrength, true); } diff --git a/src/main/java/reobf/proghatches/gt/cover/CircuitHolderCover.java b/src/main/java/reobf/proghatches/gt/cover/CircuitHolderCover.java index 5f8e97b..4716d17 100644 --- a/src/main/java/reobf/proghatches/gt/cover/CircuitHolderCover.java +++ b/src/main/java/reobf/proghatches/gt/cover/CircuitHolderCover.java @@ -50,23 +50,23 @@ import com.gtnewhorizons.modularui.common.widget.Scrollable; import com.gtnewhorizons.modularui.common.widget.TextWidget; -import gregtech.api.gui.modularui.GT_CoverUIBuildContext; -import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.gui.modularui.CoverUIBuildContext; +import gregtech.api.gui.modularui.GTUITextures; import gregtech.api.interfaces.IConfigurationCircuitSupport; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.ICoverable; import gregtech.api.metatileentity.BaseMetaTileEntity; import gregtech.api.metatileentity.CoverableTileEntity; -import gregtech.api.util.GT_CoverBehavior; -import gregtech.api.util.GT_CoverBehaviorBase; -import gregtech.api.util.GT_Utility; + +import gregtech.api.util.CoverBehaviorBase; +import gregtech.api.util.GTUtility; import gregtech.api.util.ISerializableObject; import gregtech.common.gui.modularui.widget.CoverDataControllerWidget; -import gregtech.common.gui.modularui.widget.CoverDataFollower_CycleButtonWidget; + import io.netty.buffer.ByteBuf; -public class CircuitHolderCover extends GT_CoverBehaviorBase{ +public class CircuitHolderCover extends CoverBehaviorBase{ public CircuitHolderCover() { super(CircuitHolderCover.Data.class); @@ -125,13 +125,13 @@ public ISerializableObject readFromPacket(ByteArrayDataInput aBuf, EntityPlayerM }} - @Override + //@Override public boolean useModularUI() { // TODO Auto-generated method stub return true; } @Override - public ModularWindow createWindow(GT_CoverUIBuildContext buildContext) { + public ModularWindow createWindow(CoverUIBuildContext buildContext) { return new CircuitHolderUIFactory(buildContext).createWindow(); } @@ -141,7 +141,7 @@ private class CircuitHolderUIFactory extends UIFactory { @Override protected void addTitleToUI(Builder builder) { - ItemStack coverItem = GT_Utility.intToStack(getUIBuildContext().getCoverID()); + ItemStack coverItem = GTUtility.intToStack(getUIBuildContext().getCoverID()); if (coverItem != null) { builder.widget( new ItemDrawable(coverItem).asWidget() @@ -156,7 +156,7 @@ protected void addTitleToUI(Builder builder) { protected int getGUIWidth() { return 176/2; } - public CircuitHolderUIFactory(GT_CoverUIBuildContext buildContext) { + public CircuitHolderUIFactory(CoverUIBuildContext buildContext) { super(buildContext); } @@ -215,7 +215,7 @@ public ItemStack[] getCircuits() { - }).setPlayClickSound(true).setBackground(GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_PLUS_LARGE) + }).setPlayClickSound(true).setBackground(GTUITextures.BUTTON_STANDARD, GTUITextures.OVERLAY_BUTTON_PLUS_LARGE) .addTooltips(ImmutableList .of(LangManager.translateToLocalFormatted("programmable_hatches.gt.holder.max", "" +damageToLimit(coveris.getItemDamage()) ))) .setSize(16, 16).setPos(3+32+16,3)); @@ -270,7 +270,7 @@ public Scrollable createSc(ItemStack is[]){ } } }); - w.setBackground(GT_UITextures.BUTTON_STANDARD,new ItemDrawable().setItem(is[fi])); + w.setBackground(GTUITextures.BUTTON_STANDARD,new ItemDrawable().setItem(is[fi])); w.setPos(16*(i%perrow), 16*(i/perrow)); sc.widget(w); diff --git a/src/main/java/reobf/proghatches/gt/cover/LastWorktimeCover.java b/src/main/java/reobf/proghatches/gt/cover/LastWorktimeCover.java index b286b65..0fcb3b7 100644 --- a/src/main/java/reobf/proghatches/gt/cover/LastWorktimeCover.java +++ b/src/main/java/reobf/proghatches/gt/cover/LastWorktimeCover.java @@ -7,25 +7,26 @@ import com.gtnewhorizons.modularui.api.screen.ModularWindow; import appeng.helpers.IPriorityHost; -import gregtech.api.gui.modularui.GT_CoverUIBuildContext; -import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.gui.modularui.CoverUIBuildContext; +import gregtech.api.gui.modularui.GTUITextures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.ICoverable; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.interfaces.tileentity.IMachineProgress; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; -import gregtech.api.util.GT_CoverBehavior; +import gregtech.api.metatileentity.implementations.MTEMultiBlockBase; +import gregtech.api.util.CoverBehavior; import gregtech.api.util.ISerializableObject; import gregtech.common.gui.modularui.widget.CoverDataControllerWidget; -import gregtech.common.gui.modularui.widget.CoverDataFollower_CycleButtonWidget; -import gregtech.common.tileentities.machines.GT_MetaTileEntity_Hatch_CraftingInput_ME; +import gregtech.common.gui.modularui.widget.CoverDataFollowerCycleButtonWidget; + +import gregtech.common.tileentities.machines.MTEHatchCraftingInputME; import net.minecraft.item.ItemStack; import net.minecraft.util.StatCollector; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.Fluid; -public class LastWorktimeCover extends GT_CoverBehavior { +public class LastWorktimeCover extends CoverBehavior { public LastWorktimeCover() { @@ -72,8 +73,8 @@ public int doCoverThings(ForgeDirection side, byte aInputRedstone, int aCoverID, if ((aTileEntity instanceof IGregTechTileEntity)) { IGregTechTileEntity mt=(IGregTechTileEntity) aTileEntity; IMetaTileEntity meta = mt.getMetaTileEntity(); - if(meta!=null&&meta instanceof GT_MetaTileEntity_MultiBlockBase){ - GT_MetaTileEntity_MultiBlockBase multi=(GT_MetaTileEntity_MultiBlockBase) meta; + if(meta!=null&&meta instanceof MTEMultiBlockBase){ + MTEMultiBlockBase multi=(MTEMultiBlockBase) meta; if(multi.getStoredFluids().isEmpty()){ ArrayList in = multi.getStoredInputs(); @@ -109,13 +110,13 @@ public int onCoverScrewdriverclick(ForgeDirection side, int aCoverID, int aCover aCoverVariable = 3; } switch (aCoverVariable) { - case 0 -> GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("018", "Normal")); + case 0 -> GTUtility.sendChatToPlayer(aPlayer, GTUtility.trans("018", "Normal")); // Progress scaled - case 1 -> GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("019", "Inverted")); + case 1 -> GTUtility.sendChatToPlayer(aPlayer, GTUtility.trans("019", "Inverted")); // ^ inverted - case 2 -> GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("020", "Ready to work")); + case 2 -> GTUtility.sendChatToPlayer(aPlayer, GTUtility.trans("020", "Ready to work")); // Not Running - case 3 -> GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("021", "Not ready to work")); + case 3 -> GTUtility.sendChatToPlayer(aPlayer, GTUtility.trans("021", "Not ready to work")); // Running } return aCoverVariable; @@ -173,13 +174,13 @@ public boolean hasCoverGUI() { return true; } - @Override + // @Override public boolean useModularUI() { return true; } @Override - public ModularWindow createWindow(GT_CoverUIBuildContext buildContext) { + public ModularWindow createWindow(CoverUIBuildContext buildContext) { return new DoesWorkUIFactory(buildContext).createWindow(); } @@ -190,7 +191,7 @@ private class DoesWorkUIFactory extends UIFactory { private static final int spaceX = 18; private static final int spaceY = 18; - public DoesWorkUIFactory(GT_CoverUIBuildContext buildContext) { + public DoesWorkUIFactory(CoverUIBuildContext buildContext) { super(buildContext); } @@ -207,23 +208,23 @@ protected void addUIWidgets(ModularWindow.Builder builder) { getNewCoverVariable(id, convert(coverData)))) .addCycleButton( 0, - new CoverDataFollower_CycleButtonWidget<>() + new CoverDataFollowerCycleButtonWidget<>() , widget -> widget.setLength(2) .addTooltip(0, StatCollector.translateToLocal("item.proghatch.cover.dedicated.3.tooltips.5sec.false")) .addTooltip(1, StatCollector.translateToLocal("item.proghatch.cover.dedicated.3.tooltips.5sec.true")) - .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_PROGRESS) + .setStaticTexture(GTUITextures.OVERLAY_BUTTON_PROGRESS) .setPos(spaceX * 0, spaceY * 0) ) .addCycleButton( 1, - new CoverDataFollower_CycleButtonWidget<>(), + new CoverDataFollowerCycleButtonWidget<>(), widget -> widget.setLength(2) .addTooltip(0, StatCollector.translateToLocal("item.proghatch.cover.dedicated.3.tooltips.inputdetect.false")) .addTooltip(1, StatCollector.translateToLocal("item.proghatch.cover.dedicated.3.tooltips.inputdetect.true")) - .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_CHECKMARK) + .setStaticTexture(GTUITextures.OVERLAY_BUTTON_CHECKMARK) .setPos(spaceX * 1, spaceY * 0)) /* .addToggleButton( 2, diff --git a/src/main/java/reobf/proghatches/gt/cover/LevelControlCover.java b/src/main/java/reobf/proghatches/gt/cover/LevelControlCover.java index 1c5d07d..30cf310 100644 --- a/src/main/java/reobf/proghatches/gt/cover/LevelControlCover.java +++ b/src/main/java/reobf/proghatches/gt/cover/LevelControlCover.java @@ -26,15 +26,15 @@ import appeng.parts.p2p.PartP2PTunnel; import appeng.util.item.AEFluidStack; import appeng.util.item.AEItemStack; -import gregtech.api.gui.modularui.GT_CoverUIBuildContext; -import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.gui.modularui.CoverUIBuildContext; +import gregtech.api.gui.modularui.GTUITextures; import gregtech.api.interfaces.covers.IControlsWorkCover; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.ICoverable; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.interfaces.tileentity.IMachineProgress; -import gregtech.api.util.GT_CoverBehaviorBase; -import gregtech.api.util.GT_Utility; +import gregtech.api.util.CoverBehaviorBase; +import gregtech.api.util.GTUtility; import gregtech.api.util.ISerializableObject; import io.netty.buffer.ByteBuf; @@ -48,12 +48,13 @@ import net.minecraft.util.StatCollector; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; import reobf.proghatches.eucrafting.AECover; import reobf.proghatches.eucrafting.AECover.Data; import reobf.proghatches.gt.metatileentity.util.polyfill.NumericWidget; -public class LevelControlCover extends GT_CoverBehaviorBase{ +public class LevelControlCover extends CoverBehaviorBase{ public LevelControlCover() { super(Data.class); @@ -63,7 +64,7 @@ public boolean hasCoverGUI() { // TODO Auto-generated method stub return true; } - @Override + //@Override public boolean useModularUI() { // TODO Auto-generated method stub return true; @@ -81,14 +82,14 @@ protected boolean onCoverRightClickImpl(ForgeDirection side, int aCoverID, Data return super.onCoverRightClickImpl(side, aCoverID, aCoverVariable, aTileEntity, aPlayer, aX, aY, aZ); } @Override -public ModularWindow createWindow(GT_CoverUIBuildContext buildContext) { +public ModularWindow createWindow(CoverUIBuildContext buildContext) { return new UIFactory(buildContext){ private ItemStack tryConvertToFluid(ItemStack is){ - FluidStack fs = GT_Utility.getFluidForFilledItem(is, true); + FluidStack fs = GTUtility.getFluidForFilledItem(is, true); if(fs!=null){ - return GT_Utility.getFluidDisplayStack(fs, false); + return GTUtility.getFluidDisplayStack(fs, false); } return null; @@ -136,15 +137,15 @@ protected void phantomClick(ClickData clickData, ItemStack cursorStack) { builder.widget(new CycleButtonWidget().setGetter(()->getCoverData().invert?1:0) .setSetter(s->getCoverData().invert=s==1).setLength(2) .setTextureGetter(s->{ - if(s==0)return GT_UITextures.OVERLAY_BUTTON_CROSS; - if(s==1)return GT_UITextures.OVERLAY_BUTTON_CHECKMARK; - return GT_UITextures.OVERLAY_BUTTON_VOID_EXCESS_ALL; + if(s==0)return GTUITextures.OVERLAY_BUTTON_CROSS; + if(s==1)return GTUITextures.OVERLAY_BUTTON_CHECKMARK; + return GTUITextures.OVERLAY_BUTTON_VOID_EXCESS_ALL; }) .addTooltip(0, StatCollector.translateToLocal("proghatches.levelcontrolcover.invert.0")) .addTooltip(1, StatCollector.translateToLocal("proghatches.levelcontrolcover.invert.1")) .setBackground(() -> { { - return new IDrawable[] { GT_UITextures.BUTTON_STANDARD, + return new IDrawable[] { GTUITextures.BUTTON_STANDARD, }; } }) @@ -154,15 +155,15 @@ protected void phantomClick(ClickData clickData, ItemStack cursorStack) { builder.widget(new CycleButtonWidget().setGetter(()->getCoverData().mode) .setSetter(s->getCoverData().mode=s).setLength(2) .setTextureGetter(s->{ - if(s==0)return GT_UITextures.OVERLAY_BUTTON_VOID_EXCESS_ITEM; - if(s==1)return GT_UITextures.OVERLAY_BUTTON_VOID_EXCESS_FLUID; - return GT_UITextures.OVERLAY_BUTTON_VOID_EXCESS_ALL; + if(s==0)return GTUITextures.OVERLAY_BUTTON_VOID_EXCESS_ITEM; + if(s==1)return GTUITextures.OVERLAY_BUTTON_VOID_EXCESS_FLUID; + return GTUITextures.OVERLAY_BUTTON_VOID_EXCESS_ALL; }) .addTooltip(0, StatCollector.translateToLocal("proghatches.amountmaintainer.phantomclick.mode.0")) .addTooltip(1, StatCollector.translateToLocal("proghatches.amountmaintainer.phantomclick.mode.1")) .setBackground(() -> { { - return new IDrawable[] { GT_UITextures.BUTTON_STANDARD, + return new IDrawable[] { GTUITextures.BUTTON_STANDARD, }; } }) @@ -178,7 +179,7 @@ protected void phantomClick(ClickData clickData, ItemStack cursorStack) { .setTextColor(Color.WHITE.normal) .setSize(60, 18) .setPos(60+18, 3+20) - .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD) + .setBackground(GTUITextures.BACKGROUND_TEXT_FIELD) .addTooltips(Arrays.asList( @@ -196,7 +197,7 @@ protected void phantomClick(ClickData clickData, ItemStack cursorStack) { public static class Data implements ISerializableObject { public AEFluidStack maybeFluid(){ if(filter[0]==null)return null; - FluidStack fs = GT_Utility.getFluidFromDisplayStack(filter[0]); + FluidStack fs = GTUtility.getFluidFromDisplayStack(filter[0]); if(fs!=null){ AEFluidStack is=AEFluidStack.create(fs); is.setStackSize(Long.MAX_VALUE); @@ -207,7 +208,7 @@ public AEFluidStack maybeFluid(){ public AEItemStack maybeItem(){ if(filter[0]==null)return null; - FluidStack fs = GT_Utility.getFluidFromDisplayStack(filter[0]); + FluidStack fs = GTUtility.getFluidFromDisplayStack(filter[0]); if(fs==null){ AEItemStack is=AEItemStack.create(filter[0]); is.setStackSize(Long.MAX_VALUE); @@ -234,8 +235,15 @@ public ISerializableObject copy() { public NBTBase saveDataToNBT() { NBTTagCompound tag=new NBTTagCompound(); if(filter[0]!=null){ + + + filter[0].writeToNBT(tag); - } + FluidStack fs = GTUtility.getFluidFromDisplayStack(filter[0]); + if(fs!=null){String name=FluidRegistry.getFluidName(fs); + tag.setString("fluid_ID_string", name);} + + } tag.setLong("a", amount); tag.setInteger("m", mode); tag.setBoolean("i", invert); @@ -268,7 +276,16 @@ public void loadDataFromNBT(NBTBase aNBT) { filter[0]=null; filter[0]=ItemStack.loadItemStackFromNBT(tag); mode =tag.getInteger("m" ); - + exit:{ + FluidStack fs = GTUtility.getFluidFromDisplayStack(filter[0]); + if(fs==null){break exit;} + String name= tag.getString("fluid_ID_string"); + if(name.isEmpty()){break exit;} + Fluid f=FluidRegistry.getFluid(name); + if(f==null){break exit;} + if(f==fs.getFluid()){break exit;} + fs=new FluidStack(f, fs.amount); + } } diff --git a/src/main/java/reobf/proghatches/gt/cover/LinkedBusSlaveCover.java b/src/main/java/reobf/proghatches/gt/cover/LinkedBusSlaveCover.java index fd4f4f8..6d5a8b6 100644 --- a/src/main/java/reobf/proghatches/gt/cover/LinkedBusSlaveCover.java +++ b/src/main/java/reobf/proghatches/gt/cover/LinkedBusSlaveCover.java @@ -2,17 +2,18 @@ import java.util.Optional; +import ggfab.mte.MTELinkedInputBus; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.ICoverable; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.util.GT_CoverBehavior; -import gregtech.api.util.GT_CoverBehaviorBase; -import net.glease.ggfab.mte.MTE_LinkedInputBus; +import gregtech.api.util.CoverBehavior; +import gregtech.api.util.CoverBehaviorBase; + import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.ForgeDirection; import reobf.proghatches.gt.metatileentity.util.IProgrammingCoverBlacklisted; -public class LinkedBusSlaveCover extends GT_CoverBehavior implements IProgrammer{ +public class LinkedBusSlaveCover extends CoverBehavior implements IProgrammer{ @Override @@ -25,8 +26,8 @@ public int getTickRate(ForgeDirection side, int aCoverID, int aCoverVariable, IC public void impl(ICoverable aTileEntity) { if(aTileEntity instanceof IGregTechTileEntity){ IMetaTileEntity x = ((IGregTechTileEntity) aTileEntity).getMetaTileEntity(); - if(x instanceof MTE_LinkedInputBus){ - MTE_LinkedInputBus bus=(MTE_LinkedInputBus) x; + if(x instanceof MTELinkedInputBus){ + MTELinkedInputBus bus=(MTELinkedInputBus) x; try{ ItemStack is=ProgrammingCover.sync(bus); bus.setInventorySlotContents(bus.getCircuitSlot(), is); @@ -42,10 +43,10 @@ public void impl(ICoverable aTileEntity) { public boolean isCoverPlaceable(ForgeDirection side, ItemStack aStack, ICoverable aTileEntity) { if (!Optional.of(aTileEntity).filter(s -> s instanceof IGregTechTileEntity) .map(s -> ((IGregTechTileEntity) s).getMetaTileEntity()) - .filter(s -> s instanceof MTE_LinkedInputBus).isPresent()) + .filter(s -> s instanceof MTELinkedInputBus).isPresent()) return false; for(ForgeDirection d: ForgeDirection.VALID_DIRECTIONS){ - GT_CoverBehaviorBase beh = aTileEntity.getCoverBehaviorAtSideNew(d); + CoverBehaviorBase beh = aTileEntity.getCoverBehaviorAtSideNew(d); if(beh!=null&&beh.getClass()==ProgrammingCover.class){return false;} } return super.isCoverPlaceable(side, aStack, aTileEntity); diff --git a/src/main/java/reobf/proghatches/gt/cover/ProgrammingCover.java b/src/main/java/reobf/proghatches/gt/cover/ProgrammingCover.java index 4f004c0..0d5ba57 100644 --- a/src/main/java/reobf/proghatches/gt/cover/ProgrammingCover.java +++ b/src/main/java/reobf/proghatches/gt/cover/ProgrammingCover.java @@ -1,6 +1,6 @@ package reobf.proghatches.gt.cover; -import net.glease.ggfab.mte.MTE_LinkedInputBus; + import net.minecraft.inventory.IInventory; import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.ItemStack; @@ -19,22 +19,23 @@ import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.ListMultimap; +import ggfab.mte.MTELinkedInputBus; import gregtech.api.interfaces.IConfigurationCircuitSupport; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.ICoverable; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.interfaces.tileentity.IMachineProgress; import gregtech.api.metatileentity.BaseTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus; -import gregtech.api.util.GT_CoverBehavior; -import gregtech.api.util.GT_CoverBehaviorBase; -import gregtech.api.util.GT_Utility; +import gregtech.api.metatileentity.implementations.MTEHatchInputBus; +import gregtech.api.util.CoverBehavior; +import gregtech.api.util.CoverBehaviorBase; +import gregtech.api.util.GTUtility; import reobf.proghatches.gt.metatileentity.util.IMultiCircuitSupport; import reobf.proghatches.gt.metatileentity.util.IProgrammingCoverBlacklisted; import reobf.proghatches.item.ItemProgrammingCircuit; import reobf.proghatches.main.MyMod; -public class ProgrammingCover extends GT_CoverBehavior implements IProgrammer { +public class ProgrammingCover extends CoverBehavior implements IProgrammer { @Override public int getTickRate(ForgeDirection side, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { @@ -80,7 +81,7 @@ public void impl(ICoverable aTileEntity) { if (((ISidedInventory) tile).decrStackSize(slot, 64).stackSize == 0) { continue; } - isa.add(GT_Utility.copyAmount(0, ItemProgrammingCircuit.getCircuit(is).orElse(null))); + isa.add(GTUtility.copyAmount(0, ItemProgrammingCircuit.getCircuit(is).orElse(null))); } @@ -124,7 +125,7 @@ public boolean isCoverPlaceable(ForgeDirection side, ItemStack aStack, ICoverabl return false; for(ForgeDirection d: ForgeDirection.VALID_DIRECTIONS){ - GT_CoverBehaviorBase beh = aTileEntity.getCoverBehaviorAtSideNew(d); + CoverBehaviorBase beh = aTileEntity.getCoverBehaviorAtSideNew(d); if(beh!=null&&beh.getClass()==LinkedBusSlaveCover.class){return false;} } @@ -137,8 +138,8 @@ public int doCoverThings(ForgeDirection side, byte aInputRedstone, int aCoverID, impl(aTileEntity); if(aTileEntity instanceof IGregTechTileEntity){ IMetaTileEntity x = ((IGregTechTileEntity) aTileEntity).getMetaTileEntity(); - if(x instanceof MTE_LinkedInputBus){ - markOrUpdate((MTE_LinkedInputBus) x); + if(x instanceof MTELinkedInputBus){ + markOrUpdate((MTELinkedInputBus) x); } } @@ -151,10 +152,10 @@ public Data(String s,ItemStack i){ str=s;circuit=i; } } - public static WeakHashMap ggfabLinkedBus=new WeakHashMap<>(); + public static WeakHashMap ggfabLinkedBus=new WeakHashMap<>(); public static void markOrUpdate( - MTE_LinkedInputBus host + MTELinkedInputBus host ){ Data bus = ggfabLinkedBus.get(host); @@ -174,7 +175,7 @@ public static void markOrUpdate( private static RuntimeException RESUABLE_EXCEPTION=new RuntimeException("",null,false,false){ private static final long serialVersionUID = 1L;}; - public static ItemStack sync(MTE_LinkedInputBus host){ + public static ItemStack sync(MTELinkedInputBus host){ String chan=ggfabGetRealChannel(host); Data data = ggfabLinkedBus.values().stream().filter(s->Objects.equals(s.str,chan)).findAny().orElse(null); if(data==null)throw RESUABLE_EXCEPTION; @@ -182,7 +183,7 @@ public static ItemStack sync(MTE_LinkedInputBus host){ } - private static String ggfabGetRealChannel(MTE_LinkedInputBus thiz) { + private static String ggfabGetRealChannel(MTELinkedInputBus thiz) { if (thiz.getChannel() == null) return null; if (thiz.isPrivate()) return thiz.getBaseMetaTileEntity().getOwnerUuid() + thiz.getChannel(); return new UUID(0, 0) + thiz.getChannel(); diff --git a/src/main/java/reobf/proghatches/gt/cover/SmartArmCover.java b/src/main/java/reobf/proghatches/gt/cover/SmartArmCover.java index 9b736b6..52e4128 100644 --- a/src/main/java/reobf/proghatches/gt/cover/SmartArmCover.java +++ b/src/main/java/reobf/proghatches/gt/cover/SmartArmCover.java @@ -34,13 +34,13 @@ import com.gtnewhorizons.modularui.common.widget.textfield.BaseTextFieldWidget; import com.gtnewhorizons.modularui.common.widget.textfield.TextFieldWidget; -import gregtech.api.gui.modularui.GT_CoverUIBuildContext; -import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.gui.modularui.CoverUIBuildContext; +import gregtech.api.gui.modularui.GTUITextures; import gregtech.api.interfaces.tileentity.ICoverable; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.util.GT_CoverBehaviorBase; +import gregtech.api.util.CoverBehaviorBase; import gregtech.api.util.ISerializableObject; -import gregtech.common.covers.redstone.GT_Cover_AdvancedRedstoneReceiverBase.GateMode; +import gregtech.common.covers.redstone.CoverAdvancedRedstoneReceiverBase.GateMode; import gregtech.common.gui.modularui.widget.CoverCycleButtonWidget; import io.netty.buffer.ByteBuf; import reobf.proghatches.gt.cover.parser.SimpleParser; @@ -50,7 +50,7 @@ import reobf.proghatches.lang.LangManager; import reobf.proghatches.util.ProghatchesUtil; -public class SmartArmCover extends GT_CoverBehaviorBase { +public class SmartArmCover extends CoverBehaviorBase { public SmartArmCover(int tier) { super(Data.class); @@ -241,7 +241,7 @@ protected ModularWindow createWindow(final EntityPlayer player) { final int HEIGHT = 16 * 2; ModularWindow.Builder builder = ModularWindow.builder(WIDTH, HEIGHT); - builder.setBackground(GT_UITextures.BACKGROUND_SINGLEBLOCK_DEFAULT); + builder.setBackground(GTUITextures.BACKGROUND_SINGLEBLOCK_DEFAULT); builder.setGuiTint(this.getUIBuildContext().getGuiColorization()); builder.setDraggable(true); builder.widget((new com.gtnewhorizons.modularui.common.widget.ButtonWidget()).setOnClick((s, b) -> { @@ -260,10 +260,10 @@ protected ModularWindow createWindow(final EntityPlayer player) { getCoverData().probe = getCoverData().probe + len; } - }).setBackground(GT_UITextures.BUTTON_STANDARD, + }).setBackground(GTUITextures.BUTTON_STANDARD, UITexture.fullImage(GregTech.ID, "blocks/iconsets/OVERLAY_PIPELINE_ITEM_SIDE_UP_DOWN") // BlockIcons.OVERLAY_PIPELINE_ITEM_SIDE_UP_DOWN, - // GT_UITextures.OVERLAY_BUTTON_ARROW_GREEN_UP + // GTUITextures.OVERLAY_BUTTON_ARROW_GREEN_UP ).setSize(16, 16) .addTooltip(LangManager.translateToLocal("programmable_hatches.cover.smart.probe.move")) @@ -288,7 +288,7 @@ protected ModularWindow createWindow(final EntityPlayer player) { //private int maxSlot; - protected ArmUIFactory(GT_CoverUIBuildContext buildContext) { + protected ArmUIFactory(CoverUIBuildContext buildContext) { super(buildContext); } @@ -310,7 +310,7 @@ protected void addUIWidgets(ModularWindow.Builder builder) { // getUIBuildContext().getTile(); widget.getContext().openSyncedWindow(77); } - }).setPlayClickSound(true).setBackground(GT_UITextures.BUTTON_STANDARD, PROBE) + }).setPlayClickSound(true).setBackground(GTUITextures.BUTTON_STANDARD, PROBE) .addTooltips(ImmutableList .of(LangManager.translateToLocalFormatted("programmable_hatches.cover.smart.probe"))) .setSize(16, 16).setPos(startX + spaceX * 6, startY + spaceY * 2)); @@ -337,8 +337,8 @@ protected void addUIWidgets(ModularWindow.Builder builder) { .setGetter(() -> getCoverData().io ? 1 : 0).setSetter(s -> getCoverData().io = s == 1).setLength(2) .setTextureGetter(i -> { if (i == 1) - return GT_UITextures.OVERLAY_BUTTON_EXPORT; - return GT_UITextures.OVERLAY_BUTTON_IMPORT; + return GTUITextures.OVERLAY_BUTTON_EXPORT; + return GTUITextures.OVERLAY_BUTTON_IMPORT; }) .addTooltip(0, LangManager.translateToLocal("programmable_hatches.cover.smart.io.false")) @@ -348,7 +348,7 @@ protected void addUIWidgets(ModularWindow.Builder builder) { ); builder.widget((new com.gtnewhorizons.modularui.common.widget.ButtonWidget()).setOnClick((s, b) -> { getCoverData().formulaprev = "\0\0\0\0"; - }).setBackground(GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_SLOT_RECYCLE) + }).setBackground(GTUITextures.BUTTON_STANDARD, GTUITextures.OVERLAY_SLOT_RECYCLE) .addTooltip(LangManager.translateToLocal("programmable_hatches.cover.smart.reset")) .setPos(startX + spaceX * 6, startY) @@ -361,8 +361,8 @@ protected void addUIWidgets(ModularWindow.Builder builder) { getCoverData().formulaprev = "\0\0\0\0"; }).setLength(2).setTextureGetter(i -> { if (i == 1) - return GT_UITextures.OVERLAY_BUTTON_EXPORT; - return GT_UITextures.OVERLAY_BUTTON_IMPORT; + return GTUITextures.OVERLAY_BUTTON_EXPORT; + return GTUITextures.OVERLAY_BUTTON_IMPORT; } ).addTooltip(0, LangManager.translateToLocal("programmable_hatches.cover.smart.mode.0")).addTooltip(1, LangManager.translateToLocal("programmable_hatches.cover.smart.mode.1")).setPos(startX, startY + spaceY)); @@ -375,8 +375,8 @@ protected void addUIWidgets(ModularWindow.Builder builder) { getCoverData().formulaprev = "~~~~~"; }).setLength(2).setTextureGetter(i -> { if (i == 1) - return GT_UITextures.OVERLAY_BUTTON_CHECKMARK; - return GT_UITextures.OVERLAY_BUTTON_CROSS; + return GTUITextures.OVERLAY_BUTTON_CHECKMARK; + return GTUITextures.OVERLAY_BUTTON_CROSS; } ).dynamicTooltip(() -> c.getState() == 0 ? Arrays.asList(LangManager.translateToLocal("programmable_hatches.cover.smart.dyn.0"), StatCollector.translateToLocal("programmable_hatches.cover.smart.dyn.shift.for.detail")) : Arrays.asList(LangManager.translateToLocal("programmable_hatches.cover.smart.dyn.1"), StatCollector.translateToLocal("programmable_hatches.cover.smart.dyn.shift.for.detail")) @@ -411,7 +411,7 @@ protected void addUIWidgets(ModularWindow.Builder builder) { .setFocusOnGuiOpen(true).setTextColor(Color.WHITE.dark(1)) - .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD.withOffset(-1, -1, 2, 2)) + .setBackground(GTUITextures.BACKGROUND_TEXT_FIELD.withOffset(-1, -1, 2, 2)) .setPos(startX + spaceX, startY + spaceY * 2).setSize(spaceX * 3, 12) ) @@ -422,8 +422,8 @@ protected void addUIWidgets(ModularWindow.Builder builder) { * o.addFollower( new CoverDataFollower_CycleButtonWidget(), * (s)->{return (s.io)?1:0;}, (b,s)->{ b.io=s==1; return b;}, widget * ->{ widget .setLength(2) .setTextureGetter( i->{ if(i==1) return - * GT_UITextures.OVERLAY__EXPORT; return - * GT_UITextures.OVERLAY_BUTTON_IMPORT; } ).addTooltip(0, + * GTUITextures.OVERLAY__EXPORT; return + * GTUITextures.OVERLAY_BUTTON_IMPORT; } ).addTooltip(0, * LangManager.translateToLocal( * "programmable_hatches.cover.smart.io.false")) * .addTooltip(1,LangManager.translateToLocal( @@ -432,8 +432,8 @@ protected void addUIWidgets(ModularWindow.Builder builder) { * CoverDataFollower_CycleButtonWidget(), (s)->{return * s.mode;}, (b,s)->{ b.mode=s; return b;}, widget ->{ widget * .setLength(2) .setTextureGetter( i->{ if(i==1) return - * GT_UITextures.OVERLAY_BUTTON_EXPORT; return - * GT_UITextures.OVERLAY_BUTTON_IMPORT; } + * GTUITextures.OVERLAY_BUTTON_EXPORT; return + * GTUITextures.OVERLAY_BUTTON_IMPORT; } * ).addTooltip(0,LangManager.translateToLocal( * "programmable_hatches.cover.smart.mode.0")) * .addTooltip(1,LangManager.translateToLocal( @@ -495,13 +495,13 @@ public boolean hasCoverGUI() { return true; } - @Override + //@Override public boolean useModularUI() { return true; } @Override - public ModularWindow createWindow(GT_CoverUIBuildContext buildContext) { + public ModularWindow createWindow(CoverUIBuildContext buildContext) { return new ArmUIFactory(buildContext).createWindow(); } @@ -515,10 +515,10 @@ protected boolean onCoverRightClickImpl(ForgeDirection side, int aCoverID, Data // not used /* if (d.dyn) { - GT_Utility.sendChatToPlayer(aPlayer, info("print.dyn")); + GTUtility.sendChatToPlayer(aPlayer, info("print.dyn")); return true; } - GT_Utility.sendChatToPlayer(aPlayer, info("mode." + d.mode)); + GTUtility.sendChatToPlayer(aPlayer, info("mode." + d.mode)); int maxslot = Integer.MAX_VALUE; TileEntity te = aTileEntity.getTileEntityAtSide(side); @@ -532,22 +532,22 @@ protected boolean onCoverRightClickImpl(ForgeDirection side, int aCoverID, Data for (int i = 0; i < d.key.length; i++) { if (d.key[i] == Integer.MIN_VALUE) { - GT_Utility.sendChatToPlayer(aPlayer, info("nyc")); + GTUtility.sendChatToPlayer(aPlayer, info("nyc")); } else if (d.value[i] == Integer.MIN_VALUE) { - GT_Utility.sendChatToPlayer(aPlayer, d.key[i] + dir + "" + info("ftc")); + GTUtility.sendChatToPlayer(aPlayer, d.key[i] + dir + "" + info("ftc")); } else // TileEntity te = aTileEntity.getTileEntityAtSide(side); if (d.value[i] >= maxslot || d.value[i] < 0) { - GT_Utility.sendChatToPlayer(aPlayer, d.key[i] + dir + "" + d.value[i] + info("oob")); + GTUtility.sendChatToPlayer(aPlayer, d.key[i] + dir + "" + d.value[i] + info("oob")); } else { - GT_Utility.sendChatToPlayer(aPlayer, d.key[i] + dir + d.value[i]); + GTUtility.sendChatToPlayer(aPlayer, d.key[i] + dir + d.value[i]); } } diff --git a/src/main/java/reobf/proghatches/gt/cover/WirelessControlCover.java b/src/main/java/reobf/proghatches/gt/cover/WirelessControlCover.java index e99158a..b007f7f 100644 --- a/src/main/java/reobf/proghatches/gt/cover/WirelessControlCover.java +++ b/src/main/java/reobf/proghatches/gt/cover/WirelessControlCover.java @@ -20,25 +20,25 @@ import com.gtnewhorizons.modularui.common.widget.textfield.BaseTextFieldWidget; import com.gtnewhorizons.modularui.common.widget.textfield.TextFieldWidget; -import gregtech.api.gui.modularui.GT_CoverUIBuildContext; -import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.gui.modularui.CoverUIBuildContext; +import gregtech.api.gui.modularui.GTUITextures; import gregtech.api.interfaces.covers.IControlsWorkCover; import gregtech.api.interfaces.tileentity.ICoverable; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.interfaces.tileentity.IMachineProgress; -import gregtech.api.util.GT_CoverBehaviorBase; +import gregtech.api.util.CoverBehaviorBase; import gregtech.api.util.ISerializableObject; -import gregtech.common.covers.redstone.GT_Cover_AdvancedRedstoneReceiverBase.GateMode; +import gregtech.common.covers.redstone.CoverAdvancedRedstoneReceiverBase.GateMode; import gregtech.common.gui.modularui.widget.CoverCycleButtonWidget; import io.netty.buffer.ByteBuf; import reobf.proghatches.lang.LangManager; import reobf.proghatches.util.ProghatchesUtil; -public class WirelessControlCover extends GT_CoverBehaviorBase +public class WirelessControlCover extends CoverBehaviorBase implements IControlsWorkCover { @Override - public ModularWindow createWindow(GT_CoverUIBuildContext buildContext) { + public ModularWindow createWindow(CoverUIBuildContext buildContext) { return new WirelessCCUIFactory(buildContext).createWindow(); } @@ -47,7 +47,7 @@ public WirelessControlCover() { } - @Override + //@Override public boolean useModularUI() { return true; @@ -93,7 +93,7 @@ public Data doCoverThingsImpl(ForgeDirection side, byte aInputRedstone, int aCov * if (!mPlayerNotified) { EntityPlayer player = lastPlayer * == null ? null : lastPlayer.get(); if (player != null) { * lastPlayer = null; mPlayerNotified = true; - * GT_Utility.sendChatToPlayer( player, + * GTUtility.sendChatToPlayer( player, * aTileEntity.getInventoryName() + "at " + String.format( * "(%d,%d,%d)", aTileEntity.getXCoord(), * aTileEntity.getYCoord(), aTileEntity.getZCoord()) + @@ -118,6 +118,7 @@ private byte getRedstone(Data d, ICoverable aTileEntity) { .getSignalAt(d.privateFreq ? (d.useMachineOwnerUUID ? (aTileEntity instanceof IGregTechTileEntity ? ((IGregTechTileEntity) aTileEntity).getOwnerUuid() : null) : d.user) : null + , (int) d.freq, GateMode.values()[d.gateMode]); } @@ -293,7 +294,7 @@ private class WirelessCCUIFactory extends UIFactory { - protected WirelessCCUIFactory(GT_CoverUIBuildContext buildContext) { + protected WirelessCCUIFactory(CoverUIBuildContext buildContext) { super(buildContext); } @@ -305,8 +306,8 @@ protected void addUIWidgets(ModularWindow.Builder builder) { .setGetter(() -> getCoverData().invert ? 1 : 0).setSetter(s -> getCoverData().invert = s == 1) .setLength(2).setTextureGetter(i -> { if (i == 1) - return GT_UITextures.OVERLAY_BUTTON_REDSTONE_OFF; - return GT_UITextures.OVERLAY_BUTTON_REDSTONE_ON; + return GTUITextures.OVERLAY_BUTTON_REDSTONE_OFF; + return GTUITextures.OVERLAY_BUTTON_REDSTONE_ON; }) .addTooltip(0, LangManager.translateToLocal("programmable_hatches.cover.wireless.invert.false")) @@ -318,8 +319,8 @@ protected void addUIWidgets(ModularWindow.Builder builder) { .setGetter(() -> getCoverData().safe ? 1 : 0).setSetter(s -> getCoverData().safe = s == 1) .setLength(2).setTextureGetter(i -> { if (i == 0) - return GT_UITextures.OVERLAY_BUTTON_CROSS; - return GT_UITextures.OVERLAY_BUTTON_CHECKMARK; + return GTUITextures.OVERLAY_BUTTON_CROSS; + return GTUITextures.OVERLAY_BUTTON_CHECKMARK; }) .addTooltip(0, LangManager.translateToLocal("programmable_hatches.cover.wireless.safe.false")) @@ -357,8 +358,8 @@ protected void addUIWidgets(ModularWindow.Builder builder) { .setGetter(() -> getCoverData().privateFreq ? 1 : 0) .setSetter(s -> getCoverData().privateFreq = s == 1).setLength(2).setTextureGetter(i -> { if (i == 1) - return GT_UITextures.OVERLAY_BUTTON_RECIPE_LOCKED; - return GT_UITextures.OVERLAY_BUTTON_RECIPE_UNLOCKED; + return GTUITextures.OVERLAY_BUTTON_RECIPE_LOCKED; + return GTUITextures.OVERLAY_BUTTON_RECIPE_UNLOCKED; }) .addTooltip(0, LangManager.translateToLocal("programmable_hatches.cover.wireless.private.false")) @@ -371,17 +372,17 @@ protected void addUIWidgets(ModularWindow.Builder builder) { .setLength(GateMode.values().length - 1).setTextureGetter(i -> { switch (i) { case 0: - return GT_UITextures.OVERLAY_BUTTON_GATE_AND; + return GTUITextures.OVERLAY_BUTTON_GATE_AND; case 1: - return GT_UITextures.OVERLAY_BUTTON_GATE_NAND; + return GTUITextures.OVERLAY_BUTTON_GATE_NAND; case 2: - return GT_UITextures.OVERLAY_BUTTON_GATE_OR; + return GTUITextures.OVERLAY_BUTTON_GATE_OR; case 3: - return GT_UITextures.OVERLAY_BUTTON_GATE_NOR; + return GTUITextures.OVERLAY_BUTTON_GATE_NOR; case 4: - return GT_UITextures.OVERLAY_BUTTON_ANALOG;// NO + return GTUITextures.OVERLAY_BUTTON_ANALOG;// NO default: - return GT_UITextures.OVERLAY_BUTTON_GATE_AND; + return GTUITextures.OVERLAY_BUTTON_GATE_AND; } }) @@ -435,7 +436,7 @@ protected void addUIWidgets(ModularWindow.Builder builder) { }).setPattern(BaseTextFieldWidget.NATURAL_NUMS).setMaxLength(50).setScrollBar().setFocusOnGuiOpen(true) .setTextColor(Color.WHITE.dark(1)) - .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD.withOffset(-1, -1, 2, 2)) + .setBackground(GTUITextures.BACKGROUND_TEXT_FIELD.withOffset(-1, -1, 2, 2)) .setPos(startX, startY + spaceY * 2).setSize(spaceX * 2 + 5, 12) ) diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/BufferedDualInputHatch.java b/src/main/java/reobf/proghatches/gt/metatileentity/BufferedDualInputHatch.java index fddbcc3..ad94b11 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/BufferedDualInputHatch.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/BufferedDualInputHatch.java @@ -91,23 +91,24 @@ import com.gtnewhorizons.modularui.common.widget.TextWidget; import appeng.api.networking.crafting.ICraftingPatternDetails; -import appeng.me.storage.DriveWatcher; + import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.SoundResource; import gregtech.api.enums.ToolDictNames; -import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.gui.modularui.GTUITextures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.BaseMetaTileEntity; import gregtech.api.metatileentity.CoverableTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; +import gregtech.api.metatileentity.implementations.MTEMultiBlockBase; import gregtech.api.recipe.check.CheckRecipeResult; -import gregtech.api.util.GT_TooltipDataCache.TooltipData; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTTooltipDataCache.TooltipData; +import gregtech.api.util.GTModHandler; +import gregtech.api.util.GTUtility; import gregtech.common.tileentities.machines.IDualInputInventory; import mcp.mobius.waila.api.IWailaConfigHandler; import mcp.mobius.waila.api.IWailaDataAccessor; @@ -248,8 +249,8 @@ public class DualInvBuffer implements IDualInputInventory { public int i; public int f; - public int ip=-1; - public int fp=-1; + //public int ip=-1; + //public int fp=-1; public boolean lock; @@ -508,7 +509,7 @@ private void programLocal() { mStoredItemInternal[i] = null; // inv0.mStoredItemInternal[inv0.mStoredItemInternal.length-1]= - isa.add(GT_Utility.copyAmount(0, ItemProgrammingCircuit.getCircuit(is).orElse(null))); + isa.add(GTUtility.copyAmount(0, ItemProgrammingCircuit.getCircuit(is).orElse(null))); } int nums = Math.min(v, isa.size()); @@ -625,7 +626,7 @@ public ItemStack[] getItemInputs() { ItemStack[] condensed = filterStack.apply(mStoredItemInternal,shared.getItems()); - if(!trunOffEnsure){condensed=ensureIntMax(condensed);} + //if(!trunOffEnsure){condensed=ensureIntMax(condensed);} @@ -638,7 +639,7 @@ public ItemStack[] getItemInputs() { @Override public FluidStack[] getFluidInputs() { FluidStack[] condensed = asFluidStack.apply(mStoredFluidInternal,shared.getFluid()); - if(!trunOffEnsure){condensed=ensureIntMax(condensed);} + //if(!trunOffEnsure){condensed=ensureIntMax(condensed);} return condensed; } @@ -835,18 +836,67 @@ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { inv0.clearRecipeIfNeeded(); } // prevdirty=dirty; + + + if(autoAppend&&allFull&&!isInputEmpty()){ + DualInvBuffer append; + inv0.add(append=new DualInvBuffer()); + append.init(this.mInventory.length - 1, this.mStoredFluid.length); + allFull=false; + }else{ + if(inv0.size()>bufferNum){ + boolean exfull=true; + for(int i=bufferNum;ibufferNum*/) + for(int i=0;i=mInventory.length)return // inv0.mStoredItemInternal[aIndex-mInventory.length]; return super.getStackInSlot(aIndex); } - + boolean allFull; /** - * non-empty one fist, then use empty one + * non-empty one fist, then append an empty one at last */ public ArrayList sortByEmpty() { ArrayList non_empty = new ArrayList<>(); @@ -857,6 +907,8 @@ public ArrayList sortByEmpty() { }); empty.opt().ifPresent(non_empty::add); + if(!empty.opt().isPresent()){ + allFull=true;} // only one empty is needed, because only one buffer at maximum will be // filled one time @@ -958,7 +1010,7 @@ private Widget createButtonBuffer(int id,int xoffset,int yoffset) { if (!widget.isClient()) widget.getContext().openSyncedWindow(BUFFER_0 + id); } - }).setPlayClickSound(true).setBackground(GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_PLUS_LARGE) + }).setPlayClickSound(true).setBackground(GTUITextures.BUTTON_STANDARD, GTUITextures.OVERLAY_BUTTON_PLUS_LARGE) .addTooltips(ImmutableList .of(LangManager.translateToLocalFormatted("programmable_hatches.gt.buffer", "" + id))) .setSize(16, 16).setPos(xoffset + 16 * (id % 3), yoffset + 16 * (id / 3)); @@ -967,8 +1019,8 @@ private Widget createButtonBuffer(int id,int xoffset,int yoffset) { * return new ButtonWidget().setOnClick((clickData, widget) -> { if * (clickData.mouseButton == 0) { widget.getContext() * .openSyncedWindow(BUFFER_0); } }) .setPlayClickSound(true) - * .setBackground(GT_UITextures.BUTTON_STANDARD, - * GT_UITextures.OVERLAY_BUTTON_PLUS_LARGE) + * .setBackground(GTUITextures.BUTTON_STANDARD, + * GTUITextures.OVERLAY_BUTTON_PLUS_LARGE) * .addTooltips(ImmutableList.of("Place manual items")) .setSize(18, 18) * .setPos(7 + offset*18, 62-18*2); */ @@ -976,7 +1028,7 @@ private Widget createButtonBuffer(int id,int xoffset,int yoffset) { /* * return new CycleButtonWidget().setToggle(getter, setter) * .setStaticTexture(picture) - * .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE) + * .setVariableBackground(GTUITextures.BUTTON_STANDARD_TOGGLE) * .setTooltipShowUpDelay(TOOLTIP_DELAY) .setPos(7 + offset*18, 62-18*2) * .setSize(18, 18) .setGTTooltip(tooltipDataSupplier); */ @@ -991,7 +1043,7 @@ protected ModularWindow createWindow(final EntityPlayer player, int index) { final int PARENT_WIDTH = getGUIWidth(); final int PARENT_HEIGHT = getGUIHeight(); ModularWindow.Builder builder = ModularWindow.builder(WIDTH, HEIGHT); - builder.setBackground(GT_UITextures.BACKGROUND_SINGLEBLOCK_DEFAULT); + builder.setBackground(GTUITextures.BACKGROUND_SINGLEBLOCK_DEFAULT); builder.setGuiTint(getGUIColorization()); builder.setDraggable(true); // make sure the manual window is within the parent window @@ -1084,8 +1136,8 @@ public List getExtraTooltip() { builder.widget(new CycleButtonWidget().setToggle(() -> !inv0.lock, (s) -> { inv0.lock = !s; inv0.clearRecipeIfNeeded(); - }).setStaticTexture(GT_UITextures.OVERLAY_BUTTON_RECIPE_LOCKED_DISABLED) - .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE).setTooltipShowUpDelay(TOOLTIP_DELAY) + }).setStaticTexture(GTUITextures.OVERLAY_BUTTON_RECIPE_LOCKED_DISABLED) + .setVariableBackground(GTUITextures.BUTTON_STANDARD_TOGGLE).setTooltipShowUpDelay(TOOLTIP_DELAY) .setPos(3 + 18 * 5, 3 + 18 * 3).setSize(18, 18) .setGTTooltip(() -> mTooltipCache.getData("programmable_hatches.gt.lockbuffer")) @@ -1162,18 +1214,20 @@ ButtonWidget createPowerSwitchButton(IWidgetBuilder builder) { }).setPlayClickSoundResource(() -> thiz.isAllowedToWork() ? SoundResource.GUI_BUTTON_UP.resourceLocation : SoundResource.GUI_BUTTON_DOWN.resourceLocation).setBackground(() -> { if (thiz.isAllowedToWork()) { - return new IDrawable[] { GT_UITextures.BUTTON_STANDARD_PRESSED, - GT_UITextures.OVERLAY_BUTTON_POWER_SWITCH_ON }; + return new IDrawable[] { GTUITextures.BUTTON_STANDARD_PRESSED, + GTUITextures.OVERLAY_BUTTON_POWER_SWITCH_ON }; } else { - return new IDrawable[] { GT_UITextures.BUTTON_STANDARD, - GT_UITextures.OVERLAY_BUTTON_POWER_SWITCH_OFF }; + return new IDrawable[] { GTUITextures.BUTTON_STANDARD, + GTUITextures.OVERLAY_BUTTON_POWER_SWITCH_OFF }; } }).attachSyncer(new FakeSyncWidget.BooleanSyncer(thiz::isAllowedToWork, val -> { if (val) thiz.enableWorking(); else thiz.disableWorking(); - }), builder).addTooltip(LangManager.translateToLocal("GT5U.gui.button.power_switch")) + }), builder) + .addTooltip(LangManager.translateToLocal("GT5U.gui.button.power_switch")) + .addTooltip(LangManager.translateToLocal("proghatch.gui.button.power_switch.ex")) .setTooltipShowUpDelay(TOOLTIP_DELAY).setPos(new Pos2d(getGUIWidth() - 18 - 3, 5)).setSize(16, 16); return (ButtonWidget) button; } @@ -1241,10 +1295,19 @@ public void onClassify() { @Override public void loadNBTData(NBTTagCompound aNBT) { if(aNBT.hasKey("x")==false)return; - dirty = aNBT.getBoolean("dirty"); - for (int i = 0; i < bufferNum; i++) { + dirty = aNBT.getBoolean("dirty"); + int iex=aNBT.getInteger("exinvlen"); + for (int i = 0; i < bufferNum+iex; i++) { final int ii = i; + if(i inventories() { public void getWailaNBTData(EntityPlayerMP player, TileEntity tile, NBTTagCompound tag, World world, int x, int y, int z) { - + tag.setInteger("exinvlen",inv0.size()-bufferNum ); tag.setBoolean("sleep", sleep); tag.setInteger("sleepTime", sleepTime); - tag.setInteger("inv_size", inv0.size()); - IntStream.range(0, inv0.size()).forEach(s -> { + tag.setInteger("inv_size", bufferNum); + IntStream.range(0, bufferNum).forEach(s -> { DualInvBuffer inv = inv0.get(s); NBTTagCompound sub = new NBTTagCompound(); tag.setTag("No" + s, sub); @@ -1631,7 +1695,8 @@ public void getWailaBody(ItemStack itemStack, List currenttip, IWailaDat ; if(idle[0]>5) currenttip.add(LangManager.translateToLocalFormatted("programmable_hatches.buffer.waila.hidden",(idle[0]-5)+"")); - + if(tag.getInteger("exinvlen")>0) + currenttip.add("Extra buffer:"+tag.getInteger("exinvlen")); } private Boolean isRemote; @@ -1672,14 +1737,14 @@ public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlaye ; } if (suc) { - GT_ModHandler.damageOrDechargeItem(tCurrentItem, 1, 1000, aPlayer); - GT_Utility.sendSoundToPlayers(tile.getWorld(), SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1, + GTModHandler.damageOrDechargeItem(tCurrentItem, 1, 1000, aPlayer); + GTUtility.sendSoundToPlayers(tile.getWorld(), SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1, tile.getXCoord(), tile.getYCoord(), tile.getZCoord()); updateEveryTick = !updateEveryTick; - GT_Utility.sendChatToPlayer(aPlayer, "updateEveryTick:" + updateEveryTick); + GTUtility.sendChatToPlayer(aPlayer, "updateEveryTick:" + updateEveryTick); /* - * GT_Utility .sendChatToPlayer(aPlayer, + * GTUtility .sendChatToPlayer(aPlayer, * LangManager.translateToLocal( * "programmable_hatches.gt.updateEveryTick") ); */ @@ -1700,12 +1765,12 @@ public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlaye ; } if (suc) { - GT_ModHandler.damageOrDechargeItem(tCurrentItem, 1, 1000, aPlayer); - GT_Utility.sendSoundToPlayers(tile.getWorld(), SoundResource.IC2_TOOLS_CHAINSAW_CHAINSAW_USE_TWO, 1.0F, -1, + GTModHandler.damageOrDechargeItem(tCurrentItem, 1, 1000, aPlayer); + GTUtility.sendSoundToPlayers(tile.getWorld(), SoundResource.IC2_TOOLS_CHAINSAW_CHAINSAW_USE_TWO, 1.0F, -1, tile.getXCoord(), tile.getYCoord(), tile.getZCoord()); /*merge = !merge; - GT_Utility.sendChatToPlayer(aPlayer, "merge:" + merge); + GTUtility.sendChatToPlayer(aPlayer, "merge:" + merge); aPlayer.addChatMessage(new ChatComponentTranslation("programmable_hatches.gt.merge")); */ @@ -1724,7 +1789,7 @@ public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlaye @Override - public CheckRecipeResult endRecipeProcessingImpl(GT_MetaTileEntity_MultiBlockBase controller) { + public CheckRecipeResult endRecipeProcessingImpl(MTEMultiBlockBase controller) { dirty = true; return super.endRecipeProcessingImpl(controller); } @@ -1786,9 +1851,35 @@ class Wrapper{ public Wrapper(DualInvBuffer s) { d=s; } - + boolean fast=true;; + private int sft(int i,int t){ + /* i=(i*17)%32; + return (i<>>(32-t));*/return i^t; + } @Override public int hashCode() { + if(fast){ + int c=0; + int hash=0; + for(int i=0;ino extra fluid + f=asFluidStack.apply(f,shared.getFluid()); } ItemStack[] i; FluidStack[] f; @@ -1909,6 +2002,8 @@ public FluidStack[] getFluidInputs() { ).iterator(); } + + static public boolean fluidEquals(FluidTank a, FluidTank b) { // if(a==b)return false; // if(a==null||b==null)return false; @@ -1928,7 +2023,7 @@ protected ModularWindow createWindowEx(final EntityPlayer player) { final int PARENT_WIDTH = getGUIWidth(); final int PARENT_HEIGHT = getGUIHeight(); ModularWindow.Builder builder = ModularWindow.builder(WIDTH, HEIGHT); - builder.setBackground(GT_UITextures.BACKGROUND_SINGLEBLOCK_DEFAULT); + builder.setBackground(GTUITextures.BACKGROUND_SINGLEBLOCK_DEFAULT); builder.setGuiTint(getGUIColorization()); builder.setDraggable(true); @@ -1939,8 +2034,8 @@ protected ModularWindow createWindowEx(final EntityPlayer player) { builder.widget(new CycleButtonWidget().setToggle(() -> updateEveryTick, (s) -> { updateEveryTick = s; - }).setStaticTexture(GT_UITextures.OVERLAY_BUTTON_CHECKMARK) - .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE).setTooltipShowUpDelay(TOOLTIP_DELAY) + }).setStaticTexture(GTUITextures.OVERLAY_BUTTON_CHECKMARK) + .setVariableBackground(GTUITextures.BUTTON_STANDARD_TOGGLE).setTooltipShowUpDelay(TOOLTIP_DELAY) .setPos(3 + 18 * 0, 3 + 18 * 0).setSize(18, 18) .setGTTooltip(() -> mTooltipCache.getData("programmable_hatches.gt.forcecheck")) @@ -1948,8 +2043,8 @@ protected ModularWindow createWindowEx(final EntityPlayer player) { /*builder.widget(new CycleButtonWidget().setToggle(() ->!trunOffEnsure , (s) -> { trunOffEnsure =! s; - }).setStaticTexture(GT_UITextures.OVERLAY_BUTTON_CHECKMARK) - .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE).setTooltipShowUpDelay(TOOLTIP_DELAY) + }).setStaticTexture(GTUITextures.OVERLAY_BUTTON_CHECKMARK) + .setVariableBackground(GTUITextures.BUTTON_STANDARD_TOGGLE).setTooltipShowUpDelay(TOOLTIP_DELAY) .setPos(3 + 18 * 1, 3 + 18 * 0).setSize(18, 18) .addTooltip(StatCollector.translateToLocal("programmable_hatches.gt.ensureintmax.0")) .addTooltip(StatCollector.translateToLocal("programmable_hatches.gt.ensureintmax.1")) @@ -1960,8 +2055,8 @@ protected ModularWindow createWindowEx(final EntityPlayer player) { builder.widget(new CycleButtonWidget().setToggle(() ->CMMode , (s) -> { CMMode = s; - }).setStaticTexture(GT_UITextures.OVERLAY_BUTTON_CHECKMARK) - .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE).setTooltipShowUpDelay(TOOLTIP_DELAY) + }).setStaticTexture(GTUITextures.OVERLAY_BUTTON_CHECKMARK) + .setVariableBackground(GTUITextures.BUTTON_STANDARD_TOGGLE).setTooltipShowUpDelay(TOOLTIP_DELAY) .setPos(3 + 18 * 1, 3 + 18 * 0).setSize(18, 18) .addTooltip(StatCollector.translateToLocal("programmable_hatches.gt.cmmode.0")) .addTooltip(StatCollector.translateToLocal("programmable_hatches.gt.cmmode.1")) @@ -1975,16 +2070,36 @@ protected ModularWindow createWindowEx(final EntityPlayer player) { builder.widget(new CycleButtonWidget().setToggle(() ->merge , (s) -> { merge = s; - }).setStaticTexture(GT_UITextures.OVERLAY_BUTTON_CHECKMARK) - .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE).setTooltipShowUpDelay(TOOLTIP_DELAY) + }).setStaticTexture(GTUITextures.OVERLAY_BUTTON_CHECKMARK) + .setVariableBackground(GTUITextures.BUTTON_STANDARD_TOGGLE).setTooltipShowUpDelay(TOOLTIP_DELAY) .setPos(3 + 18 * 2, 3 + 18 * 0).setSize(18, 18) .addTooltip(StatCollector.translateToLocal("programmable_hatches.gt.merge.0")) .addTooltip(StatCollector.translateToLocal("programmable_hatches.gt.merge.1")) ); + if(isInfBuffer()||shared.infbufUpgrades>0) + builder.widget(new CycleButtonWidget().setToggle(() ->autoAppend , (s) -> { + autoAppend = s; + + }).setStaticTexture(GTUITextures.OVERLAY_BUTTON_CHECKMARK) + .setVariableBackground(GTUITextures.BUTTON_STANDARD_TOGGLE).setTooltipShowUpDelay(TOOLTIP_DELAY) + .setPos(3 + 18 * 3, 3 + 18 * 0).setSize(18, 18) + .addTooltip(StatCollector.translateToLocal("programmable_hatches.gt.elasticbuffer.0")) + .addTooltip(StatCollector.translateToLocal("programmable_hatches.gt.elasticbuffer.1")) + .addTooltip(StatCollector.translateToLocal("programmable_hatches.gt.elasticbuffer.2")) + .addTooltip(StatCollector.translateToLocal("programmable_hatches.gt.elasticbuffer.3")) + + + + ); + + + return builder.build(); + }public boolean isInfBuffer(){ + return false; } public boolean isInputEmpty(BufferedDualInputHatch master) { diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/CommunicationPortHatch.java b/src/main/java/reobf/proghatches/gt/metatileentity/CommunicationPortHatch.java index 569cc47..cea4c3e 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/CommunicationPortHatch.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/CommunicationPortHatch.java @@ -1,13 +1,14 @@ package reobf.proghatches.gt.metatileentity; -import gregtech.api.GregTech_API; +import gregtech.api.GregTechAPI; import gregtech.api.enums.Textures; import gregtech.api.interfaces.IIconContainer; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.BaseMetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.MTEHatch; import gregtech.api.render.TextureFactory; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; @@ -15,11 +16,11 @@ import net.minecraftforge.common.util.ForgeDirection; import reobf.proghatches.main.registration.Registration; -public class CommunicationPortHatch extends GT_MetaTileEntity_Hatch{ +public class CommunicationPortHatch extends MTEHatch{ public CommunicationPortHatch(int aID, String aName, String aNameRegional, int aTier ) { super(aID, aName, aNameRegional, aTier, 0, new String[0] ); - Registration.items.add(new ItemStack(GregTech_API.sBlockMachines, 1, aID)); + Registration.items.add(new ItemStack(GregTechAPI.sBlockMachines, 1, aID)); } public CommunicationPortHatch(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { @@ -27,7 +28,7 @@ public CommunicationPortHatch(String aName, int aTier, String[] aDescription, } @Override - public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new CommunicationPortHatch(mName, mTier, mDescriptionArray, mTextures); } diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/DataHatchME.java b/src/main/java/reobf/proghatches/gt/metatileentity/DataHatchME.java index 89fc93a..8d4997b 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/DataHatchME.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/DataHatchME.java @@ -8,8 +8,6 @@ import java.util.EnumSet; import java.util.List; -import com.github.technus.tectech.thing.casing.GT_Block_CasingsTT; -import com.github.technus.tectech.util.CommonValues; import com.google.common.collect.ImmutableMap; import appeng.api.config.FuzzyMode; @@ -24,16 +22,16 @@ import appeng.me.helpers.AENetworkProxy; import appeng.me.helpers.IGridProxyable; import appeng.util.item.AEItemStack; -import gregtech.api.GregTech_API; +import gregtech.api.GregTechAPI; import gregtech.api.enums.ItemList; import gregtech.api.enums.Textures; import gregtech.api.enums.Textures.BlockIcons; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_DataAccess; +import gregtech.api.metatileentity.implementations.MTEHatchDataAccess; import gregtech.api.render.TextureFactory; -import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTUtility; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; @@ -45,12 +43,13 @@ import net.minecraftforge.fluids.FluidStack; import reobf.proghatches.gt.metatileentity.util.IMEStorageChangeAwareness; import reobf.proghatches.main.registration.Registration; +import tectech.thing.casing.BlockGTCasingsTT; -public class DataHatchME extends GT_MetaTileEntity_Hatch_DataAccess implements IPowerChannelState,IGridProxyable,IMEStorageChangeAwareness{ +public class DataHatchME extends MTEHatchDataAccess implements IPowerChannelState,IGridProxyable,IMEStorageChangeAwareness{ public DataHatchME(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional, 8); - Registration.items.add(new ItemStack(GregTech_API.sBlockMachines, 1, aID)); + Registration.items.add(new ItemStack(GregTechAPI.sBlockMachines, 1, aID)); } public DataHatchME(String aName, String[] aDescription, ITexture[][][] aTextures) { super(aName, 8, aDescription, aTextures); @@ -100,7 +99,7 @@ public AENetworkProxy getProxy() { gridProxy = new AENetworkProxy( (IGridProxyable) getBaseMetaTileEntity(), "proxy", - new ItemStack(GregTech_API.sBlockMachines,1, getBaseMetaTileEntity().getMetaTileID()), + new ItemStack(GregTechAPI.sBlockMachines,1, getBaseMetaTileEntity().getMetaTileID()), true); gridProxy.setFlags(GridFlags.REQUIRE_CHANNEL); updateValidGridProxySides(); @@ -171,7 +170,7 @@ private void updateCache() { } } -@Override +//@Override public boolean useModularUI() { return false; @@ -203,7 +202,7 @@ public void loadNBTData(NBTTagCompound aNBT) { inv=new ItemStack[aNBT.getInteger("dataStickCacheLen")]; for (int i = 0; i < c; i++) { NBTTagCompound nbtTagCompound = nbtTagList.getCompoundTagAt(i); - ItemStack fluidStack = GT_Utility.loadItem(nbtTagCompound); + ItemStack fluidStack = GTUtility.loadItem(nbtTagCompound); inv[i] = fluidStack; } } @@ -256,7 +255,7 @@ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirec if (side != aFacing) { if (textureIndex > 0) return new ITexture[] { Textures.BlockIcons.casingTexturePages[mTexturePage][texturePointer] }; - else return new ITexture[] {Textures.BlockIcons.casingTexturePages[GT_Block_CasingsTT.texturePage][1] }; + else return new ITexture[] {Textures.BlockIcons.casingTexturePages[BlockGTCasingsTT.texturePage][1] }; } else { if (textureIndex > 0) { if (aActive) @@ -264,8 +263,8 @@ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirec else return getTexturesInactive( Textures.BlockIcons.casingTexturePages[mTexturePage][texturePointer]); } else { - if (aActive) return getTexturesActive(Textures.BlockIcons.casingTexturePages[GT_Block_CasingsTT.texturePage][1]); - else return getTexturesInactive(Textures.BlockIcons.casingTexturePages[GT_Block_CasingsTT.texturePage][1]); + if (aActive) return getTexturesActive(Textures.BlockIcons.casingTexturePages[BlockGTCasingsTT.texturePage][1]); + else return getTexturesInactive(Textures.BlockIcons.casingTexturePages[BlockGTCasingsTT.texturePage][1]); } } } catch (NullPointerException npe) { diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/DecoyInputBusME.java b/src/main/java/reobf/proghatches/gt/metatileentity/DecoyInputBusME.java index 2642471..25c1fb4 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/DecoyInputBusME.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/DecoyInputBusME.java @@ -61,16 +61,16 @@ import appeng.util.item.ItemList; import appeng.util.item.MeaningfulItemIterator; import appeng.util.item.OreReference; -import gregtech.api.GregTech_API; -import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.GregTechAPI; +import gregtech.api.gui.modularui.GTUITextures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; +import gregtech.api.metatileentity.implementations.MTEMultiBlockBase; import gregtech.api.recipe.check.CheckRecipeResult; -import gregtech.api.util.GT_Config; -import gregtech.api.util.GT_Utility; -import gregtech.common.tileentities.machines.GT_MetaTileEntity_Hatch_InputBus_ME; +import gregtech.api.util.GTConfig; +import gregtech.api.util.GTUtility; +import gregtech.common.tileentities.machines.MTEHatchInputBusME; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -84,11 +84,11 @@ import reobf.proghatches.gt.metatileentity.util.IMEHatchOverrided; import reobf.proghatches.main.registration.Registration; -public class DecoyInputBusME extends GT_MetaTileEntity_Hatch_InputBus_ME implements IMEHatchOverrided,IDataCopyablePlaceHolderSuper { +public class DecoyInputBusME extends MTEHatchInputBusME implements IMEHatchOverrided,IDataCopyablePlaceHolderSuper { public DecoyInputBusME(int aID, /* boolean autoPullAvailable, */ String aName, String aNameRegional) { super(aID, /* autoPullAvailable */true, aName, aNameRegional); - Registration.items.add(new ItemStack(GregTech_API.sBlockMachines, 1, aID)); + Registration.items.add(new ItemStack(GregTechAPI.sBlockMachines, 1, aID)); desc = reobf.proghatches.main.Config.get("DIBME", ImmutableMap.of()); } @@ -349,7 +349,7 @@ private Collection findFuzzyDamage(final AEItemStack filter, final IAEItemStack currItem = iterator.next(); // if(all.findPrecise(currItem)!=null){continue;} if (currItem.getStackSize() >= minPull) { - ItemStack itemstack = GT_Utility.copyAmount(1, currItem.getItemStack()); + ItemStack itemstack = GTUtility.copyAmount(1, currItem.getItemStack()); this.mInventory[index] = itemstack; index++; } @@ -376,7 +376,7 @@ private Collection findFuzzyDamage(final AEItemStack filter, final * * while (it.hasNext() && index < 16) { IAEItemStack currItem = * it.next(); if (currItem.getStackSize() >= minPull) { ItemStack - * itemstack = GT_Utility.copyAmount(1, currItem.getItemStack()); + * itemstack = GTUtility.copyAmount(1, currItem.getItemStack()); * this.mInventory[index] = itemstack; index++; } } if(index==16)return; * if(reserveFirst&&index==0){ mInventory[0] = null; index++; * @@ -387,7 +387,7 @@ private Collection findFuzzyDamage(final AEItemStack filter, final * while (iterator.hasNext() && index < 16) { IAEItemStack currItem = * iterator.next(); if(all.findPrecise(currItem)!=null){continue;} if * (currItem.getStackSize() >= minPull) { ItemStack itemstack = - * GT_Utility.copyAmount(1, currItem.getItemStack()); + * GTUtility.copyAmount(1, currItem.getItemStack()); * this.mInventory[index] = itemstack; index++; } } for (int i = index; * i < 16; i++) { mInventory[i] = null; } * @@ -410,7 +410,7 @@ public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildCont } }).setBackground(() -> { { - return new IDrawable[] { GT_UITextures.BUTTON_STANDARD }; + return new IDrawable[] { GTUITextures.BUTTON_STANDARD }; } }).addTooltips(Arrays.asList(StatCollector.translateToLocal("proghatches.restricted.refresh.0"), StatCollector.translateToLocal("proghatches.restricted.refresh.1"))).setSize(16, 16) @@ -439,7 +439,7 @@ public void onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, f } @Override - public CheckRecipeResult endRecipeProcessing(GT_MetaTileEntity_MultiBlockBase controller) { + public CheckRecipeResult endRecipeProcessing(MTEMultiBlockBase controller) { // TODO Auto-generated method stub return super.endRecipeProcessing(controller); } diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/DecoyInputHatchME.java b/src/main/java/reobf/proghatches/gt/metatileentity/DecoyInputHatchME.java index d35461c..593d5c7 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/DecoyInputHatchME.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/DecoyInputHatchME.java @@ -47,14 +47,14 @@ import appeng.util.item.AEFluidStack; import appeng.util.item.MeaningfulFluidIterator; import appeng.util.item.MeaningfulItemIterator; -import gregtech.api.GregTech_API; -import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.GregTechAPI; +import gregtech.api.gui.modularui.GTUITextures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.util.GT_Utility; -import gregtech.common.tileentities.machines.GT_MetaTileEntity_Hatch_InputBus_ME; -import gregtech.common.tileentities.machines.GT_MetaTileEntity_Hatch_Input_ME; +import gregtech.api.util.GTUtility; +import gregtech.common.tileentities.machines.MTEHatchInputBusME; +import gregtech.common.tileentities.machines.MTEHatchInputME; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -67,11 +67,11 @@ import reobf.proghatches.gt.metatileentity.util.IMEHatchOverrided; import reobf.proghatches.main.registration.Registration; -public class DecoyInputHatchME extends GT_MetaTileEntity_Hatch_Input_ME implements IMEHatchOverrided,IDataCopyablePlaceHolderSuper{ +public class DecoyInputHatchME extends MTEHatchInputME implements IMEHatchOverrided,IDataCopyablePlaceHolderSuper{ public DecoyInputHatchME(int aID, /*boolean autoPullAvailable,*/ String aName, String aNameRegional) { super(aID, /*autoPullAvailable*/true, aName, aNameRegional); - Registration.items.add(new ItemStack(GregTech_API.sBlockMachines, 1, aID)); + Registration.items.add(new ItemStack(GregTechAPI.sBlockMachines, 1, aID)); desc=reobf.proghatches.main.Config.get("DIHME", ImmutableMap.of()); } String[] desc; @@ -325,7 +325,7 @@ private Collection findFuzzyDamage(final AEFluidStack filter, fin IAEFluidStack currItem = iterator.next(); // if(all.findPrecise(currItem)!=null){continue;} if (currItem.getStackSize() >= minPull) { - FluidStack itemstack = GT_Utility.copyAmount(1, currItem.getFluidStack()); + FluidStack itemstack = GTUtility.copyAmount(1, currItem.getFluidStack()); this.storedFluids[index] = itemstack; index++; } @@ -359,7 +359,7 @@ private Collection findFuzzyDamage(final AEFluidStack filter, fin while (it.hasNext() && index < 16) { IAEFluidStack currItem = it.next(); if (currItem.getStackSize() >= minPull) { - FluidStack itemstack = GT_Utility.copyAmount(1, currItem.getFluidStack()); + FluidStack itemstack = GTUtility.copyAmount(1, currItem.getFluidStack()); this.storedFluids[index] = itemstack; index++; } @@ -379,7 +379,7 @@ private Collection findFuzzyDamage(final AEFluidStack filter, fin IAEFluidStack currItem = iterator.next(); if(all.findPrecise(currItem)!=null){continue;} if (currItem.getStackSize() >= minPull) { - FluidStack itemstack = GT_Utility.copyAmount(1, currItem.getFluidStack()); + FluidStack itemstack = GTUtility.copyAmount(1, currItem.getFluidStack()); this.storedFluids[index] = itemstack; index++; } @@ -410,7 +410,7 @@ public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildCont .setBackground(() -> { { return new IDrawable[] { - GT_UITextures.BUTTON_STANDARD + GTUITextures.BUTTON_STANDARD }; } }) diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHachOC.java b/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHachOC.java index 69dc5bd..61f0e38 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHachOC.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHachOC.java @@ -51,14 +51,14 @@ import appeng.util.item.AEItemStack; import appeng.util.item.AEStack; import cpw.mods.fml.common.registry.GameRegistry; -import gregtech.api.GregTech_API; +import gregtech.api.GregTechAPI; import gregtech.api.enums.Textures; import gregtech.api.enums.Textures.BlockIcons; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.render.TextureFactory; -import gregtech.api.util.GT_Util; -import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTUtil; +import gregtech.api.util.GTUtility; import gregtech.common.tileentities.machines.IDualInputInventory; import li.cil.oc.OpenComputers; import li.cil.oc.api.machine.Arguments; @@ -271,7 +271,7 @@ public AENetworkProxy getProxy() { if (gridProxy == null) { gridProxy = new AENetworkProxy(this, "proxy", - new ItemStack(GregTech_API.sBlockMachines, 1, this.getBaseMetaTileEntity().getMetaTileID()), true); + new ItemStack(GregTechAPI.sBlockMachines, 1, this.getBaseMetaTileEntity().getMetaTileID()), true); gridProxy.setFlags(GridFlags.REQUIRE_CHANNEL); updateValidGridProxySides(); if (getBaseMetaTileEntity().getWorld() != null) @@ -417,7 +417,7 @@ public void validate(Node n,Task task){ if(itemtype){ - FluidStack fs = GT_Utility.getFluidForFilledItem(is, true); + FluidStack fs = GTUtility.getFluidForFilledItem(is, true); if(fs==null){ task.state=4;return; } diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatch.java b/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatch.java index 085b836..02ce905 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatch.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatch.java @@ -115,11 +115,11 @@ import appeng.util.item.AEFluidStack; import appeng.util.item.AEItemStack; import appeng.util.item.AEStack; -import gregtech.api.GregTech_API; +import gregtech.api.GregTechAPI; import gregtech.api.enums.ItemList; import gregtech.api.enums.SoundResource; import gregtech.api.enums.Textures; -import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.gui.modularui.GTUITextures; import gregtech.api.interfaces.IConfigurationCircuitSupport; import gregtech.api.interfaces.IIconContainer; import gregtech.api.interfaces.ITexture; @@ -127,16 +127,16 @@ import gregtech.api.interfaces.modularui.IAddUIWidgets; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; +import gregtech.api.metatileentity.implementations.MTEHatchInputBus; +import gregtech.api.metatileentity.implementations.MTEMultiBlockBase; import gregtech.api.recipe.RecipeMap; import gregtech.api.recipe.check.CheckRecipeResult; import gregtech.api.recipe.check.CheckRecipeResultRegistry; import gregtech.api.render.TextureFactory; -import gregtech.api.util.GT_TooltipDataCache; -import gregtech.api.util.GT_Utility; -import gregtech.api.util.GT_Utility.ItemId; -import gregtech.api.util.GT_TooltipDataCache.TooltipData; +import gregtech.api.util.GTTooltipDataCache; +import gregtech.api.util.GTUtility; +import gregtech.api.util.GTUtility.ItemId; +import gregtech.api.util.GTTooltipDataCache.TooltipData; import gregtech.api.util.shutdown.ShutDownReasonRegistry; import gregtech.common.tileentities.machines.IDualInputHatch; import gregtech.common.tileentities.machines.IDualInputInventory; @@ -159,7 +159,7 @@ * @author zyf * */ -public class DualInputHatch extends GT_MetaTileEntity_Hatch_InputBus +public class DualInputHatch extends MTEHatchInputBus implements IConfigurationCircuitSupport, IAddGregtechLogo, IAddUIWidgets, IDualInputHatch, IProgrammingCoverBlacklisted, IRecipeProcessingAwareDualHatch,ISkipStackSizeCheck,IOnFillCallback/*,IMultiCircuitSupport*/ { @@ -190,7 +190,7 @@ public DualInputHatch(int id, String name, String nameRegional, int tier, boolea if(!extraCircuit){throw new RuntimeException("wrong ctr!");} //this.extraCircuit=true; this.disableSort = true; - Registration.items.add(new ItemStack(GregTech_API.sBlockMachines, 1, id)); + Registration.items.add(new ItemStack(GregTechAPI.sBlockMachines, 1, id)); this.mMultiFluid = mMultiFluid; initTierBasedField(); }*/ @@ -211,7 +211,7 @@ public DualInputHatch(int id, String name, String nameRegional, int tier, int sl ); this.disableSort = true; - Registration.items.add(new ItemStack(GregTech_API.sBlockMachines, 1, id)); + Registration.items.add(new ItemStack(GregTechAPI.sBlockMachines, 1, id)); this.mMultiFluid = mMultiFluid; initTierBasedField(); @@ -311,7 +311,7 @@ public ItemStack loadItemStackFromNBT(NBTTagCompound tag) { @Override public void saveNBTData(NBTTagCompound aNBT) { super.saveNBTData(aNBT); - aNBT.setBoolean("trunOffEnsure",trunOffEnsure); + //aNBT.setBoolean("trunOffEnsure",trunOffEnsure); aNBT.setTag("shared", shared.ser()); aNBT.setInteger("fluidLimit", fluidLimit); aNBT.setBoolean("program", program); @@ -355,7 +355,7 @@ public void loadNBTData(NBTTagCompound aNBT) { if(aNBT.hasKey("x")==false)return; super.loadNBTData(aNBT); if(aNBT.hasKey("trunOffEnsure")) - trunOffEnsure=aNBT.getBoolean("trunOffEnsure"); + //trunOffEnsure=aNBT.getBoolean("trunOffEnsure"); shared.deser(aNBT.getCompoundTag("shared")); fluidLimit= aNBT.getInteger("fluidLimit"); program = aNBT.getBoolean("program"); @@ -404,23 +404,23 @@ private CycleButtonWidget createButton(Supplier getter, IntConsumer set return (CycleButtonWidget) new CycleButtonWidget().setLength(len).setGetter(getter).setSetter(s->setter.accept(s)) .setTextureGetter(picture) - .setBackground(GT_UITextures.BUTTON_STANDARD).setTooltipShowUpDelay(TOOLTIP_DELAY) + .setBackground(GTUITextures.BUTTON_STANDARD).setTooltipShowUpDelay(TOOLTIP_DELAY) .setPos(7 + offset * 18, 62).setSize(18, 18).addTooltips(tooltip); } private Widget createButton(Supplier getter, Consumer setter, UITexture picture, - Supplier tooltipDataSupplier, int offset) { + Supplier tooltipDataSupplier, int offset) { return new CycleButtonWidget().setToggle(getter, setter).setStaticTexture(picture) - .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE).setTooltipShowUpDelay(TOOLTIP_DELAY) + .setVariableBackground(GTUITextures.BUTTON_STANDARD_TOGGLE).setTooltipShowUpDelay(TOOLTIP_DELAY) .setPos(7 + offset * 18, 62).setSize(18, 18).setGTTooltip(tooltipDataSupplier); } private Widget createButton(Supplier getter, Consumer setter, UITexture picture, List tooltip, int offset) { return new CycleButtonWidget().setToggle(getter, setter).setStaticTexture(picture) - .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE).setTooltipShowUpDelay(TOOLTIP_DELAY) + .setVariableBackground(GTUITextures.BUTTON_STANDARD_TOGGLE).setTooltipShowUpDelay(TOOLTIP_DELAY) .setPos(7 + offset * 18, 62).setSize(18, 18).addTooltips(tooltip); } private Widget createButtonForbidden(Supplier getter, Consumer setter, UITexture picture, - Supplier tooltipDataSupplier, int offset) { + Supplier tooltipDataSupplier, int offset) { return new CycleButtonWidget() { public com.gtnewhorizons.modularui.api.widget.Interactable.ClickResult onClick(int buttonId, @@ -430,11 +430,11 @@ public com.gtnewhorizons.modularui.api.widget.Interactable.ClickResult onClick(i }.setTextureGetter(s -> IDrawable.EMPTY).setToggle(getter, setter) // .setStaticTexture(picture) - .setBackground(GT_UITextures.BUTTON_STANDARD_PRESSED, picture, GT_UITextures.OVERLAY_BUTTON_FORBIDDEN) + .setBackground(GTUITextures.BUTTON_STANDARD_PRESSED, picture, GTUITextures.OVERLAY_BUTTON_FORBIDDEN) .setTooltipShowUpDelay(TOOLTIP_DELAY).setPos(7 + offset * 18, 62).setSize(18, 18) .setGTTooltip(tooltipDataSupplier) - // .setfo(GT_UITextures.OVERLAY_BUTTON_FORBIDDEN) + // .setfo(GTUITextures.OVERLAY_BUTTON_FORBIDDEN) ; } @@ -456,10 +456,10 @@ public int moveButtons() { private static final String ONE_STACK_LIMIT_TOOLTIP = "GT5U.machines.one_stack_limit.tooltip"; private static final int BUTTON_SIZE = 18; private Widget createToggleButton(Supplier getter, Consumer setter, UITexture picture, - Supplier tooltipDataSupplier,int uiButtonCount) { + Supplier tooltipDataSupplier,int uiButtonCount) { return new CycleButtonWidget().setToggle(getter, setter) .setStaticTexture(picture) - .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE) + .setVariableBackground(GTUITextures.BUTTON_STANDARD_TOGGLE) .setTooltipShowUpDelay(TOOLTIP_DELAY) .setPos(7 + (uiButtonCount * BUTTON_SIZE), 62) .setSize(BUTTON_SIZE, BUTTON_SIZE) @@ -470,7 +470,7 @@ private void addSortStacksButton(ModularWindow.Builder builder) { createToggleButton( () -> !disableSort, val -> disableSort = !val, - GT_UITextures.OVERLAY_BUTTON_SORTING_MODE, + GTUITextures.OVERLAY_BUTTON_SORTING_MODE, () -> mTooltipCache.getData(SORTING_MODE_TOOLTIP),0)); } @@ -478,7 +478,7 @@ private void addOneStackLimitButton(ModularWindow.Builder builder) { builder.widget(createToggleButton(() -> !disableLimited, val -> { disableLimited = !val; updateSlots(); - }, GT_UITextures.OVERLAY_BUTTON_ONE_STACK_LIMIT, () -> mTooltipCache.getData(ONE_STACK_LIMIT_TOOLTIP),1)); + }, GTUITextures.OVERLAY_BUTTON_ONE_STACK_LIMIT, () -> mTooltipCache.getData(ONE_STACK_LIMIT_TOOLTIP),1)); } boolean createInsertion(){return true;} @@ -531,20 +531,20 @@ public void addUIWidgets(Builder builder, UIBuildContext buildContext) { builder.widget(createButton(() -> !disableFilter, val -> { disableFilter = !val; updateSlots(); - }, GT_UITextures.OVERLAY_BUTTON_INVERT_FILTER, + }, GTUITextures.OVERLAY_BUTTON_INVERT_FILTER, () -> mTooltipCache.getData("programmable_hatches.gt.filtermode"), 0).setPos(7, 62 - moveButtons() * 18)); builder.widget(createButton(() -> program, val -> { program = val; updateSlots(); - }, GT_UITextures.OVERLAY_SLOT_CIRCUIT, () -> mTooltipCache.getData("programmable_hatches.gt.program"), 0) + }, GTUITextures.OVERLAY_SLOT_CIRCUIT, () -> mTooltipCache.getData("programmable_hatches.gt.program"), 0) .setPos(7, 62 - 18 - moveButtons() * 18)); builder.widget(createButtonForbidden(() -> true, val -> { ; updateSlots(); - }, GT_UITextures.OVERLAY_BUTTON_INPUT_SEPARATION_ON_DISABLED, + }, GTUITextures.OVERLAY_BUTTON_INPUT_SEPARATION_ON_DISABLED, () -> mTooltipCache.getData("programmable_hatches.gt.separate"), 1).setPos(7 + 1 * 18, 62 - moveButtons() * 18)); if(mMultiFluid==true&&showFluidLimit()) @@ -682,9 +682,9 @@ protected void phantomClick(ClickData clickData, ItemStack cursorStack) { } } else { final List tCircuits =DualInputHatch.this.getConfigurationCircuits(); - final int index = GT_Utility.findMatchingStackInList(tCircuits, cursorStack); + final int index = GTUtility.findMatchingStackInList(tCircuits, cursorStack); if (index < 0) { - int curIndex = GT_Utility.findMatchingStackInList(tCircuits, inventory.getStackInSlot(slot)) + int curIndex = GTUtility.findMatchingStackInList(tCircuits, inventory.getStackInSlot(slot)) + 1; if (clickData.mouseButton == 0) { curIndex += 1; @@ -698,7 +698,7 @@ protected void phantomClick(ClickData clickData, ItemStack cursorStack) { newCircuit = tCircuits.get(index); } } - inventory.setStackInSlot(slot, GT_Utility.copyAmount(0, newCircuit)); + inventory.setStackInSlot(slot, GTUtility.copyAmount(0, newCircuit)); } @@ -717,14 +717,14 @@ public List getExtraTooltip() { || line.contains(LangManager.translateToLocal("gt.integrated_circuit.tooltip.1"))); return list; }).disableShiftInsert().setHandlePhantomActionClient(true).setGTTooltip(() -> new TooltipData(tooltip, tooltip)) - .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_INT_CIRCUIT); + .setBackground(getGUITextureSet().getItemSlot(), GTUITextures.OVERLAY_SLOT_INT_CIRCUIT); } private ModularWindow createSharedItemWindow(UIBuildContext buildContext) { ModularWindow.Builder builder = ModularWindow.builder(36+18*3, 36+18*4); - builder.setBackground(GT_UITextures.BACKGROUND_SINGLEBLOCK_DEFAULT); + builder.setBackground(GTUITextures.BACKGROUND_SINGLEBLOCK_DEFAULT); builder.setGuiTint(getGUIColorization()); builder.setDraggable(true); @@ -974,14 +974,14 @@ public boolean isEmpty() { @Override public ItemStack[] getItemInputs() { ItemStack[] is=dualItem(); - if(!trunOffEnsure){is=ensureIntMax(is);} + //if(!trunOffEnsure){is=ensureIntMax(is);} return is; } @Override public FluidStack[] getFluidInputs() { FluidStack[] is=dualFluid(); - if(!trunOffEnsure){is=ensureIntMax(is);} + //if(!trunOffEnsure){is=ensureIntMax(is);} return is; } } @@ -1051,7 +1051,7 @@ public int compareTo(Source o) { return ret; } - boolean trunOffEnsure=true; + //boolean trunOffEnsure=true; static public FluidStack[] ensureIntMax(FluidStack[] in) { class Source implements Comparable{ int num; @@ -1298,7 +1298,7 @@ public void program() { if (decrStackSize(slot, 64).stackSize == 0) { continue; } - isa.add(GT_Utility.copyAmount(0, ItemProgrammingCircuit.getCircuit(is).orElse(null))); + isa.add(GTUtility.copyAmount(0, ItemProgrammingCircuit.getCircuit(is).orElse(null))); } @@ -1340,7 +1340,7 @@ public void program() { if (((ISidedInventory) tile).decrStackSize(slot, 64).stackSize == 0) { continue; } - isa.add(GT_Utility.copyAmount(0, ItemProgrammingCircuit.getCircuit(is).orElse(null))); + isa.add(GTUtility.copyAmount(0, ItemProgrammingCircuit.getCircuit(is).orElse(null))); } @@ -1575,7 +1575,7 @@ public boolean isFluidInputAllowed(FluidStack aFluid) { * @Override public void onScrewdriverRightClick(ForgeDirection side, * EntityPlayer aPlayer, float aX, float aY, float aZ) { boolean * prev=disableFilter; super.onScrewdriverRightClick(side, aPlayer, aX, aY, - * aZ); if(prev==true&&disableFilter==false){ GT_Utility + * aZ); if(prev==true&&disableFilter==false){ GTUtility * .sendChatToPlayer(aPlayer, defaultName( * "Filter mode of this hatch might not work well", "过滤模式可能无法正常生效") ); } } */ @@ -1707,23 +1707,23 @@ public void updateSlots() { protected void fillStacksIntoFirstSlots() { final int L = mInventory.length - 1; - HashMap slots = new HashMap<>(L); - HashMap stacks = new HashMap<>(L); - List order = new ArrayList<>(L); + HashMap slots = new HashMap<>(L); + HashMap stacks = new HashMap<>(L); + List order = new ArrayList<>(L); List validSlots = new ArrayList<>(L); for (int i = 0; i < L; i++) { if (!isValidSlot(i)) continue; validSlots.add(i); ItemStack s = mInventory[i]; if (s == null) continue; - GT_Utility.ItemId sID = GT_Utility.ItemId.createNoCopy(s); + GTUtility.ItemId sID = GTUtility.ItemId.createNoCopy(s); slots.merge(sID, s.stackSize, Integer::sum); if (!stacks.containsKey(sID)) stacks.put(sID, s); order.add(sID); mInventory[i] = null; } int slotindex = 0; - for (GT_Utility.ItemId sID : order) { + for (GTUtility.ItemId sID : order) { int toSet = slots.get(sID); if (toSet == 0) continue; int slot = validSlots.get(slotindex); @@ -1738,23 +1738,23 @@ protected void fillStacksIntoFirstSlots() { /*private void fillStacksIntoFirstSlotsExtraCircuit() { final int L = mInventory.length - 4; - HashMap slots = new HashMap<>(L); - HashMap stacks = new HashMap<>(L); - List order = new ArrayList<>(L); + HashMap slots = new HashMap<>(L); + HashMap stacks = new HashMap<>(L); + List order = new ArrayList<>(L); List validSlots = new ArrayList<>(L); for (int i = 0; i < L; i++) { if (!isValidSlot(i)) continue; validSlots.add(i); ItemStack s = mInventory[i]; if (s == null) continue; - GT_Utility.ItemId sID = GT_Utility.ItemId.createNoCopy(s); + GTUtility.ItemId sID = GTUtility.ItemId.createNoCopy(s); slots.merge(sID, s.stackSize, Integer::sum); if (!stacks.containsKey(sID)) stacks.put(sID, s); order.add(sID); mInventory[i] = null; } int slotindex = 0; - for (GT_Utility.ItemId sID : order) { + for (GTUtility.ItemId sID : order) { int toSet = slots.get(sID); if (toSet == 0) continue; int slot = validSlots.get(slotindex); @@ -1768,7 +1768,7 @@ protected void fillStacksIntoFirstSlots() { }*/ CheckRecipeResult lastresult; @Override - public final CheckRecipeResult endRecipeProcessing(GT_MetaTileEntity_MultiBlockBase controller) { + public final CheckRecipeResult endRecipeProcessing(MTEMultiBlockBase controller) { if(recipe){recipe=false; @@ -1780,7 +1780,7 @@ public final CheckRecipeResult endRecipeProcessing(GT_MetaTileEntity_MultiBlock return lastresult; } - public CheckRecipeResult endRecipeProcessingImpl(GT_MetaTileEntity_MultiBlockBase controller) { + public CheckRecipeResult endRecipeProcessingImpl(MTEMultiBlockBase controller) { this.markDirty(); updateSlots(); boolean success=shared.endRecipeProcessing(controller); @@ -1896,7 +1896,7 @@ protected ModularWindow createInsertionWindow(UIBuildContext buildContext) { final int WIDTH = 18 * len + 6; final int HEIGHT = 18 * (len+1) + 6; ModularWindow.Builder builder = ModularWindow.builder(WIDTH, HEIGHT); - builder.setBackground(GT_UITextures.BACKGROUND_SINGLEBLOCK_DEFAULT); + builder.setBackground(GTUITextures.BACKGROUND_SINGLEBLOCK_DEFAULT); builder.setGuiTint(getGUIColorization()); builder.setDraggable(true); @@ -2011,10 +2011,10 @@ public void readOnServer(int id, PacketBuffer buf) throws IOException { protected Widget createButtonSharedItem() { return new ButtonWidget(){{this.setTicker(s->{ - setBackground(GT_UITextures.BUTTON_STANDARD, + setBackground(GTUITextures.BUTTON_STANDARD, mInventory[getCircuitSlot()]==null? - GT_UITextures.OVERLAY_SLOT_CIRCUIT + GTUITextures.OVERLAY_SLOT_CIRCUIT : new ItemDrawable( @@ -2030,7 +2030,7 @@ protected Widget createButtonSharedItem() { widget.getContext().openSyncedWindow(SHARED_ITEM); } }).setPlayClickSound(true) - .setBackground(GT_UITextures.BUTTON_STANDARD, new ItemDrawable(new ItemStack(Blocks.hopper))) + .setBackground(GTUITextures.BUTTON_STANDARD, new ItemDrawable(new ItemStack(Blocks.hopper))) .setEnabled(s -> { return !s.getContext().isWindowOpen(SHARED_ITEM); @@ -2062,7 +2062,7 @@ protected Widget createButtonInsertion() { widget.getContext().openSyncedWindow(INSERTION); } }).setPlayClickSound(true) - .setBackground(GT_UITextures.BUTTON_STANDARD, new ItemDrawable(new ItemStack(Blocks.hopper))) + .setBackground(GTUITextures.BUTTON_STANDARD, new ItemDrawable(new ItemStack(Blocks.hopper))) .setEnabled(s -> { return !s.getContext().isWindowOpen(INSERTION); @@ -2140,7 +2140,7 @@ public FluidStackTank createTankForFluidStack( int slotIndex, int capacity) { markedFluid.set(slotIndex, stack); }, capacity); } - public boolean endRecipeProcessing(GT_MetaTileEntity_MultiBlockBase controller) { + public boolean endRecipeProcessing(MTEMultiBlockBase controller) { if(isDummy())return true; boolean storageMissing=false; Net net = getNetwork(); @@ -2339,7 +2339,7 @@ public FluidStack[] getFluid(){ public int circuitUpgrades; public int itemMEUpgrades; public int fluidMEUpgrades; - + public int infbufUpgrades; public ArrayList circuitInv=new ArrayList<>(); public void clearCircuit() { mInventory[getCircuitSlot()]=null; @@ -2359,6 +2359,7 @@ public NBTTagCompound ser(){ tag.setInteger("circuitUpgrades", circuitUpgrades); tag.setInteger("itemMEUpgrades", itemMEUpgrades); tag.setInteger("fluidMEUpgrades", fluidMEUpgrades); + tag.setInteger("infbufUpgrades", infbufUpgrades); tag.setTag("circuitInv", serList(circuitInv)); tag.setTag("markedItems", serList(markedItems)); tag.setTag("markedFluid", serListF(markedFluid)); @@ -2368,6 +2369,7 @@ public void deser(NBTTagCompound tag){ circuitUpgrades=tag.getInteger("circuitUpgrades"); itemMEUpgrades=tag.getInteger("itemMEUpgrades"); fluidMEUpgrades=tag.getInteger("fluidMEUpgrades"); + infbufUpgrades=tag.getInteger("infbufUpgrades"); circuitInv=deserList(tag.getCompoundTag("circuitInv")); markedItems=deserList(tag.getCompoundTag("markedItems")); markedFluid=deserListF(tag.getCompoundTag("markedFluid")); @@ -2408,7 +2410,15 @@ public void install(ItemStack heldItem) { } } - + if(damage==3){ + if(infbufUpgrades<1){ + + infbufUpgrades++; + heldItem.stackSize--; + successInstall(); + + } + } @@ -2416,7 +2426,7 @@ public void install(ItemStack heldItem) { @SuppressWarnings("unchecked") public void successInstall(){ reinit(); - GT_Utility.sendSoundToPlayers(getBaseMetaTileEntity().getWorld(), SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1, + GTUtility.sendSoundToPlayers(getBaseMetaTileEntity().getWorld(), SoundResource.IC2_TOOLS_WRENCH, 1.0F, -1, getBaseMetaTileEntity().getXCoord(),getBaseMetaTileEntity().getYCoord(),getBaseMetaTileEntity().getZCoord()); //close all GUIs of this hatch, because they have to be re-generated with new context try{ diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatchInventoryMappingSlave.java b/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatchInventoryMappingSlave.java index a84b447..82c536f 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatchInventoryMappingSlave.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatchInventoryMappingSlave.java @@ -9,15 +9,15 @@ import appeng.api.networking.crafting.ICraftingMedium; import appeng.helpers.ICustomNameObject; -import gregtech.api.GregTech_API; +import gregtech.api.GregTechAPI; import gregtech.api.enums.ItemList; import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock; +import gregtech.api.metatileentity.implementations.MTEHatchInputBus; +import gregtech.api.metatileentity.implementations.MTETieredMachineBlock; import gregtech.api.render.TextureFactory; import gregtech.common.tileentities.machines.IDualInputHatch; import mcp.mobius.waila.api.IWailaConfigHandler; @@ -44,7 +44,7 @@ import reobf.proghatches.main.registration.Registration; public class DualInputHatchInventoryMappingSlave -extends GT_MetaTileEntity_TieredMachineBlock implements ISkipStackSizeCheck,IDataCopyablePlaceHolder{ +extends MTETieredMachineBlock implements ISkipStackSizeCheck,IDataCopyablePlaceHolder{ private T master; // use getMaster() to access private int masterX, masterY, masterZ; private boolean masterSet = false; // indicate if values of masterX, @@ -56,7 +56,7 @@ public DualInputHatchInventoryMappingSlave(int aID, String aName, String aNameRe Config.get("DIHIMS", ImmutableMap.of())); - Registration.items.add(new ItemStack(GregTech_API.sBlockMachines, 1, aID)); + Registration.items.add(new ItemStack(GregTechAPI.sBlockMachines, 1, aID)); } public DualInputHatchInventoryMappingSlave(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) { diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatchSlave.java b/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatchSlave.java index 39f05bc..1ec614d 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatchSlave.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatchSlave.java @@ -26,18 +26,18 @@ import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; -import gregtech.api.GregTech_API; +import gregtech.api.GregTechAPI; import gregtech.api.enums.ItemList; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; +import gregtech.api.metatileentity.implementations.MTEHatchInputBus; +import gregtech.api.metatileentity.implementations.MTEMultiBlockBase; import gregtech.api.recipe.check.CheckRecipeResult; import gregtech.api.recipe.check.CheckRecipeResultRegistry; import gregtech.api.render.TextureFactory; -import gregtech.common.tileentities.machines.GT_MetaTileEntity_Hatch_CraftingInput_ME; +import gregtech.common.tileentities.machines.MTEHatchCraftingInputME; import gregtech.common.tileentities.machines.IDualInputHatch; import gregtech.common.tileentities.machines.IDualInputInventory; import mcp.mobius.waila.api.IWailaConfigHandler; @@ -46,7 +46,7 @@ import reobf.proghatches.gt.metatileentity.util.IRecipeProcessingAwareDualHatch; import reobf.proghatches.main.registration.Registration; -public class DualInputHatchSlave extends GT_MetaTileEntity_Hatch_InputBus +public class DualInputHatchSlave extends MTEHatchInputBus implements IDualInputHatch , IRecipeProcessingAwareDualHatch,IDataCopyablePlaceHolder { private T master; // use getMaster() to access @@ -58,7 +58,7 @@ public DualInputHatchSlave(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional, 6, 0, reobf.proghatches.main.Config.get("DHS", ImmutableMap.of()) ); - Registration.items.add(new ItemStack(GregTech_API.sBlockMachines, 1, aID)); + Registration.items.add(new ItemStack(GregTechAPI.sBlockMachines, 1, aID)); disableSort = true; } @@ -308,7 +308,7 @@ public void startRecipeProcessing() { } @Override - public CheckRecipeResult endRecipeProcessing(GT_MetaTileEntity_MultiBlockBase controller) { + public CheckRecipeResult endRecipeProcessing(MTEMultiBlockBase controller) { if(getMaster() != null) if(getMaster() instanceof IRecipeProcessingAwareDualHatch) return ((IRecipeProcessingAwareDualHatch)getMaster()).endRecipeProcessing(controller); diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatchSlaveBus.java b/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatchSlaveBus.java index 96eeb49..37f51d4 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatchSlaveBus.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatchSlaveBus.java @@ -26,18 +26,18 @@ import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; -import gregtech.api.GregTech_API; +import gregtech.api.GregTechAPI; import gregtech.api.enums.ItemList; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; +import gregtech.api.metatileentity.implementations.MTEHatchInputBus; +import gregtech.api.metatileentity.implementations.MTEMultiBlockBase; import gregtech.api.recipe.check.CheckRecipeResult; import gregtech.api.recipe.check.CheckRecipeResultRegistry; import gregtech.api.render.TextureFactory; -import gregtech.common.tileentities.machines.GT_MetaTileEntity_Hatch_CraftingInput_ME; +import gregtech.common.tileentities.machines.MTEHatchCraftingInputME; import gregtech.common.tileentities.machines.IDualInputHatch; import gregtech.common.tileentities.machines.IDualInputInventory; import gregtech.common.tileentities.machines.IRecipeProcessingAwareHatch; @@ -47,7 +47,7 @@ import reobf.proghatches.gt.metatileentity.util.IRecipeProcessingAwareDualHatch; import reobf.proghatches.main.registration.Registration; -public class DualInputHatchSlaveBus extends GT_MetaTileEntity_Hatch_InputBus +public class DualInputHatchSlaveBus extends MTEHatchInputBus implements IRecipeProcessingAwareHatch,IDataCopyablePlaceHolder { private T master; // use getMaster() to access @@ -60,7 +60,7 @@ public DualInputHatchSlaveBus(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional, 6, 0, reobf.proghatches.main.Config.get("DHSB", ImmutableMap.of()) ); - Registration.items.add(new ItemStack(GregTech_API.sBlockMachines, 1, aID)); + Registration.items.add(new ItemStack(GregTechAPI.sBlockMachines, 1, aID)); disableSort = true; } @@ -389,7 +389,7 @@ public ItemStack getStackInSlot(int aIndex) { return null; } @Override - public CheckRecipeResult endRecipeProcessing(GT_MetaTileEntity_MultiBlockBase controller) { + public CheckRecipeResult endRecipeProcessing(MTEMultiBlockBase controller) { recipe=false;tmpinv=null;tmpi=null; if(getMaster() != null) if(getMaster() instanceof IRecipeProcessingAwareDualHatch) diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatchSlaveHatch.java b/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatchSlaveHatch.java index 1cdfa28..dd41ce2 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatchSlaveHatch.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatchSlaveHatch.java @@ -29,20 +29,20 @@ import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTank; -import gregtech.api.GregTech_API; +import gregtech.api.GregTechAPI; import gregtech.api.enums.ItemList; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_MultiInput; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; +import gregtech.api.metatileentity.implementations.MTEHatchInput; +import gregtech.api.metatileentity.implementations.MTEHatchInputBus; +import gregtech.api.metatileentity.implementations.MTEHatchMultiInput; +import gregtech.api.metatileentity.implementations.MTEMultiBlockBase; import gregtech.api.recipe.check.CheckRecipeResult; import gregtech.api.recipe.check.CheckRecipeResultRegistry; import gregtech.api.render.TextureFactory; -import gregtech.common.tileentities.machines.GT_MetaTileEntity_Hatch_CraftingInput_ME; +import gregtech.common.tileentities.machines.MTEHatchCraftingInputME; import gregtech.common.tileentities.machines.IDualInputHatch; import gregtech.common.tileentities.machines.IDualInputInventory; import gregtech.common.tileentities.machines.IRecipeProcessingAwareHatch; @@ -52,7 +52,7 @@ import reobf.proghatches.gt.metatileentity.util.IRecipeProcessingAwareDualHatch; import reobf.proghatches.main.registration.Registration; -public class DualInputHatchSlaveHatch extends GT_MetaTileEntity_Hatch_MultiInput +public class DualInputHatchSlaveHatch extends MTEHatchMultiInput implements IRecipeProcessingAwareHatch ,IDataCopyablePlaceHolder{ private T master; // use getMaster() to access @@ -65,7 +65,7 @@ public DualInputHatchSlaveHatch(int aID, String aName, String aNameRegional) { super(aID, 1, aName, aNameRegional, 6, reobf.proghatches.main.Config.get("DHSH", ImmutableMap.of()) ); - Registration.items.add(new ItemStack(GregTech_API.sBlockMachines, 1, aID)); + Registration.items.add(new ItemStack(GregTechAPI.sBlockMachines, 1, aID)); } @@ -377,7 +377,7 @@ public FluidStack drain(ForgeDirection from, FluidStack aFluid, boolean doDrain) @Override - public CheckRecipeResult endRecipeProcessing(GT_MetaTileEntity_MultiBlockBase controller) { + public CheckRecipeResult endRecipeProcessing(MTEMultiBlockBase controller) { recipe=false;tmpinv=null;tmpf=null; if(getMaster() != null) if(getMaster() instanceof IRecipeProcessingAwareDualHatch) diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/FilterOutputBus.java b/src/main/java/reobf/proghatches/gt/metatileentity/FilterOutputBus.java index 2d743ff..3295df1 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/FilterOutputBus.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/FilterOutputBus.java @@ -1,6 +1,6 @@ package reobf.proghatches.gt.metatileentity; -import static gregtech.api.util.GT_Utility.moveMultipleItemStacks; +import static gregtech.api.util.GTUtility.moveMultipleItemStacks; import java.util.Optional; import com.google.common.collect.ImmutableMap; @@ -8,16 +8,16 @@ import com.gtnewhorizons.modularui.api.screen.ModularWindow.Builder; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; -import gregtech.api.GregTech_API; +import gregtech.api.GregTechAPI; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_OutputBus; -import gregtech.common.GT_Client; +import gregtech.api.metatileentity.implementations.MTEHatchOutputBus; +import gregtech.common.GTClient; import reobf.proghatches.main.registration.Registration; import reobf.proghatches.util.ProghatchesUtil; -public class FilterOutputBus extends GT_MetaTileEntity_Hatch_OutputBus { +public class FilterOutputBus extends MTEHatchOutputBus { public FilterOutputBus(String mName, byte mTier, String[] mDescriptionArray, ITexture[][][] mTextures, boolean keepone) { @@ -40,7 +40,7 @@ public FilterOutputBus(int aID, String aName, String aNameRegional, int tier, bo ); this.keepone = keepone; - Registration.items.add(new ItemStack(GregTech_API.sBlockMachines, 1, aID)); + Registration.items.add(new ItemStack(GregTechAPI.sBlockMachines, 1, aID)); } private boolean keepone; @@ -69,7 +69,7 @@ public void setInventorySlotContents(int aIndex, ItemStack aStack) { @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - if (aBaseMetaTileEntity.isClientSide() && GT_Client.changeDetected == 4) { + if (aBaseMetaTileEntity.isClientSide() && GTClient.changeDetected == 4) { aBaseMetaTileEntity.issueTextureUpdate(); } if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.isAllowedToWork() && (aTick & 0x7) == 0) { diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/IngredientBuffer.java b/src/main/java/reobf/proghatches/gt/metatileentity/IngredientBuffer.java index 5b34c72..3671243 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/IngredientBuffer.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/IngredientBuffer.java @@ -3,7 +3,7 @@ import static gregtech.api.metatileentity.BaseTileEntity.FLUID_TRANSFER_TOOLTIP; import static gregtech.api.metatileentity.BaseTileEntity.ITEM_TRANSFER_TOOLTIP; import static gregtech.api.metatileentity.BaseTileEntity.TOOLTIP_DELAY; -import static gregtech.api.util.GT_Utility.moveMultipleItemStacks; +import static gregtech.api.util.GTUtility.moveMultipleItemStacks; import java.util.Arrays; import com.glodblock.github.loader.ItemAndBlockHolder; @@ -16,19 +16,19 @@ import com.gtnewhorizons.modularui.common.widget.CycleButtonWidget; import com.gtnewhorizons.modularui.common.widget.Scrollable; import com.gtnewhorizons.modularui.common.widget.SlotGroup; -import gregtech.api.GregTech_API; +import gregtech.api.GregTechAPI; import gregtech.api.enums.Textures; import gregtech.api.enums.Textures.BlockIcons; -import gregtech.api.gui.modularui.GT_UIInfos; -import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.gui.modularui.GTUIInfos; +import gregtech.api.gui.modularui.GTUITextures; import gregtech.api.gui.modularui.GUITextureSet; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.modularui.IAddUIWidgets; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock; +import gregtech.api.metatileentity.implementations.MTETieredMachineBlock; import gregtech.api.render.TextureFactory; -import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTUtility; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; @@ -41,7 +41,7 @@ import reobf.proghatches.gt.metatileentity.util.MappingItemHandler; import reobf.proghatches.main.registration.Registration; -public class IngredientBuffer extends GT_MetaTileEntity_TieredMachineBlock implements IAddUIWidgets { +public class IngredientBuffer extends MTETieredMachineBlock implements IAddUIWidgets { public static int T0 = 3; public static int T1 = 5; @@ -71,7 +71,7 @@ public IngredientBuffer(int aID, /* int aSlot, */ String aName, String aNameRegi this.mStoredFluid = new FluidStack[aSlot]; fluidTanks = new FluidStackTank[aSlot]; mCapacityPer = getCapacityPerTank(aTier, aSlot); - Registration.items.add(new ItemStack(GregTech_API.sBlockMachines, 1, aID)); + Registration.items.add(new ItemStack(GregTechAPI.sBlockMachines, 1, aID)); } public IngredientBuffer(String aName, int aSlot, int aTier, int aInvSlotCount, String[] aDescription, @@ -468,7 +468,7 @@ public boolean isValidSlot(int aIndex) { return super.isValidSlot(aIndex); } - @Override + //@Override public boolean useModularUI() { return true; } @@ -532,7 +532,7 @@ public void addUIWidgets(Builder builder, UIBuildContext buildContext) { final IDrawable[] background = new IDrawable[] { GUITextureSet.DEFAULT.getItemSlot() }; // final IDrawable[] special = new IDrawable[] { // GUITextureSet.DEFAULT.getItemSlot(), - // GT_UITextures.OVERLAY_SLOT_ARROW_ME }; + // GTUITextures.OVERLAY_SLOT_ARROW_ME }; sc.widget(SlotGroup.ofItemHandler(inventoryHandler, 5) .startFromSlot(0).endAtSlot(this.getSizeInventory() - 1).background(background).build() @@ -544,7 +544,7 @@ public void addUIWidgets(Builder builder, UIBuildContext buildContext) { final IDrawable[] background0 = new IDrawable[] { GUITextureSet.DEFAULT.getFluidSlot() }; // final IDrawable[] special0 = new IDrawable[] { // GUITextureSet.DEFAULT.getFluidSlot(), - // GT_UITextures.OVERLAY_SLOT_ARROW_ME }; + // GTUITextures.OVERLAY_SLOT_ARROW_ME }; sc.widget(SlotGroup.ofFluidTanks(Arrays.asList(fluidTanks), 2) @@ -569,7 +569,7 @@ public void addUIWidgets(Builder builder, UIBuildContext buildContext) { @Override public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { - GT_UIInfos.openGTTileEntityUI(aBaseMetaTileEntity, aPlayer); + GTUIInfos.openGTTileEntityUI(aBaseMetaTileEntity, aPlayer); return true; } @@ -630,16 +630,16 @@ public boolean setMainFacing(ForgeDirection side) { protected CycleButtonWidget createItemAutoOutputButton() { return (CycleButtonWidget) new CycleButtonWidget().setToggle(() -> mItemTransfer, val -> mItemTransfer = val) - .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_AUTOOUTPUT_ITEM) - .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE) + .setStaticTexture(GTUITextures.OVERLAY_BUTTON_AUTOOUTPUT_ITEM) + .setVariableBackground(GTUITextures.BUTTON_STANDARD_TOGGLE) .setGTTooltip(() -> mTooltipCache.getData(ITEM_TRANSFER_TOOLTIP)).setTooltipShowUpDelay(TOOLTIP_DELAY) .setPos(25, 62).setSize(18, 18); } protected CycleButtonWidget createFluidAutoOutputButton() { return (CycleButtonWidget) new CycleButtonWidget().setToggle(() -> mFluidTransfer, val -> mFluidTransfer = val) - .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_AUTOOUTPUT_FLUID) - .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE) + .setStaticTexture(GTUITextures.OVERLAY_BUTTON_AUTOOUTPUT_FLUID) + .setVariableBackground(GTUITextures.BUTTON_STANDARD_TOGGLE) .setGTTooltip(() -> mTooltipCache.getData(FLUID_TRANSFER_TOOLTIP)).setTooltipShowUpDelay(TOOLTIP_DELAY) .setPos(7, 62).setSize(18, 18); } @@ -650,14 +650,14 @@ public void onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, f if (aPlayer.isSneaking()) { /* * mDisableFilter = !mDisableFilter; - * GT_Utility.sendChatToPlayer( aPlayer, + * GTUtility.sendChatToPlayer( aPlayer, * StatCollector.translateToLocal("GT5U.hatch.disableFilter." + * mDisableFilter)); */} else { inputFromFront = !inputFromFront; - GT_Utility.sendChatToPlayer(aPlayer, - inputFromFront ? GT_Utility.trans("095", "Input from Output Side allowed") - : GT_Utility.trans("096", "Input from Output Side forbidden")); + GTUtility.sendChatToPlayer(aPlayer, + inputFromFront ? GTUtility.trans("095", "Input from Output Side allowed") + : GTUtility.trans("096", "Input from Output Side forbidden")); } } } diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/MultiCircuitInputBus.java b/src/main/java/reobf/proghatches/gt/metatileentity/MultiCircuitInputBus.java index 318ffbd..2140453 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/MultiCircuitInputBus.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/MultiCircuitInputBus.java @@ -22,15 +22,15 @@ import com.gtnewhorizons.modularui.common.widget.CycleButtonWidget; import com.gtnewhorizons.modularui.common.widget.SlotWidget; -import gregtech.api.GregTech_API; -import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.GregTechAPI; +import gregtech.api.gui.modularui.GTUITextures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus; -import gregtech.api.util.GT_TooltipDataCache; -import gregtech.api.util.GT_Utility; -import gregtech.api.util.GT_TooltipDataCache.TooltipData; +import gregtech.api.metatileentity.implementations.MTEHatchInputBus; +import gregtech.api.util.GTTooltipDataCache; +import gregtech.api.util.GTUtility; +import gregtech.api.util.GTTooltipDataCache.TooltipData; import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.ForgeDirection; import reobf.proghatches.gt.metatileentity.util.IMultiCircuitSupport; @@ -38,7 +38,7 @@ import reobf.proghatches.main.registration.Registration; import reobf.proghatches.util.ProghatchesUtil; -public class MultiCircuitInputBus extends GT_MetaTileEntity_Hatch_InputBus implements IMultiCircuitSupport{ +public class MultiCircuitInputBus extends MTEHatchInputBus implements IMultiCircuitSupport{ @Override public ItemStackHandler getInventoryHandler() { // TODO Auto-generated method stub @@ -47,10 +47,10 @@ public ItemStackHandler getInventoryHandler() { int uiButtonCount; private Widget createToggleButton(Supplier getter, Consumer setter, UITexture picture, - Supplier tooltipDataSupplier) { + Supplier tooltipDataSupplier) { return new CycleButtonWidget().setToggle(getter, setter) .setStaticTexture(picture) - .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE) + .setVariableBackground(GTUITextures.BUTTON_STANDARD_TOGGLE) .setTooltipShowUpDelay(TOOLTIP_DELAY) .setPos(7 + (uiButtonCount++ * BUTTON_SIZE), 62) .setSize(BUTTON_SIZE, BUTTON_SIZE) @@ -61,7 +61,7 @@ private void addSortStacksButton(ModularWindow.Builder builder) { createToggleButton( () -> !disableSort, val -> disableSort = !val, - GT_UITextures.OVERLAY_BUTTON_SORTING_MODE, + GTUITextures.OVERLAY_BUTTON_SORTING_MODE, () -> mTooltipCache.getData(SORTING_MODE_TOOLTIP))); } @@ -69,7 +69,7 @@ private void addOneStackLimitButton(ModularWindow.Builder builder) { builder.widget(createToggleButton(() -> !disableLimited, val -> { disableLimited = !val; updateSlots(); - }, GT_UITextures.OVERLAY_BUTTON_ONE_STACK_LIMIT, () -> mTooltipCache.getData(ONE_STACK_LIMIT_TOOLTIP))); + }, GTUITextures.OVERLAY_BUTTON_ONE_STACK_LIMIT, () -> mTooltipCache.getData(ONE_STACK_LIMIT_TOOLTIP))); } private static final String SORTING_MODE_TOOLTIP = "GT5U.machines.sorting_mode.tooltip"; private static final String ONE_STACK_LIMIT_TOOLTIP = "GT5U.machines.one_stack_limit.tooltip"; @@ -133,7 +133,7 @@ public MultiCircuitInputBus(int id, String name, String nameRegional, int tier, ); - Registration.items.add(new ItemStack(GregTech_API.sBlockMachines, 1, id)); + Registration.items.add(new ItemStack(GregTechAPI.sBlockMachines, 1, id)); } public MultiCircuitInputBus(String mName, byte mTier, String[] mDescriptionArray, ITexture[][][] mTextures) { @@ -183,23 +183,23 @@ public void updateSlots() { protected void fillStacksIntoFirstSlots() { final int L = mInventory.length - 4; - HashMap slots = new HashMap<>(L); - HashMap stacks = new HashMap<>(L); - List order = new ArrayList<>(L); + HashMap slots = new HashMap<>(L); + HashMap stacks = new HashMap<>(L); + List order = new ArrayList<>(L); List validSlots = new ArrayList<>(L); for (int i = 0; i < L; i++) { if (!isValidSlot(i)) continue; validSlots.add(i); ItemStack s = mInventory[i]; if (s == null) continue; - GT_Utility.ItemId sID = GT_Utility.ItemId.createNoCopy(s); + GTUtility.ItemId sID = GTUtility.ItemId.createNoCopy(s); slots.merge(sID, s.stackSize, Integer::sum); if (!stacks.containsKey(sID)) stacks.put(sID, s); order.add(sID); mInventory[i] = null; } int slotindex = 0; - for (GT_Utility.ItemId sID : order) { + for (GTUtility.ItemId sID : order) { int toSet = slots.get(sID); if (toSet == 0) continue; int slot = validSlots.get(slotindex); diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/PatternDualInputHatch.java b/src/main/java/reobf/proghatches/gt/metatileentity/PatternDualInputHatch.java index c6909fe..3471c90 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/PatternDualInputHatch.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/PatternDualInputHatch.java @@ -76,19 +76,19 @@ import appeng.util.Platform; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import gregtech.GT_Mod; -import gregtech.api.GregTech_API; +import gregtech.GTMod; +import gregtech.api.GregTechAPI; import gregtech.api.enums.Textures.BlockIcons; -import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.gui.modularui.GTUITextures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.render.TextureFactory; -import gregtech.api.util.GT_Util; -import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTUtil; +import gregtech.api.util.GTUtility; import gregtech.common.tileentities.casings.upgrade.Inventory; -import gregtech.common.tileentities.machines.GT_MetaTileEntity_Hatch_CraftingInput_ME; -import gregtech.common.tileentities.machines.GT_MetaTileEntity_Hatch_InputBus_ME; +import gregtech.common.tileentities.machines.MTEHatchCraftingInputME; +import gregtech.common.tileentities.machines.MTEHatchInputBusME; import it.unimi.dsi.fastutil.Pair; import li.cil.oc.api.network.Environment; import li.cil.oc.api.network.Message; @@ -293,7 +293,7 @@ ButtonWidget createRefundButton(IWidgetBuilder builder) { // e.printStackTrace(); } - }).setPlayClickSound(true).setBackground(GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_EXPORT) + }).setPlayClickSound(true).setBackground(GTUITextures.BUTTON_STANDARD, GTUITextures.OVERLAY_BUTTON_EXPORT) .addTooltips(ImmutableList.of("Return all internally stored items back to AE")) @@ -380,7 +380,7 @@ public void addUIWidgets(Builder builder, UIBuildContext buildContext) { builder.widget(new ButtonWidget().setOnClick((clickData, widget) -> { if (widget.getContext().isClient() == false) widget.getContext().openSyncedWindow(88); - }).setPlayClickSound(true).setBackground(GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_PLUS_LARGE) + }).setPlayClickSound(true).setBackground(GTUITextures.BUTTON_STANDARD, GTUITextures.OVERLAY_BUTTON_PLUS_LARGE) .addTooltips(ImmutableList.of(LangManager.translateToLocalFormatted("programmable_hatches.gt.pattern"))) .setSize(16, 16) // .setPos(10 + 16 * 9, 3 + 16 * 2) @@ -396,7 +396,7 @@ protected ModularWindow createPatternWindow(final EntityPlayer player) { final int PARENT_HEIGHT = getGUIHeight(); ModularWindow.Builder builder = ModularWindow.builder(WIDTH, HEIGHT); - builder.setBackground(GT_UITextures.BACKGROUND_SINGLEBLOCK_DEFAULT); + builder.setBackground(GTUITextures.BACKGROUND_SINGLEBLOCK_DEFAULT); builder.setGuiTint(getGUIColorization()); builder.setDraggable(true); builder.setPos((a, b) -> new Pos2d(PARENT_WIDTH + b.getPos().getX(), PARENT_HEIGHT * 0 + b.getPos().getY())); @@ -426,7 +426,7 @@ protected ItemStack getItemStackForRendering(Slot slotIn) { .setFilter(itemStack -> itemStack.getItem() instanceof ICraftingPatternItem).setChangeListener(() -> { onPatternChange(); }).setPos((i % 4) * 18 + 3, (i / 4) * 18 + 3).setBackground(getGUITextureSet().getItemSlot(), - GT_UITextures.OVERLAY_SLOT_PATTERN_ME)); + GTUITextures.OVERLAY_SLOT_PATTERN_ME)); } @@ -662,7 +662,7 @@ public IGridNode getGridNode(ForgeDirection dir) { public AENetworkProxy getProxy() { if (gridProxy == null) { gridProxy = new AENetworkProxy(this, "proxy", - new ItemStack(GregTech_API.sBlockMachines, 1, this.getBaseMetaTileEntity().getMetaTileID()), true); + new ItemStack(GregTechAPI.sBlockMachines, 1, this.getBaseMetaTileEntity().getMetaTileID()), true); gridProxy.setFlags(GridFlags.REQUIRE_CHANNEL); updateValidGridProxySides(); if (getBaseMetaTileEntity().getWorld() != null) @@ -701,7 +701,7 @@ public String getName() { for (ItemStack is:this.shared.getDisplayItems()) { name.append(" - "); - if(is.getItem()!=GT_Utility.getIntegratedCircuit(0).getItem()){ + if(is.getItem()!=GTUtility.getIntegratedCircuit(0).getItem()){ name.append(is.getDisplayName()); if(is.getItemDamage()>0){name.append("@"+is.getItemDamage());} }else{ @@ -809,7 +809,7 @@ public void provideCrafting(ICraftingProviderHelper craftingTracker) { } catch (Exception e) { } if (details == null) { - GT_Mod.GT_FML_LOGGER.warn("Found an invalid pattern at " + getBaseMetaTileEntity().getCoords() + GTMod.GT_FML_LOGGER.warn("Found an invalid pattern at " + getBaseMetaTileEntity().getCoords() + " in dim " + getBaseMetaTileEntity().getWorld().provider.dimensionId); continue; } @@ -854,7 +854,7 @@ public boolean isPowered() { @Override public ItemStack getCrafterIcon() { ItemStack is = this.getMachineCraftingIcon(); - return is == null ? new ItemStack(GregTech_API.sBlockMachines, 1, getBaseMetaTileEntity().getMetaTileID()) : is; + return is == null ? new ItemStack(GregTechAPI.sBlockMachines, 1, getBaseMetaTileEntity().getMetaTileID()) : is; } @Override @@ -1059,6 +1059,10 @@ public void getWailaNBTData(EntityPlayerMP player, TileEntity tile, NBTTagCompou tag.setLong("saved", saved); } - + @Override + public boolean isInfBuffer() { + + return true; + } } diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/PatternDualInputHatchInventoryMappingSlave.java b/src/main/java/reobf/proghatches/gt/metatileentity/PatternDualInputHatchInventoryMappingSlave.java index 1ec5975..7e4350f 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/PatternDualInputHatchInventoryMappingSlave.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/PatternDualInputHatchInventoryMappingSlave.java @@ -44,12 +44,12 @@ import appeng.me.GridAccessException; import appeng.me.helpers.AENetworkProxy; import appeng.me.helpers.IGridProxyable; -import gregtech.GT_Mod; -import gregtech.api.GregTech_API; +import gregtech.GTMod; +import gregtech.api.GregTechAPI; import gregtech.api.enums.ItemList; import gregtech.api.enums.Textures; -import gregtech.api.gui.modularui.GT_UIInfos; -import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.gui.modularui.GTUIInfos; +import gregtech.api.gui.modularui.GTUITextures; import gregtech.api.interfaces.IConfigurationCircuitSupport; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; @@ -57,10 +57,10 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.interfaces.tileentity.IHasWorldObjectAndCoords; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock; +import gregtech.api.metatileentity.implementations.MTEHatchInputBus; +import gregtech.api.metatileentity.implementations.MTETieredMachineBlock; import gregtech.api.render.TextureFactory; -import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTUtility; import gregtech.common.tileentities.machines.IDualInputHatch; import mcp.mobius.waila.api.IWailaConfigHandler; import mcp.mobius.waila.api.IWailaDataAccessor; @@ -99,7 +99,7 @@ import reobf.proghatches.net.UpgradesMessage; public class PatternDualInputHatchInventoryMappingSlave - extends GT_MetaTileEntity_TieredMachineBlock implements IAddUIWidgets, ICraftingMedium, ICustomNameObject, + extends MTETieredMachineBlock implements IAddUIWidgets, ICraftingMedium, ICustomNameObject, IGridProxyable, IInterfaceViewable, IPowerChannelState, IActionHost, ICraftingProvider ,IMultiplePatternPushable,IDataCopyablePlaceHolder { @@ -112,7 +112,7 @@ public PatternDualInputHatchInventoryMappingSlave(int aID, String aName, String super(aID, aName, aNameRegional, aTier, 0, Config.get("PDIHIMS", ImmutableMap.of())); - Registration.items.add(new ItemStack(GregTech_API.sBlockMachines, 1, aID)); + Registration.items.add(new ItemStack(GregTechAPI.sBlockMachines, 1, aID)); } public PatternDualInputHatchInventoryMappingSlave(String aName, int aTier, int aInvSlotCount, String[] aDescription, @@ -319,11 +319,11 @@ public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlaye aBaseMetaTileEntity.getZCoord(), this), (EntityPlayerMP) aPlayer); } - GT_UIInfos.openGTTileEntityUI(aBaseMetaTileEntity, aPlayer); + GTUIInfos.openGTTileEntityUI(aBaseMetaTileEntity, aPlayer); return true; } else { - GT_UIInfos.openGTTileEntityUI(aBaseMetaTileEntity, aPlayer); + GTUIInfos.openGTTileEntityUI(aBaseMetaTileEntity, aPlayer); } return false; @@ -455,7 +455,7 @@ public void readOnServer(int id, PacketBuffer buf) throws IOException { if (widget.getContext().isClient() == false) widget.getContext().openSyncedWindow(989898); }).setPlayClickSound(true) - .setBackground(GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_PLUS_LARGE) + .setBackground(GTUITextures.BUTTON_STANDARD, GTUITextures.OVERLAY_BUTTON_PLUS_LARGE) .addTooltips(ImmutableList .of(LangManager.translateToLocalFormatted("programmable_hatches.gt.pattern.mapping"))) .setSize(16, 16) @@ -472,7 +472,7 @@ public void readOnServer(int id, PacketBuffer buf) throws IOException { if (widget.getContext().isClient() == false) widget.getContext().openSyncedWindow(989898); }).setPlayClickSound(true) - .setBackground(GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_PLUS_LARGE) + .setBackground(GTUITextures.BUTTON_STANDARD, GTUITextures.OVERLAY_BUTTON_PLUS_LARGE) .addTooltips(ImmutableList .of(LangManager.translateToLocalFormatted("programmable_hatches.gt.pattern.mapping"))) .setSize(16, 16) @@ -482,7 +482,7 @@ public void readOnServer(int id, PacketBuffer buf) throws IOException { } - @Override + //@Override public boolean useModularUI() { return true; @@ -494,7 +494,7 @@ public boolean useModularUI() { public AENetworkProxy getProxy() { if (gridProxy == null) { gridProxy = new AENetworkProxy(this, "proxy", - new ItemStack(GregTech_API.sBlockMachines, 1, this.getBaseMetaTileEntity().getMetaTileID()), true); + new ItemStack(GregTechAPI.sBlockMachines, 1, this.getBaseMetaTileEntity().getMetaTileID()), true); gridProxy.setFlags(GridFlags.REQUIRE_CHANNEL); updateValidGridProxySides(); if (getBaseMetaTileEntity().getWorld() != null) @@ -581,7 +581,7 @@ public String getName() { if (m.mInventory[m.getCircuitSlot()] != null) { name.append(" - "); ItemStack is = m.mInventory[m.getCircuitSlot()]; - if(is.getItem()!=GT_Utility.getIntegratedCircuit(0).getItem()){ + if(is.getItem()!=GTUtility.getIntegratedCircuit(0).getItem()){ name.append(is.getDisplayName()); if(is.getItemDamage()>0){name.append("@"+is.getItemDamage());} }else{ @@ -901,7 +901,7 @@ public void provideCrafting(ICraftingProviderHelper craftingTracker) { } catch (Exception e) { } if (details == null) { - GT_Mod.GT_FML_LOGGER.warn("Found an invalid pattern at " + getBaseMetaTileEntity().getCoords() + GTMod.GT_FML_LOGGER.warn("Found an invalid pattern at " + getBaseMetaTileEntity().getCoords() + " in dim " + getBaseMetaTileEntity().getWorld().provider.dimensionId); continue; } @@ -919,7 +919,7 @@ protected ModularWindow createPatternWindow(final EntityPlayer player) { final int PARENT_HEIGHT = getGUIHeight(); ModularWindow.Builder builder = ModularWindow.builder(WIDTH, HEIGHT); - builder.setBackground(GT_UITextures.BACKGROUND_SINGLEBLOCK_DEFAULT); + builder.setBackground(GTUITextures.BACKGROUND_SINGLEBLOCK_DEFAULT); builder.setGuiTint(getGUIColorization()); builder.setDraggable(true); builder.setPos((a, b) -> new Pos2d(PARENT_WIDTH + b.getPos().getX(), PARENT_HEIGHT * 0 + b.getPos().getY())); @@ -950,7 +950,7 @@ protected ItemStack getItemStackForRendering(Slot slotIn) { .setChangeListener(() -> { onPatternChange(); }).setPos((i % 4) * 18 + 3, (i / 4) * 18 + 3) - .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_PATTERN_ME)); + .setBackground(getGUITextureSet().getItemSlot(), GTUITextures.OVERLAY_SLOT_PATTERN_ME)); } @@ -976,7 +976,7 @@ public void onFacingChange() { @Override public ItemStack getCrafterIcon() { ItemStack is = this.getMachineCraftingIcon(); - return is == null ? new ItemStack(GregTech_API.sBlockMachines, 1, getBaseMetaTileEntity().getMetaTileID()) : is; + return is == null ? new ItemStack(GregTechAPI.sBlockMachines, 1, getBaseMetaTileEntity().getMetaTileID()) : is; } @Override diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/PriorityFilterInputBusME.java b/src/main/java/reobf/proghatches/gt/metatileentity/PriorityFilterInputBusME.java index 928b30a..ade92a6 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/PriorityFilterInputBusME.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/PriorityFilterInputBusME.java @@ -49,13 +49,13 @@ import appeng.util.Platform; import appeng.util.item.AEItemStack; import appeng.util.item.MeaningfulItemIterator; -import gregtech.api.GregTech_API; -import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.GregTechAPI; +import gregtech.api.gui.modularui.GTUITextures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.util.GT_Utility; -import gregtech.common.tileentities.machines.GT_MetaTileEntity_Hatch_InputBus_ME; +import gregtech.api.util.GTUtility; +import gregtech.common.tileentities.machines.MTEHatchInputBusME; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -68,12 +68,12 @@ import reobf.proghatches.main.registration.Registration; import reobf.proghatches.util.ProghatchesUtil; -public class PriorityFilterInputBusME extends GT_MetaTileEntity_Hatch_InputBus_ME implements IMEHatchOverrided,IDataCopyablePlaceHolderSuper, +public class PriorityFilterInputBusME extends MTEHatchInputBusME implements IMEHatchOverrided,IDataCopyablePlaceHolderSuper, IPriorityHost,IActionHost{ public PriorityFilterInputBusME(int aID, /*boolean autoPullAvailable,*/ String aName, String aNameRegional) { super(aID, /*autoPullAvailable*/true, aName, aNameRegional); - Registration.items.add(new ItemStack(GregTech_API.sBlockMachines, 1, aID)); + Registration.items.add(new ItemStack(GregTechAPI.sBlockMachines, 1, aID)); desc=reobf.proghatches.main.Config.get("PFIBME", ImmutableMap.of()); } private static Field f; @@ -141,7 +141,7 @@ public void overridedBehoviour(int minPull) { IAEItemStack currItem = (IAEItemStack) iterator.next(); // if(all.findPrecise(currItem)!=null){continue;} if (currItem.getStackSize() >= minPull) { - ItemStack itemstack = GT_Utility.copyAmount(1, currItem.getItemStack()); + ItemStack itemstack = GTUtility.copyAmount(1, currItem.getItemStack()); this.mInventory[index] = itemstack; index++; } @@ -245,7 +245,7 @@ protected ModularWindow createStackSizeConfigurationWindow(final EntityPlayer pl final int PARENT_WIDTH = getGUIWidth(); final int PARENT_HEIGHT = getGUIHeight(); ModularWindow.Builder builder = ModularWindow.builder(WIDTH, HEIGHT); - builder.setBackground(GT_UITextures.BACKGROUND_SINGLEBLOCK_DEFAULT); + builder.setBackground(GTUITextures.BACKGROUND_SINGLEBLOCK_DEFAULT); builder.setGuiTint(getGUIColorization()); builder.setDraggable(true); @@ -271,7 +271,7 @@ protected ModularWindow createStackSizeConfigurationWindow(final EntityPlayer pl .setTextColor(Color.WHITE.normal) .setSize(70, 18) .setPos(3, parent.getSize().height+18) - .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD)); + .setBackground(GTUITextures.BACKGROUND_TEXT_FIELD)); // builder.widget(createMultiplesModeButton(builder,HEIGHT)); @@ -297,8 +297,8 @@ public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildCont }}) .setBackground(() -> { { - return new IDrawable[] { GT_UITextures.BUTTON_STANDARD, - GT_UITextures.OVERLAY_BUTTON_AUTOPULL_ME_DISABLED }; + return new IDrawable[] { GTUITextures.BUTTON_STANDARD, + GTUITextures.OVERLAY_BUTTON_AUTOPULL_ME_DISABLED }; } }) .addTooltips( @@ -320,7 +320,7 @@ public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildCont .setBackground(() -> { { return new IDrawable[] { - GT_UITextures.BUTTON_STANDARD + GTUITextures.BUTTON_STANDARD }; } }) diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/PriorityFilterInputHatchME.java b/src/main/java/reobf/proghatches/gt/metatileentity/PriorityFilterInputHatchME.java index 00eb10c..39f3c97 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/PriorityFilterInputHatchME.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/PriorityFilterInputHatchME.java @@ -47,14 +47,14 @@ import appeng.util.Platform; import appeng.util.item.AEItemStack; import appeng.util.item.MeaningfulItemIterator; -import gregtech.api.GregTech_API; -import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.GregTechAPI; +import gregtech.api.gui.modularui.GTUITextures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.util.GT_Utility; -import gregtech.common.tileentities.machines.GT_MetaTileEntity_Hatch_InputBus_ME; -import gregtech.common.tileentities.machines.GT_MetaTileEntity_Hatch_Input_ME; +import gregtech.api.util.GTUtility; +import gregtech.common.tileentities.machines.MTEHatchInputBusME; +import gregtech.common.tileentities.machines.MTEHatchInputME; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -68,12 +68,12 @@ import reobf.proghatches.main.registration.Registration; import reobf.proghatches.util.ProghatchesUtil; -public class PriorityFilterInputHatchME extends GT_MetaTileEntity_Hatch_Input_ME implements IMEHatchOverrided,IDataCopyablePlaceHolderSuper, +public class PriorityFilterInputHatchME extends MTEHatchInputME implements IMEHatchOverrided,IDataCopyablePlaceHolderSuper, IPriorityHost,IActionHost{ public PriorityFilterInputHatchME(int aID, /*boolean autoPullAvailable,*/ String aName, String aNameRegional) { super(aID, /*autoPullAvailable*/true, aName, aNameRegional); - Registration.items.add(new ItemStack(GregTech_API.sBlockMachines, 1, aID)); + Registration.items.add(new ItemStack(GregTechAPI.sBlockMachines, 1, aID)); desc=reobf.proghatches.main.Config.get("PFIHME", ImmutableMap.of()); } private static Field f; @@ -141,7 +141,7 @@ public void overridedBehoviour(int minPull) { IAEFluidStack currItem = (IAEFluidStack) iterator.next(); // if(all.findPrecise(currItem)!=null){continue;} if (currItem.getStackSize() >= minPull) { - FluidStack itemstack = GT_Utility.copyAmount(1, currItem.getFluidStack()); + FluidStack itemstack = GTUtility.copyAmount(1, currItem.getFluidStack()); this.storedFluids[index] = itemstack; index++; } @@ -244,7 +244,7 @@ protected ModularWindow createStackSizeConfigurationWindow(final EntityPlayer pl final int PARENT_WIDTH = getGUIWidth(); final int PARENT_HEIGHT = getGUIHeight(); ModularWindow.Builder builder = ModularWindow.builder(WIDTH, HEIGHT); - builder.setBackground(GT_UITextures.BACKGROUND_SINGLEBLOCK_DEFAULT); + builder.setBackground(GTUITextures.BACKGROUND_SINGLEBLOCK_DEFAULT); builder.setGuiTint(getGUIColorization()); builder.setDraggable(true); @@ -270,7 +270,7 @@ protected ModularWindow createStackSizeConfigurationWindow(final EntityPlayer pl .setTextColor(Color.WHITE.normal) .setSize(70, 18) .setPos(3, parent.getSize().height+18) - .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD)); + .setBackground(GTUITextures.BACKGROUND_TEXT_FIELD)); // builder.widget(createMultiplesModeButton(builder,HEIGHT)); @@ -296,8 +296,8 @@ public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildCont }}) .setBackground(() -> { { - return new IDrawable[] { GT_UITextures.BUTTON_STANDARD, - GT_UITextures.OVERLAY_BUTTON_AUTOPULL_ME_DISABLED }; + return new IDrawable[] { GTUITextures.BUTTON_STANDARD, + GTUITextures.OVERLAY_BUTTON_AUTOPULL_ME_DISABLED }; } }) .addTooltips( @@ -319,7 +319,7 @@ public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildCont .setBackground(() -> { { return new IDrawable[] { - GT_UITextures.BUTTON_STANDARD + GTUITextures.BUTTON_STANDARD }; } }) diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/ProgrammingCircuitProvider.java b/src/main/java/reobf/proghatches/gt/metatileentity/ProgrammingCircuitProvider.java index 732fc0e..9a66f1e 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/ProgrammingCircuitProvider.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/ProgrammingCircuitProvider.java @@ -58,16 +58,16 @@ import appeng.me.helpers.IGridProxyable; import appeng.tile.AEBaseTile; import appeng.util.item.AEItemStack; -import gregtech.api.GregTech_API; +import gregtech.api.GregTechAPI; import gregtech.api.enums.ItemList; -import gregtech.api.gui.modularui.GT_UIInfos; +import gregtech.api.gui.modularui.GTUIInfos; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.modularui.IAddUIWidgets; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; +import gregtech.api.metatileentity.implementations.MTEHatch; import gregtech.api.render.TextureFactory; -import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTUtility; import mcp.mobius.waila.api.IWailaConfigHandler; import mcp.mobius.waila.api.IWailaDataAccessor; import reobf.proghatches.block.BlockIOHub; @@ -81,7 +81,7 @@ import reobf.proghatches.main.MyMod; import reobf.proghatches.main.registration.Registration; -public class ProgrammingCircuitProvider extends GT_MetaTileEntity_Hatch implements IAddUIWidgets, IPowerChannelState, +public class ProgrammingCircuitProvider extends MTEHatch implements IAddUIWidgets, IPowerChannelState, ICraftingProvider, IGridProxyable, ICircuitProvider, IInstantCompletable,ICustomNameObject ,IInterfaceViewable { @@ -91,7 +91,7 @@ public ProgrammingCircuitProvider(int aID, String aName, String aNameRegional, i reobf.proghatches.main.Config.get("PCP", ImmutableMap.of()) ); - Registration.items.add(new ItemStack(GregTech_API.sBlockMachines, 1, aID)); + Registration.items.add(new ItemStack(GregTechAPI.sBlockMachines, 1, aID)); this.tech=tech; } @@ -205,7 +205,7 @@ public void onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, f patternDirty=true; if(legacy==true)legacy=!legacy; postEvent(); - GT_Utility.sendChatToPlayer(aPlayer, "Legacy Mode:" + legacy); + GTUtility.sendChatToPlayer(aPlayer, "Legacy Mode:" + legacy); } @Override public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) { @@ -269,7 +269,7 @@ public AENetworkProxy getProxy() { } private ItemStack visualStack() { - return new ItemStack(GregTech_API.sBlockMachines,1, getBaseMetaTileEntity().getMetaTileID()); + return new ItemStack(GregTechAPI.sBlockMachines,1, getBaseMetaTileEntity().getMetaTileID()); } @Override @@ -516,7 +516,7 @@ public ITexture[] getTexturesInactive(ITexture aBaseTexture) { return new ITexture[] { aBaseTexture, TextureFactory.of(MyMod.iohub, BlockIOHub.magicNO_provider_overlay) }; } - @Override + //@Override public boolean useModularUI() { return true; @@ -524,7 +524,7 @@ public boolean useModularUI() { @Override public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { - GT_UIInfos.openGTTileEntityUI(aBaseMetaTileEntity, aPlayer); + GTUIInfos.openGTTileEntityUI(aBaseMetaTileEntity, aPlayer); return true; } @@ -607,7 +607,7 @@ public void loadNBTData(NBTTagCompound aNBT) { @Override public ItemStack getCrafterIcon() { - return new ItemStack(GregTech_API.sBlockMachines, 1, getBaseMetaTileEntity().getMetaTileID()); + return new ItemStack(GregTechAPI.sBlockMachines, 1, getBaseMetaTileEntity().getMetaTileID()); } @Override diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/ProgrammingCircuitProviderPrefabricated.java b/src/main/java/reobf/proghatches/gt/metatileentity/ProgrammingCircuitProviderPrefabricated.java index 2b415ec..4b824ec 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/ProgrammingCircuitProviderPrefabricated.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/ProgrammingCircuitProviderPrefabricated.java @@ -17,13 +17,13 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.Table; -import gregtech.api.GregTech_API; +import gregtech.api.GregTechAPI; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; +import gregtech.api.metatileentity.implementations.MTEHatch; import gregtech.api.render.TextureFactory; -import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GTOreDictUnificator; import net.minecraft.item.ItemStack; import net.minecraft.util.StatCollector; import net.minecraftforge.common.util.ForgeDirection; @@ -33,7 +33,7 @@ import reobf.proghatches.main.MyMod; import reobf.proghatches.main.registration.Registration; -public class ProgrammingCircuitProviderPrefabricated extends GT_MetaTileEntity_Hatch implements ICircuitProvider{ +public class ProgrammingCircuitProviderPrefabricated extends MTEHatch implements ICircuitProvider{ public ProgrammingCircuitProviderPrefabricated(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount,int i) { super(aID, aName, aNameRegional, aTier, aInvSlotCount, reobf.proghatches.main.Config.get("PCPP", ImmutableMap.of( @@ -44,7 +44,7 @@ public ProgrammingCircuitProviderPrefabricated(int aID, String aName, String aNa )) ); - Registration.items.add(new ItemStack(GregTech_API.sBlockMachines, 1, aID)); + Registration.items.add(new ItemStack(GregTechAPI.sBlockMachines, 1, aID)); this.index=i; } @@ -114,7 +114,7 @@ static void init(){ if(init==true)return; init=true; System.out.println("init!!!!"); - reg(0,GregTech_API.getConfigurationCircuitList(100)); + reg(0,GregTechAPI.getConfigurationCircuitList(100)); ItemList[][] all = new ItemList[][]{{ Shape_Mold_Bottle, Shape_Mold_Plate, @@ -220,7 +220,7 @@ static void init(){ for(Materials mat: Materials.values()){ - ItemStack opt= GT_OreDictUnificator.get(OrePrefixes.lens.get(mat),null, 1,false,false); + ItemStack opt= GTOreDictUnificator.get(OrePrefixes.lens.get(mat),null, 1,false,false); if(opt!=null)is.add(opt); //System.out.println(is); reg(5,is); diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/ProviderChainer.java b/src/main/java/reobf/proghatches/gt/metatileentity/ProviderChainer.java index d643890..46e85f2 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/ProviderChainer.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/ProviderChainer.java @@ -31,12 +31,12 @@ import appeng.me.helpers.AENetworkProxy; import appeng.me.helpers.IGridProxyable; import appeng.util.item.AEItemStack; -import gregtech.api.GregTech_API; +import gregtech.api.GregTechAPI; import gregtech.api.enums.ItemList; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; +import gregtech.api.metatileentity.implementations.MTEHatch; import gregtech.api.render.TextureFactory; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Items; @@ -52,7 +52,7 @@ import reobf.proghatches.main.MyMod; import reobf.proghatches.main.registration.Registration; -public class ProviderChainer extends GT_MetaTileEntity_Hatch +public class ProviderChainer extends MTEHatch implements IPowerChannelState, IGridProxyable, ICircuitProvider { public ProviderChainer(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount) { @@ -60,7 +60,7 @@ public ProviderChainer(int aID, String aName, String aNameRegional, int aTier, i reobf.proghatches.main.Config.get("PC", ImmutableMap.of()) ); - Registration.items.add(new ItemStack(GregTech_API.sBlockMachines, 1, aID)); + Registration.items.add(new ItemStack(GregTechAPI.sBlockMachines, 1, aID)); } @Override public boolean isValidSlot(int aIndex) { @@ -165,7 +165,7 @@ public AENetworkProxy getProxy() { return this.gridProxy; } private ItemStack visualStack() { - return new ItemStack(GregTech_API.sBlockMachines,1, getBaseMetaTileEntity().getMetaTileID()); + return new ItemStack(GregTechAPI.sBlockMachines,1, getBaseMetaTileEntity().getMetaTileID()); } @Override @@ -238,7 +238,7 @@ public ITexture[] getTexturesInactive(ITexture aBaseTexture) { return new ITexture[] { aBaseTexture, TextureFactory.of(MyMod.iohub, BlockIOHub.magicNO_provider_in_overlay) }; } - @Override + //@Override public boolean useModularUI() { return false; @@ -246,7 +246,7 @@ public boolean useModularUI() { @Override public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { - // GT_UIInfos.openGTTileEntityUI(aBaseMetaTileEntity, aPlayer); + // GTUIInfos.openGTTileEntityUI(aBaseMetaTileEntity, aPlayer); return true; } diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/RecipeCheckResultDetector.java b/src/main/java/reobf/proghatches/gt/metatileentity/RecipeCheckResultDetector.java index f46fb26..2745768 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/RecipeCheckResultDetector.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/RecipeCheckResultDetector.java @@ -8,14 +8,14 @@ import com.google.common.collect.ImmutableMap; -import gregtech.GT_Mod; -import gregtech.api.GregTech_API; +import gregtech.GTMod; +import gregtech.api.GregTechAPI; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.BaseMetaTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; +import gregtech.api.metatileentity.implementations.MTEHatchInputBus; +import gregtech.api.metatileentity.implementations.MTEMultiBlockBase; import gregtech.api.recipe.check.CheckRecipeResult; import gregtech.api.recipe.check.CheckRecipeResultRegistry; import gregtech.api.render.TextureFactory; @@ -26,7 +26,7 @@ import reobf.proghatches.main.registration.Registration; //spotless:off @Deprecated -public class RecipeCheckResultDetector extends GT_MetaTileEntity_Hatch_InputBus +public class RecipeCheckResultDetector extends MTEHatchInputBus implements IRecipeProcessingAwareHatch { @Override @@ -40,7 +40,7 @@ public RecipeCheckResultDetector(int id, String name, String nameRegional, int t super(id, name, nameRegional, tier, 1, reobf.proghatches.main.Config.get("RCRD", ImmutableMap.of())); - Registration.items_eucrafting.add(new ItemStack(GregTech_API.sBlockMachines, 1, id)); + Registration.items_eucrafting.add(new ItemStack(GregTechAPI.sBlockMachines, 1, id)); } public RecipeCheckResultDetector(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { @@ -88,7 +88,7 @@ public void saveNBTData(NBTTagCompound aNBT) { } static { - f= Arrays.stream(GT_MetaTileEntity_MultiBlockBase.class.getDeclaredFields()) + f= Arrays.stream(MTEMultiBlockBase.class.getDeclaredFields()) .filter(s->s.getType()==CheckRecipeResult.class) .findAny() .get(); @@ -126,20 +126,20 @@ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { } @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return GT_Mod.gregtechproxy.mRenderIndicatorsOnHatch + return GTMod.gregtechproxy.mRenderIndicatorsOnHatch ? new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN), TextureFactory.of(ITEM_IN_SIGN) } : new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN) }; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return GT_Mod.gregtechproxy.mRenderIndicatorsOnHatch + return GTMod.gregtechproxy.mRenderIndicatorsOnHatch ? new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN), TextureFactory.of(ITEM_IN_SIGN) } : new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN) }; } //TODO: call this via mixin @Return, because other ProcessingAwareHatch might fail the recipecheck @Override - public CheckRecipeResult endRecipeProcessing(GT_MetaTileEntity_MultiBlockBase controller) { + public CheckRecipeResult endRecipeProcessing(MTEMultiBlockBase controller) { try { CheckRecipeResult res=(CheckRecipeResult) f.get(controller); int newSuccess=check(res); diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/RemoteInputBus.java b/src/main/java/reobf/proghatches/gt/metatileentity/RemoteInputBus.java index a01235d..3abb3bd 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/RemoteInputBus.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/RemoteInputBus.java @@ -42,20 +42,20 @@ import com.gtnewhorizons.modularui.common.widget.TextWidget; import appeng.api.util.DimensionalCoord; -import gregtech.GT_Mod; -import gregtech.api.GregTech_API; -import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.GTMod; +import gregtech.api.GregTechAPI; +import gregtech.api.gui.modularui.GTUITextures; import gregtech.api.interfaces.IConfigurationCircuitSupport; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; +import gregtech.api.metatileentity.implementations.MTEHatchInputBus; +import gregtech.api.metatileentity.implementations.MTEMultiBlockBase; import gregtech.api.recipe.check.CheckRecipeResult; import gregtech.api.recipe.check.CheckRecipeResultRegistry; import gregtech.api.render.TextureFactory; -import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTUtility; import gregtech.common.tileentities.machines.IRecipeProcessingAwareHatch; import reobf.proghatches.gt.metatileentity.util.IDataCopyablePlaceHolder; import reobf.proghatches.gt.metatileentity.util.RecursiveLinkExcpetion; @@ -63,7 +63,7 @@ import reobf.proghatches.main.MyMod; import reobf.proghatches.main.registration.Registration; -public class RemoteInputBus extends GT_MetaTileEntity_Hatch_InputBus implements IRecipeProcessingAwareHatch , IDataCopyablePlaceHolder { +public class RemoteInputBus extends MTEHatchInputBus implements IRecipeProcessingAwareHatch , IDataCopyablePlaceHolder { static public ArrayList blacklist = new ArrayList<>(); static { @@ -75,14 +75,14 @@ public class RemoteInputBus extends GT_MetaTileEntity_Hatch_InputBus implements @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return GT_Mod.gregtechproxy.mRenderIndicatorsOnHatch + return GTMod.gregtechproxy.mRenderIndicatorsOnHatch ? new ITexture[] { aBaseTexture, TextureFactory.of(ITEM_IN_SIGN) } : new ITexture[] { aBaseTexture, TextureFactory.of(ITEM_IN_SIGN) }; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return GT_Mod.gregtechproxy.mRenderIndicatorsOnHatch + return GTMod.gregtechproxy.mRenderIndicatorsOnHatch ? new ITexture[] { aBaseTexture, TextureFactory.of(ITEM_IN_SIGN) } : new ITexture[] { aBaseTexture, TextureFactory.of(ITEM_IN_SIGN) }; } @@ -188,7 +188,7 @@ private boolean checkBlackList(Optional opt) {// World public RemoteInputBus(int id, String name, String nameRegional, int tier) { super(id, name, nameRegional, tier, 0, reobf.proghatches.main.Config.get("RIB", ImmutableMap.of()) ); - Registration.items.add(new ItemStack(GregTech_API.sBlockMachines, 1, id)); + Registration.items.add(new ItemStack(GregTechAPI.sBlockMachines, 1, id)); } @@ -240,7 +240,7 @@ public void addUIWidgets(Builder builder, UIBuildContext buildContext) { - circuitslot[0].setBackground( getGUITextureSet().getItemSlot(),GT_UITextures.OVERLAY_SLOT_INT_CIRCUIT); + circuitslot[0].setBackground( getGUITextureSet().getItemSlot(),GTUITextures.OVERLAY_SLOT_INT_CIRCUIT); builder.widget(new SyncedWidget() { @@ -482,7 +482,7 @@ public void setInventorySlotContents(int aIndex, ItemStack aStack) { if(blocked)return; markDirty(); if (aIndex == getCircuitSlot()) { - mInventory[0] = GT_Utility.copyAmount(0, aStack); + mInventory[0] = GTUtility.copyAmount(0, aStack); return; } /*List arr = getTile().map(this::filterTakable).orElseGet(ArrayList::new); @@ -606,7 +606,7 @@ public void startRecipeProcessing() { protected boolean processingRecipe = false; @Override - public CheckRecipeResult endRecipeProcessing(GT_MetaTileEntity_MultiBlockBase controller) { + public CheckRecipeResult endRecipeProcessing(MTEMultiBlockBase controller) { if(!blocked){ using.remove(new DimensionalCoord((TileEntity)this.getBaseMetaTileEntity())); } @@ -624,7 +624,7 @@ public void setSize(int size) {} @Override public void setStackInSlot(int slot, ItemStack stack) { this.validateSlotIndex(slot); - mInventory[0]=GT_Utility.copyAmount(0,stack); + mInventory[0]=GTUtility.copyAmount(0,stack); } @Override diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/RemoteInputHatch.java b/src/main/java/reobf/proghatches/gt/metatileentity/RemoteInputHatch.java index 559dee8..a1d01a9 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/RemoteInputHatch.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/RemoteInputHatch.java @@ -53,20 +53,20 @@ import com.gtnewhorizons.modularui.common.widget.TextWidget; import appeng.api.util.DimensionalCoord; -import gregtech.GT_Mod; -import gregtech.api.GregTech_API; -import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.GTMod; +import gregtech.api.GregTechAPI; +import gregtech.api.gui.modularui.GTUITextures; import gregtech.api.interfaces.IConfigurationCircuitSupport; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_MultiInput; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; +import gregtech.api.metatileentity.implementations.MTEHatchMultiInput; +import gregtech.api.metatileentity.implementations.MTEMultiBlockBase; import gregtech.api.recipe.check.CheckRecipeResult; import gregtech.api.recipe.check.CheckRecipeResultRegistry; import gregtech.api.render.TextureFactory; -import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTUtility; import gregtech.api.util.shutdown.ShutDownReasonRegistry; import gregtech.common.tileentities.machines.IRecipeProcessingAwareHatch; import reobf.proghatches.gt.metatileentity.util.IDataCopyablePlaceHolder; @@ -75,7 +75,7 @@ import reobf.proghatches.main.MyMod; import reobf.proghatches.main.registration.Registration; -public class RemoteInputHatch extends GT_MetaTileEntity_Hatch_MultiInput implements IRecipeProcessingAwareHatch,IDataCopyablePlaceHolder { +public class RemoteInputHatch extends MTEHatchMultiInput implements IRecipeProcessingAwareHatch,IDataCopyablePlaceHolder { static public ArrayList blacklist = new ArrayList<>(); static { @@ -87,14 +87,14 @@ public class RemoteInputHatch extends GT_MetaTileEntity_Hatch_MultiInput impleme @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return GT_Mod.gregtechproxy.mRenderIndicatorsOnHatch + return GTMod.gregtechproxy.mRenderIndicatorsOnHatch ? new ITexture[] { aBaseTexture, TextureFactory.of(FLUID_IN_SIGN) } : new ITexture[] { aBaseTexture, TextureFactory.of(FLUID_IN_SIGN) }; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return GT_Mod.gregtechproxy.mRenderIndicatorsOnHatch + return GTMod.gregtechproxy.mRenderIndicatorsOnHatch ? new ITexture[] { aBaseTexture, TextureFactory.of(FLUID_IN_SIGN) } : new ITexture[] { aBaseTexture, TextureFactory.of(FLUID_IN_SIGN) }; } @@ -200,7 +200,7 @@ public RemoteInputHatch(int id, String name, String nameRegional, int tier) { ); - Registration.items.add(new ItemStack(GregTech_API.sBlockMachines, 1, id)); + Registration.items.add(new ItemStack(GregTechAPI.sBlockMachines, 1, id)); } @@ -619,7 +619,7 @@ public void startRecipeProcessing() { } @Override - public CheckRecipeResult endRecipeProcessing(GT_MetaTileEntity_MultiBlockBase controller) { + public CheckRecipeResult endRecipeProcessing(MTEMultiBlockBase controller) { if(!blocked){ using.remove(new DimensionalCoord((TileEntity)this.getBaseMetaTileEntity())); } @@ -695,7 +695,7 @@ public FluidStack drain(ForgeDirection side, FluidStack aFluid, boolean doDrain) if (stored == null) return null; - FluidStack drained = GT_Utility.copyAmount(Math.min(stored.amount, aFluid.amount), stored); + FluidStack drained = GTUtility.copyAmount(Math.min(stored.amount, aFluid.amount), stored); if (doDrain) { stored.amount -= drained.amount; } diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/RestrictedInputBusME.java b/src/main/java/reobf/proghatches/gt/metatileentity/RestrictedInputBusME.java index b7078b8..acbeb9d 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/RestrictedInputBusME.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/RestrictedInputBusME.java @@ -1,7 +1,7 @@ package reobf.proghatches.gt.metatileentity; -import static gregtech.api.enums.GT_Values.TIER_COLORS; -import static gregtech.api.enums.GT_Values.VN; +import static gregtech.api.enums.GTValues.TIER_COLORS; +import static gregtech.api.enums.GTValues.VN; import static gregtech.api.enums.Mods.GregTech; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_ME_INPUT_FLUID_HATCH; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_ME_INPUT_FLUID_HATCH_ACTIVE; @@ -86,10 +86,10 @@ import appeng.util.item.AEFluidStack; import appeng.util.item.AEItemStack; import cpw.mods.fml.common.Optional.Interface; -import gregtech.api.GregTech_API; +import gregtech.api.GregTechAPI; import gregtech.api.enums.ItemList; import gregtech.api.enums.SoundResource; -import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.gui.modularui.GTUITextures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.modularui.IAddGregtechLogo; import gregtech.api.interfaces.modularui.IAddUIWidgets; @@ -97,16 +97,16 @@ import gregtech.api.metatileentity.BaseMetaTileEntity; import gregtech.api.metatileentity.CommonMetaTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; +import gregtech.api.metatileentity.implementations.MTEHatchInput; +import gregtech.api.metatileentity.implementations.MTEMultiBlockBase; import gregtech.api.recipe.check.CheckRecipeResult; import gregtech.api.recipe.check.CheckRecipeResultRegistry; import gregtech.api.recipe.check.SimpleCheckRecipeResult; import gregtech.api.render.TextureFactory; -import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTUtility; import gregtech.api.util.shutdown.ShutDownReasonRegistry; -import gregtech.common.tileentities.machines.GT_MetaTileEntity_Hatch_InputBus_ME; -import gregtech.common.tileentities.machines.GT_MetaTileEntity_Hatch_Input_ME; +import gregtech.common.tileentities.machines.MTEHatchInputBusME; +import gregtech.common.tileentities.machines.MTEHatchInputME; import gregtech.common.tileentities.machines.IRecipeProcessingAwareHatch; import it.unimi.dsi.fastutil.ints.Int2ReferenceMap; import it.unimi.dsi.fastutil.ints.Int2ReferenceMaps; @@ -114,11 +114,11 @@ import mcp.mobius.waila.api.IWailaConfigHandler; import mcp.mobius.waila.api.IWailaDataAccessor; -public class RestrictedInputBusME extends GT_MetaTileEntity_Hatch_InputBus_ME implements IDataCopyablePlaceHolderSuper{ +public class RestrictedInputBusME extends MTEHatchInputBusME implements IDataCopyablePlaceHolderSuper{ public RestrictedInputBusME(int aID, boolean autoPullAvailable, String aName, String aNameRegional) { super(aID, autoPullAvailable, aName, aNameRegional); - Registration.items.add(new ItemStack(GregTech_API.sBlockMachines, 1, aID)); + Registration.items.add(new ItemStack(GregTechAPI.sBlockMachines, 1, aID)); desc=reobf.proghatches.main.Config.get("RIBME", ImmutableMap.of()); } public RestrictedInputBusME(String aName, boolean autoPullAvailable, int aTier, String[] aDescription, @@ -146,9 +146,9 @@ public String[] getDescription() { static{ try { - f1=GT_MetaTileEntity_Hatch_InputBus_ME.class.getDeclaredField("shadowInventory"); - f2=GT_MetaTileEntity_Hatch_InputBus_ME.class.getDeclaredField("savedStackSizes"); - f3=GT_MetaTileEntity_Hatch_InputBus_ME.class.getDeclaredField("processingRecipe"); + f1=MTEHatchInputBusME.class.getDeclaredField("shadowInventory"); + f2=MTEHatchInputBusME.class.getDeclaredField("savedStackSizes"); + f3=MTEHatchInputBusME.class.getDeclaredField("processingRecipe"); f1. setAccessible(true); f2. @@ -285,7 +285,7 @@ public ItemStack updateInformationSlot(int aIndex, ItemStack aStack) { @Override -public CheckRecipeResult endRecipeProcessing(GT_MetaTileEntity_MultiBlockBase controller) { +public CheckRecipeResult endRecipeProcessing(MTEMultiBlockBase controller) { try{ return super.endRecipeProcessing(controller);}finally{ for (int index = 0; index < SLOT_COUNT; index++) { @@ -320,8 +320,8 @@ public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildCont }}) .setBackground(() -> { { - return new IDrawable[] { GT_UITextures.BUTTON_STANDARD, - GT_UITextures.OVERLAY_BUTTON_AUTOPULL_ME_DISABLED }; + return new IDrawable[] { GTUITextures.BUTTON_STANDARD, + GTUITextures.OVERLAY_BUTTON_AUTOPULL_ME_DISABLED }; } }) .addTooltips( @@ -343,7 +343,7 @@ public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildCont .setBackground(() -> { { return new IDrawable[] { - GT_UITextures.BUTTON_STANDARD + GTUITextures.BUTTON_STANDARD }; } }) @@ -367,7 +367,7 @@ protected ModularWindow createStackSizeConfigurationWindow(final EntityPlayer pl final int PARENT_WIDTH = getGUIWidth(); final int PARENT_HEIGHT = getGUIHeight(); ModularWindow.Builder builder = ModularWindow.builder(WIDTH, HEIGHT); - builder.setBackground(GT_UITextures.BACKGROUND_SINGLEBLOCK_DEFAULT); + builder.setBackground(GTUITextures.BACKGROUND_SINGLEBLOCK_DEFAULT); builder.setGuiTint(getGUIColorization()); builder.setDraggable(true); builder.setPos( @@ -388,7 +388,7 @@ protected ModularWindow createStackSizeConfigurationWindow(final EntityPlayer pl .setTextColor(Color.WHITE.normal) .setSize(70, 18) .setPos(3, 18+18) - .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD)); + .setBackground(GTUITextures.BACKGROUND_TEXT_FIELD)); builder.widget( TextWidget.localised("proghatches.restricted.bound.up") .setPos(3, 42+18) @@ -402,7 +402,7 @@ protected ModularWindow createStackSizeConfigurationWindow(final EntityPlayer pl .setTextColor(Color.WHITE.normal) .setSize(70, 18) .setPos(3, 58+18) - .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD)); + .setBackground(GTUITextures.BACKGROUND_TEXT_FIELD)); builder.widget(createMultiplesModeButton(builder,HEIGHT)); @@ -432,18 +432,18 @@ Widget createMultiplesModeButton(IWidgetBuilder builder,int HEIGHT) { .setBackground(() -> { if (multiples==1) { - return new IDrawable[] { GT_UITextures.BUTTON_STANDARD_PRESSED, + return new IDrawable[] { GTUITextures.BUTTON_STANDARD_PRESSED, mode0 }; } else if (multiples==2) { - return new IDrawable[] { GT_UITextures.BUTTON_STANDARD_PRESSED, + return new IDrawable[] { GTUITextures.BUTTON_STANDARD_PRESSED, mode1 }; } else { - return new IDrawable[] { GT_UITextures.BUTTON_STANDARD, - GT_UITextures.OVERLAY_BUTTON_POWER_SWITCH_OFF }; + return new IDrawable[] { GTUITextures.BUTTON_STANDARD, + GTUITextures.OVERLAY_BUTTON_POWER_SWITCH_OFF }; } }) diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/RestrictedInputHatchME.java b/src/main/java/reobf/proghatches/gt/metatileentity/RestrictedInputHatchME.java index 97eb393..afe2654 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/RestrictedInputHatchME.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/RestrictedInputHatchME.java @@ -1,7 +1,7 @@ package reobf.proghatches.gt.metatileentity; -import static gregtech.api.enums.GT_Values.TIER_COLORS; -import static gregtech.api.enums.GT_Values.VN; +import static gregtech.api.enums.GTValues.TIER_COLORS; +import static gregtech.api.enums.GTValues.VN; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_ME_INPUT_FLUID_HATCH; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_ME_INPUT_FLUID_HATCH_ACTIVE; import static gregtech.api.metatileentity.BaseTileEntity.TOOLTIP_DELAY; @@ -75,33 +75,33 @@ import appeng.me.helpers.AENetworkProxy; import appeng.me.helpers.IGridProxyable; import appeng.util.item.AEFluidStack; -import gregtech.api.GregTech_API; +import gregtech.api.GregTechAPI; import gregtech.api.enums.ItemList; -import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.gui.modularui.GTUITextures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.modularui.IAddGregtechLogo; import gregtech.api.interfaces.modularui.IAddUIWidgets; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; +import gregtech.api.metatileentity.implementations.MTEHatchInput; +import gregtech.api.metatileentity.implementations.MTEMultiBlockBase; import gregtech.api.recipe.check.CheckRecipeResult; import gregtech.api.recipe.check.CheckRecipeResultRegistry; import gregtech.api.recipe.check.SimpleCheckRecipeResult; import gregtech.api.render.TextureFactory; -import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTUtility; import gregtech.api.util.shutdown.ShutDownReasonRegistry; -import gregtech.common.tileentities.machines.GT_MetaTileEntity_Hatch_Input_ME; +import gregtech.common.tileentities.machines.MTEHatchInputME; import gregtech.common.tileentities.machines.IRecipeProcessingAwareHatch; import mcp.mobius.waila.api.IWailaConfigHandler; import mcp.mobius.waila.api.IWailaDataAccessor; -public class RestrictedInputHatchME extends GT_MetaTileEntity_Hatch_Input_ME implements IDataCopyablePlaceHolderSuper +public class RestrictedInputHatchME extends MTEHatchInputME implements IDataCopyablePlaceHolderSuper { public RestrictedInputHatchME(int aID, boolean autoPullAvailable, String aName, String aNameRegional) { super(aID, autoPullAvailable, aName, aNameRegional); - Registration.items.add(new ItemStack(GregTech_API.sBlockMachines, 1, aID)); + Registration.items.add(new ItemStack(GregTechAPI.sBlockMachines, 1, aID)); desc=reobf.proghatches.main.Config.get("RIHME", ImmutableMap.of()); } public RestrictedInputHatchME(String aName, boolean autoPullAvailable, int aTier, String[] aDescription, @@ -163,7 +163,7 @@ public void updateInformationSlot(int index) { } catch (final GridAccessException ignored) {} } @Override -public CheckRecipeResult endRecipeProcessing(GT_MetaTileEntity_MultiBlockBase controller) { +public CheckRecipeResult endRecipeProcessing(MTEMultiBlockBase controller) { try{ return super.endRecipeProcessing(controller);}finally{ for (int index = 0; index < SLOT_COUNT; index++) { @@ -196,11 +196,11 @@ public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildCont .setPlayClickSound(true) .setBackground(() -> { if (autoPullFluidList) { - return new IDrawable[] { GT_UITextures.BUTTON_STANDARD_PRESSED, - GT_UITextures.OVERLAY_BUTTON_AUTOPULL_ME }; + return new IDrawable[] { GTUITextures.BUTTON_STANDARD_PRESSED, + GTUITextures.OVERLAY_BUTTON_AUTOPULL_ME }; } else { - return new IDrawable[] { GT_UITextures.BUTTON_STANDARD, - GT_UITextures.OVERLAY_BUTTON_AUTOPULL_ME_DISABLED }; + return new IDrawable[] { GTUITextures.BUTTON_STANDARD, + GTUITextures.OVERLAY_BUTTON_AUTOPULL_ME_DISABLED }; } }) .addTooltips( @@ -222,7 +222,7 @@ public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildCont .setBackground(() -> { { return new IDrawable[] { - GT_UITextures.BUTTON_STANDARD + GTUITextures.BUTTON_STANDARD }; } }) @@ -253,18 +253,18 @@ Widget createMultiplesModeButton(IWidgetBuilder builder,int HEIGHT) { .setBackground(() -> { if (multiples==1) { - return new IDrawable[] { GT_UITextures.BUTTON_STANDARD_PRESSED, + return new IDrawable[] { GTUITextures.BUTTON_STANDARD_PRESSED, mode0 }; } else if (multiples==2) { - return new IDrawable[] { GT_UITextures.BUTTON_STANDARD_PRESSED, + return new IDrawable[] { GTUITextures.BUTTON_STANDARD_PRESSED, mode1 }; } else { - return new IDrawable[] { GT_UITextures.BUTTON_STANDARD, - GT_UITextures.OVERLAY_BUTTON_POWER_SWITCH_OFF }; + return new IDrawable[] { GTUITextures.BUTTON_STANDARD, + GTUITextures.OVERLAY_BUTTON_POWER_SWITCH_OFF }; } }) @@ -281,7 +281,7 @@ protected ModularWindow createStackSizeConfigurationWindow(final EntityPlayer pl final int PARENT_WIDTH = getGUIWidth(); final int PARENT_HEIGHT = getGUIHeight(); ModularWindow.Builder builder = ModularWindow.builder(WIDTH, HEIGHT); - builder.setBackground(GT_UITextures.BACKGROUND_SINGLEBLOCK_DEFAULT); + builder.setBackground(GTUITextures.BACKGROUND_SINGLEBLOCK_DEFAULT); builder.setGuiTint(getGUIColorization()); builder.setDraggable(true); builder.setPos( @@ -302,7 +302,7 @@ protected ModularWindow createStackSizeConfigurationWindow(final EntityPlayer pl .setTextColor(Color.WHITE.normal) .setSize(70, 18) .setPos(3, 18+18) - .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD)); + .setBackground(GTUITextures.BACKGROUND_TEXT_FIELD)); builder.widget( TextWidget.localised("proghatches.restricted.bound.up") .setPos(3, 42+18) @@ -316,7 +316,7 @@ protected ModularWindow createStackSizeConfigurationWindow(final EntityPlayer pl .setTextColor(Color.WHITE.normal) .setSize(70, 18) .setPos(3, 58+18) - .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD)); + .setBackground(GTUITextures.BACKGROUND_TEXT_FIELD)); builder.widget(createMultiplesModeButton(builder,HEIGHT)); return builder.build(); } diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/SuperChestME.java b/src/main/java/reobf/proghatches/gt/metatileentity/SuperChestME.java index 7642fb6..b7bd6ab 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/SuperChestME.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/SuperChestME.java @@ -78,16 +78,16 @@ import appeng.util.item.FluidList; import appeng.util.item.ItemList; import appeng.util.prioitylist.PrecisePriorityList; -import gregtech.api.GregTech_API; -import gregtech.api.gui.modularui.GT_UIInfos; -import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.GregTechAPI; +import gregtech.api.gui.modularui.GTUIInfos; +import gregtech.api.gui.modularui.GTUITextures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus; -import gregtech.api.util.GT_Utility; +import gregtech.api.metatileentity.implementations.MTEHatch; +import gregtech.api.metatileentity.implementations.MTEHatchInputBus; +import gregtech.api.util.GTUtility; import io.netty.buffer.ByteBuf; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; @@ -110,7 +110,7 @@ import reobf.proghatches.util.IIconTexture; import reobf.proghatches.util.ProghatchesUtil; -public class SuperChestME extends GT_MetaTileEntity_Hatch implements ICellContainer, IGridProxyable +public class SuperChestME extends MTEHatch implements ICellContainer, IGridProxyable ,IPriorityHost,IStoageCellUpdate { @@ -126,7 +126,7 @@ public SuperChestME(int aID, String aName, String aNameRegional, int aTier, int ) ), new ITexture[0]); - Registration.items.add(new ItemStack(GregTech_API.sBlockMachines, 1, aID)); + Registration.items.add(new ItemStack(GregTechAPI.sBlockMachines, 1, aID)); } int capOverride; @Override @@ -249,7 +249,7 @@ public int getPriority() { return piority; } private ItemStack visualStack() { - return new ItemStack(GregTech_API.sBlockMachines,1, getBaseMetaTileEntity().getMetaTileID()); + return new ItemStack(GregTechAPI.sBlockMachines,1, getBaseMetaTileEntity().getMetaTileID()); } AENetworkProxy gridProxy; private void updateValidGridProxySides() { @@ -490,23 +490,23 @@ public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex } protected void fillStacksIntoFirstSlots() { final int L = mInventory.length; - HashMap slots = new HashMap<>(L); - HashMap stacks = new HashMap<>(L); - List order = new ArrayList<>(L); + HashMap slots = new HashMap<>(L); + HashMap stacks = new HashMap<>(L); + List order = new ArrayList<>(L); List validSlots = new ArrayList<>(L); for (int i = 1; i < L; i++) { if (!isValidSlot(i)) continue; validSlots.add(i); ItemStack s = mInventory[i]; if (s == null) continue; - GT_Utility.ItemId sID = GT_Utility.ItemId.createNoCopy(s); + GTUtility.ItemId sID = GTUtility.ItemId.createNoCopy(s); slots.merge(sID, s.stackSize, Integer::sum); if (!stacks.containsKey(sID)) stacks.put(sID, s); order.add(sID); mInventory[i] = null; } int slotindex = 0; - for (GT_Utility.ItemId sID : order) { + for (GTUtility.ItemId sID : order) { int toSet = slots.get(sID); if (toSet == 0) continue; int slot = validSlots.get(slotindex); @@ -614,10 +614,10 @@ public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlaye return true; } - GT_UIInfos.openGTTileEntityUI(aBaseMetaTileEntity, aPlayer); + GTUIInfos.openGTTileEntityUI(aBaseMetaTileEntity, aPlayer); return true; } -@Override +//@Override public boolean useModularUI() { return true; } @@ -694,7 +694,7 @@ public void addUIWidgets(Builder builder, UIBuildContext buildContext) { updateFilter(cachedFilter[0]); autoUnlock = val;post(); //updateSlots(); - }, GT_UITextures.OVERLAY_BUTTON_RECIPE_UNLOCKED, + }, GTUITextures.OVERLAY_BUTTON_RECIPE_UNLOCKED, //new ItemDrawable(new ItemStack(Items.slime_ball)), ImmutableList.of( @@ -731,7 +731,7 @@ public void setStackInSlot(int slot, ItemStack stack) { .setFocusOnGuiOpen(true).setTextColor(Color.WHITE.dark(1)) - .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD.withOffset(-1, -1, 2, 2)) + .setBackground(GTUITextures.BACKGROUND_TEXT_FIELD.withOffset(-1, -1, 2, 2)) .addTooltip(StatCollector.translateToLocal("programmable_hatches.gt.piority")) .setPos(3+2,18*3+3+1).setSize(16*8,16)) .widget(new TextFieldWidget() @@ -743,24 +743,24 @@ public void setStackInSlot(int slot, ItemStack stack) { .setTextColor(Color.WHITE.dark(1)) - .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD.withOffset(-1, -1, 2, 2)) + .setBackground(GTUITextures.BACKGROUND_TEXT_FIELD.withOffset(-1, -1, 2, 2)) .addTooltip(StatCollector.translateToLocal("programmable_hatches.gt.capOverride.64")) .setPos(3+18*5+1, 3+1).setSize(16*4,16)) .widget(new CycleButtonWidget().setToggle(() -> voidFull, val -> { voidFull = val; if (!voidFull) { - GT_Utility.sendChatToPlayer( + GTUtility.sendChatToPlayer( buildContext.getPlayer(), - GT_Utility.trans("269", "Void Full Mode Disabled")); + GTUtility.trans("269", "Void Full Mode Disabled")); } else { - GT_Utility.sendChatToPlayer( + GTUtility.sendChatToPlayer( buildContext.getPlayer(), - GT_Utility.trans("270", "Void Full Mode Enabled")); + GTUtility.trans("270", "Void Full Mode Enabled")); } }) - .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE) - .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_TANK_VOID_ALL) + .setVariableBackground(GTUITextures.BUTTON_STANDARD_TOGGLE) + .setStaticTexture(GTUITextures.OVERLAY_BUTTON_TANK_VOID_ALL) .setGTTooltip(() -> mTooltipCache.getData("GT5U.machines.digitaltank.voidfull.tooltip")) .setTooltipShowUpDelay(TOOLTIP_DELAY) .setPos(3+18*3,3+18*2) @@ -770,17 +770,17 @@ public void setStackInSlot(int slot, ItemStack stack) { voidOverflow = val; if (!voidOverflow) { - GT_Utility.sendChatToPlayer( + GTUtility.sendChatToPlayer( buildContext.getPlayer(), - GT_Utility.trans("267", "Overflow Voiding Mode Disabled")); + GTUtility.trans("267", "Overflow Voiding Mode Disabled")); } else { - GT_Utility.sendChatToPlayer( + GTUtility.sendChatToPlayer( buildContext.getPlayer(), - GT_Utility.trans("268", "Overflow Voiding Mode Enabled")); + GTUtility.trans("268", "Overflow Voiding Mode Enabled")); } }) - .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE) - .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_TANK_VOID_EXCESS) + .setVariableBackground(GTUITextures.BUTTON_STANDARD_TOGGLE) + .setStaticTexture(GTUITextures.OVERLAY_BUTTON_TANK_VOID_EXCESS) .setGTTooltip(() -> mTooltipCache.getData("GT5U.machines.digitaltank.voidoverflow.tooltip")) .setTooltipShowUpDelay(TOOLTIP_DELAY) .setPos(3+18*4,3+18*2) @@ -794,7 +794,7 @@ private Widget createButton(Supplier getter, Consumer setter, return new CycleButtonWidget() .setToggle(getter, setter).setTextureGetter(__->picture) - .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE).setTooltipShowUpDelay(TOOLTIP_DELAY) + .setVariableBackground(GTUITextures.BUTTON_STANDARD_TOGGLE).setTooltipShowUpDelay(TOOLTIP_DELAY) .setPos(7 + offset * 18, 62).setSize(18, 18).addTooltips(tooltip); } @Override diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/SuperTankME.java b/src/main/java/reobf/proghatches/gt/metatileentity/SuperTankME.java index 5efe2e6..317bd3a 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/SuperTankME.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/SuperTankME.java @@ -85,17 +85,17 @@ import appeng.util.item.ItemList; import appeng.util.prioitylist.IPartitionList; import appeng.util.prioitylist.PrecisePriorityList; -import gregtech.api.GregTech_API; -import gregtech.api.gui.modularui.GT_UIInfos; -import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.GregTechAPI; +import gregtech.api.gui.modularui.GTUIInfos; +import gregtech.api.gui.modularui.GTUITextures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.BaseMetaTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus; -import gregtech.api.util.GT_Utility; +import gregtech.api.metatileentity.implementations.MTEHatch; +import gregtech.api.metatileentity.implementations.MTEHatchInputBus; +import gregtech.api.util.GTUtility; import li.cil.oc.server.machine.Machine; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; @@ -128,7 +128,7 @@ import reobf.proghatches.util.IIconTexture; import reobf.proghatches.util.ProghatchesUtil; -public class SuperTankME extends GT_MetaTileEntity_Hatch implements ICellContainer, IGridProxyable +public class SuperTankME extends MTEHatch implements ICellContainer, IGridProxyable ,IPriorityHost,IStoageCellUpdate { @@ -147,7 +147,7 @@ public SuperTankME(int aID, String aName, String aNameRegional, int aTier, int a ), new ITexture[0]); content.setCapacity(commonSizeCompute(aTier)); - Registration.items.add(new ItemStack(GregTech_API.sBlockMachines, 1, aID)); + Registration.items.add(new ItemStack(GregTechAPI.sBlockMachines, 1, aID)); } @@ -231,7 +231,7 @@ public int getPriority() { return piority; } private ItemStack visualStack() { - return new ItemStack(GregTech_API.sBlockMachines,1, getBaseMetaTileEntity().getMetaTileID()); + return new ItemStack(GregTechAPI.sBlockMachines,1, getBaseMetaTileEntity().getMetaTileID()); } AENetworkProxy gridProxy; private void updateValidGridProxySides() { @@ -436,7 +436,7 @@ public boolean isItemValidForSlot(int aIndex, ItemStack aStack) { (aStack.getItem() instanceof ItemFluidPacket)|| - GT_Utility.getFluidForFilledItem(aStack, true)!=null + GTUtility.getFluidForFilledItem(aStack, true)!=null ; @@ -638,8 +638,8 @@ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { if( FluidContainerRegistry.isFilledContainer(mInventory[i])){ - FluidStack f = GT_Utility.getFluidForFilledItem(mInventory[i], true); - ItemStack it = GT_Utility.getContainerForFilledItem(mInventory[i], true); + FluidStack f = GTUtility.getFluidForFilledItem(mInventory[i], true); + ItemStack it = GTUtility.getContainerForFilledItem(mInventory[i], true); f.amount*=mInventory[i].stackSize; if(f!=null&&content.fill(f, false)==f.amount){ content.fill(f, true); @@ -683,10 +683,10 @@ public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlaye if(ProghatchesUtil.handleUse(aPlayer, (MetaTileEntity) aBaseMetaTileEntity.getMetaTileEntity())){ return true; } - GT_UIInfos.openGTTileEntityUI(aBaseMetaTileEntity, aPlayer); + GTUIInfos.openGTTileEntityUI(aBaseMetaTileEntity, aPlayer); return true; } -@Override +//@Override public boolean useModularUI() { return true; } @@ -766,7 +766,7 @@ public void addUIWidgets(Builder builder, UIBuildContext buildContext) { cachedFilter=null; updateFilter(cachedFilter);post(); //updateSlots(); - }, GT_UITextures.OVERLAY_BUTTON_RECIPE_UNLOCKED, + }, GTUITextures.OVERLAY_BUTTON_RECIPE_UNLOCKED, //new ItemDrawable(new ItemStack(Items.slime_ball)), ImmutableList.of( @@ -796,7 +796,7 @@ public void addUIWidgets(Builder builder, UIBuildContext buildContext) { .setFocusOnGuiOpen(true).setTextColor(Color.WHITE.dark(1)) - .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD.withOffset(-1, -1, 2, 2)) + .setBackground(GTUITextures.BACKGROUND_TEXT_FIELD.withOffset(-1, -1, 2, 2)) .addTooltip(StatCollector.translateToLocal("programmable_hatches.gt.piority")) .setPos(3+2,18*3+3+1).setSize(16*8,16)) .widget(new TextFieldWidget() @@ -811,24 +811,24 @@ public void addUIWidgets(Builder builder, UIBuildContext buildContext) { .setTextColor(Color.WHITE.dark(1)) - .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD.withOffset(-1, -1, 2, 2)) + .setBackground(GTUITextures.BACKGROUND_TEXT_FIELD.withOffset(-1, -1, 2, 2)) .addTooltip(StatCollector.translateToLocal("programmable_hatches.gt.capOverride")) .setPos(3+18*5+1, 3+1).setSize(16*4,16)) .widget(new CycleButtonWidget().setToggle(() -> voidFull, val -> { voidFull = val; if (!voidFull) { - GT_Utility.sendChatToPlayer( + GTUtility.sendChatToPlayer( buildContext.getPlayer(), - GT_Utility.trans("269", "Void Full Mode Disabled")); + GTUtility.trans("269", "Void Full Mode Disabled")); } else { - GT_Utility.sendChatToPlayer( + GTUtility.sendChatToPlayer( buildContext.getPlayer(), - GT_Utility.trans("270", "Void Full Mode Enabled")); + GTUtility.trans("270", "Void Full Mode Enabled")); } }) - .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE) - .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_TANK_VOID_ALL) + .setVariableBackground(GTUITextures.BUTTON_STANDARD_TOGGLE) + .setStaticTexture(GTUITextures.OVERLAY_BUTTON_TANK_VOID_ALL) .setGTTooltip(() -> mTooltipCache.getData("GT5U.machines.digitaltank.voidfull.tooltip")) .setTooltipShowUpDelay(TOOLTIP_DELAY) .setPos(3+18*3,3+18*2) @@ -838,17 +838,17 @@ public void addUIWidgets(Builder builder, UIBuildContext buildContext) { voidOverflow = val; if (!voidOverflow) { - GT_Utility.sendChatToPlayer( + GTUtility.sendChatToPlayer( buildContext.getPlayer(), - GT_Utility.trans("267", "Overflow Voiding Mode Disabled")); + GTUtility.trans("267", "Overflow Voiding Mode Disabled")); } else { - GT_Utility.sendChatToPlayer( + GTUtility.sendChatToPlayer( buildContext.getPlayer(), - GT_Utility.trans("268", "Overflow Voiding Mode Enabled")); + GTUtility.trans("268", "Overflow Voiding Mode Enabled")); } }) - .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE) - .setStaticTexture(GT_UITextures.OVERLAY_BUTTON_TANK_VOID_EXCESS) + .setVariableBackground(GTUITextures.BUTTON_STANDARD_TOGGLE) + .setStaticTexture(GTUITextures.OVERLAY_BUTTON_TANK_VOID_EXCESS) .setGTTooltip(() -> mTooltipCache.getData("GT5U.machines.digitaltank.voidoverflow.tooltip")) .setTooltipShowUpDelay(TOOLTIP_DELAY) .setPos(3+18*4,3+18*2) @@ -866,7 +866,7 @@ public void onFacingChange() { private Widget createButton(Supplier getter, Consumer setter, IDrawable picture, List tooltip, int offset) { return new CycleButtonWidget().setToggle(getter, setter).setTextureGetter(__->picture) - .setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE).setTooltipShowUpDelay(TOOLTIP_DELAY) + .setVariableBackground(GTUITextures.BUTTON_STANDARD_TOGGLE).setTooltipShowUpDelay(TOOLTIP_DELAY) .setPos(7 + offset * 18, 62).setSize(18, 18).addTooltips(tooltip); } @Override @@ -964,23 +964,23 @@ public void onColorChangeServer(byte aColor) { protected void fillStacksIntoFirstSlots() { final int L = mInventory.length; - HashMap slots = new HashMap<>(L); - HashMap stacks = new HashMap<>(L); - List order = new ArrayList<>(L); + HashMap slots = new HashMap<>(L); + HashMap stacks = new HashMap<>(L); + List order = new ArrayList<>(L); List validSlots = new ArrayList<>(L); for (int i = 0; i < L; i++) { if (!isValidSlot(i)) continue; validSlots.add(i); ItemStack s = mInventory[i]; if (s == null) continue; - GT_Utility.ItemId sID = GT_Utility.ItemId.createNoCopy(s); + GTUtility.ItemId sID = GTUtility.ItemId.createNoCopy(s); slots.merge(sID, s.stackSize, Integer::sum); if (!stacks.containsKey(sID)) stacks.put(sID, s); order.add(sID); mInventory[i] = null; } int slotindex = 0; - for (GT_Utility.ItemId sID : order) { + for (GTUtility.ItemId sID : order) { int toSet = slots.get(sID); if (toSet == 0) continue; int slot = validSlots.get(slotindex); diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/VoidOutputBus.java b/src/main/java/reobf/proghatches/gt/metatileentity/VoidOutputBus.java index 1d01574..4dc99a6 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/VoidOutputBus.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/VoidOutputBus.java @@ -1,6 +1,6 @@ package reobf.proghatches.gt.metatileentity; -import static gregtech.api.util.GT_Utility.moveMultipleItemStacks; +import static gregtech.api.util.GTUtility.moveMultipleItemStacks; import java.util.Arrays; import java.util.LinkedList; @@ -22,13 +22,13 @@ import appeng.util.Platform; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.GregTech_API; +import gregtech.api.GregTechAPI; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_OutputBus; -import gregtech.api.util.GT_Utility; -import gregtech.common.GT_Client; +import gregtech.api.metatileentity.implementations.MTEHatchOutputBus; +import gregtech.api.util.GTUtility; + import net.minecraft.block.BlockLiquid; import net.minecraft.block.material.Material; import net.minecraft.client.Minecraft; @@ -56,7 +56,7 @@ import reobf.proghatches.net.VoidFXMessage; import reobf.proghatches.util.ProghatchesUtil; -public class VoidOutputBus extends GT_MetaTileEntity_Hatch_OutputBus { +public class VoidOutputBus extends MTEHatchOutputBus { public VoidOutputBus(String mName, byte mTier, String[] mDescriptionArray, ITexture[][][] mTextures ) { @@ -123,7 +123,7 @@ public VoidOutputBus(int aID, String aName, String aNameRegional, int tier) { ); - Registration.items.add(new ItemStack(GregTech_API.sBlockMachines, 1, aID)); + Registration.items.add(new ItemStack(GregTechAPI.sBlockMachines, 1, aID)); } @@ -468,7 +468,7 @@ public void onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, f if (!getBaseMetaTileEntity().getCoverInfoAtSide(side) .isGUIClickable()) return; fx=!fx; - GT_Utility.sendChatToPlayer( + GTUtility.sendChatToPlayer( aPlayer, StatCollector.translateToLocal("proghatches.gt.void.fx."+fx) ); diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/VoidOutputHatch.java b/src/main/java/reobf/proghatches/gt/metatileentity/VoidOutputHatch.java index eb7eb99..e65b44b 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/VoidOutputHatch.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/VoidOutputHatch.java @@ -1,6 +1,6 @@ package reobf.proghatches.gt.metatileentity; -import static gregtech.api.util.GT_Utility.moveMultipleItemStacks; +import static gregtech.api.util.GTUtility.moveMultipleItemStacks; import java.util.Arrays; import java.util.LinkedList; @@ -21,15 +21,15 @@ import appeng.util.Platform; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.GregTech_API; +import gregtech.api.GregTechAPI; import gregtech.api.enums.ParticleFX; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_OutputBus; -import gregtech.api.util.GT_Utility; -import gregtech.common.GT_Client; +import gregtech.api.metatileentity.implementations.MTEHatchOutput; +import gregtech.api.metatileentity.implementations.MTEHatchOutputBus; +import gregtech.api.util.GTUtility; + import net.minecraft.block.BlockLiquid; import net.minecraft.block.material.Material; import net.minecraft.client.Minecraft; @@ -62,7 +62,7 @@ import reobf.proghatches.net.WayPointMessage; import reobf.proghatches.util.ProghatchesUtil; -public class VoidOutputHatch extends GT_MetaTileEntity_Hatch_Output { +public class VoidOutputHatch extends MTEHatchOutput { public VoidOutputHatch(String mName, byte mTier, String[] mDescriptionArray, ITexture[][][] mTextures ) { @@ -132,7 +132,7 @@ public VoidOutputHatch(int aID, String aName, String aNameRegional, int tier) { ); - Registration.items.add(new ItemStack(GregTech_API.sBlockMachines, 1, aID)); + Registration.items.add(new ItemStack(GregTechAPI.sBlockMachines, 1, aID)); } @@ -496,7 +496,7 @@ public void onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, f if (!getBaseMetaTileEntity().getCoverInfoAtSide(side) .isGUIClickable()) return; fx=!fx; - GT_Utility.sendChatToPlayer( + GTUtility.sendChatToPlayer( aPlayer, StatCollector.translateToLocal("proghatches.gt.void.fx."+fx) ); diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/multi/IngredientDistributor.java b/src/main/java/reobf/proghatches/gt/metatileentity/multi/IngredientDistributor.java index bbd9e69..baee60d 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/multi/IngredientDistributor.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/multi/IngredientDistributor.java @@ -3,7 +3,7 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; import static gregtech.api.enums.Textures.BlockIcons.*; import static gregtech.api.metatileentity.BaseTileEntity.TOOLTIP_DELAY; -import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; +import static gregtech.api.util.GTStructureUtility.buildHatchAdder; import java.io.IOException; import java.lang.reflect.Field; @@ -51,33 +51,33 @@ import appeng.me.GridAccessException; import appeng.util.item.AEFluidStack; import appeng.util.item.AEItemStack; -import gregtech.api.GregTech_API; -import gregtech.api.enums.GT_HatchElement; +import gregtech.api.GregTechAPI; +import gregtech.api.enums.HatchElement; import gregtech.api.enums.Materials; import gregtech.api.enums.SoundResource; import gregtech.api.enums.Textures.BlockIcons; import gregtech.api.enums.VoidingMode; -import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.gui.modularui.GTUITextures; import gregtech.api.interfaces.IHatchElement; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.fluid.IFluidStore; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_EnhancedMultiBlockBase; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_OutputBus; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; +import gregtech.api.metatileentity.implementations.MTEEnhancedMultiBlockBase; +import gregtech.api.metatileentity.implementations.MTEHatchInput; +import gregtech.api.metatileentity.implementations.MTEHatchInputBus; +import gregtech.api.metatileentity.implementations.MTEHatchOutput; +import gregtech.api.metatileentity.implementations.MTEHatchOutputBus; +import gregtech.api.metatileentity.implementations.MTEMultiBlockBase; import gregtech.api.recipe.check.CheckRecipeResult; import gregtech.api.recipe.check.SimpleCheckRecipeResult; import gregtech.api.render.TextureFactory; -import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -import gregtech.api.util.GT_StructureUtility; -import gregtech.api.util.GT_Utility; -import gregtech.api.util.IGT_HatchAdder; -import gregtech.common.tileentities.machines.GT_MetaTileEntity_Hatch_OutputBus_ME; -import gregtech.common.tileentities.machines.GT_MetaTileEntity_Hatch_Output_ME; +import gregtech.api.util.MultiblockTooltipBuilder; +import gregtech.api.util.GTStructureUtility; +import gregtech.api.util.GTUtility; +import gregtech.api.util.IGTHatchAdder; +import gregtech.common.tileentities.machines.MTEHatchOutputBusME; +import gregtech.common.tileentities.machines.MTEHatchOutputME; import gregtech.common.tileentities.machines.IDualInputHatch; import gregtech.common.tileentities.machines.IDualInputInventory; import gregtech.common.tileentities.machines.IRecipeProcessingAwareHatch; @@ -101,14 +101,14 @@ import reobf.proghatches.main.registration.Registration; -public class IngredientDistributor extends GT_MetaTileEntity_EnhancedMultiBlockBase +public class IngredientDistributor extends MTEEnhancedMultiBlockBase implements ISurvivalConstructable { public IngredientDistributor(String aName) { super(aName); } public static IStructureElement ofFrameAdder(Materials aFrameMaterial,Consumer onadded) { - IStructureElement frame = GT_StructureUtility.ofFrame(aFrameMaterial); + IStructureElement frame = GTStructureUtility.ofFrame(aFrameMaterial); return new IStructureElement() { @@ -184,7 +184,7 @@ public boolean addOutputBusToMachineList(IGregTechTileEntity aTileEntity, int aB boolean ok= super.addOutputBusToMachineList(aTileEntity, aBaseCasingIndex); if(ok&&!hasBusThisLayer){hasBusThisLayer=true;}else{return false;} if(ok&& - !(aTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_OutputBus_ME)){ + !(aTileEntity.getMetaTileEntity() instanceof MTEHatchOutputBusME)){ allMEHatch=false; } return ok; @@ -194,7 +194,7 @@ public boolean addOutputHatchToMachineList(IGregTechTileEntity aTileEntity, int boolean ok= super.addOutputHatchToMachineList(aTileEntity, aBaseCasingIndex); if(ok&&!hasHatchThisLayer){hasHatchThisLayer=true;}else{return false;} if(ok&& - !(aTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_Output_ME)){ + !(aTileEntity.getMetaTileEntity() instanceof MTEHatchOutputME)){ allMEHatch=false; } @@ -219,14 +219,14 @@ public boolean addOutputHatchToMachineList(IGregTechTileEntity aTileEntity, int - ofBlock(GregTech_API.sBlockCasings4, 12) + ofBlock(GregTechAPI.sBlockCasings4, 12) ) .addElement('f',StructureUtility.ofChain( - GT_StructureUtility.ofFrame(Materials.Terbium), + GTStructureUtility.ofFrame(Materials.Terbium), ofFrameAdder(Materials.Yttrium,s->((IngredientDistributor) s).onCheapFrameFound()) @@ -235,31 +235,31 @@ public boolean addOutputHatchToMachineList(IGregTechTileEntity aTileEntity, int )) .addElement('h', buildHatchAdder(IngredientDistributor.class) - .atLeast(GT_HatchElement.OutputBus.withAdder(IngredientDistributor::addBus) + .atLeast(HatchElement.OutputBus.withAdder(IngredientDistributor::addBus) .withCount(s->s.hasBusThisLayer?1:0) - ,GT_HatchElement.OutputHatch.withAdder(IngredientDistributor::addHatch) + ,HatchElement.OutputHatch.withAdder(IngredientDistributor::addHatch) .withCount(s->s.hasHatchThisLayer?1:0) ) //.shouldSkip((a,b)->a.hasBusThisLayer) .casingIndex(CASING_INDEX).dot(1) - .buildAndChain(GregTech_API.sBlockCasings4, 0) + .buildAndChain(GregTechAPI.sBlockCasings4, 0) ) .addElement('※', buildHatchAdder(IngredientDistributor.class) - .atLeast(GT_HatchElement.OutputBus.withAdder(IngredientDistributor::addBus) + .atLeast(HatchElement.OutputBus.withAdder(IngredientDistributor::addBus) .withCount(s->s.hasBusThisLayer?1:0) - ,GT_HatchElement.OutputHatch.withAdder(IngredientDistributor::addHatch) + ,HatchElement.OutputHatch.withAdder(IngredientDistributor::addHatch) .withCount(s->s.hasHatchThisLayer?1:0) ).allowOnly(ForgeDirection.DOWN) //.shouldSkip((a,b)->a.hasBusThisLayer) .casingIndex(CASING_INDEX).dot(1) - .buildAndChain(GregTech_API.sBlockCasings4, 0) + .buildAndChain(GregTechAPI.sBlockCasings4, 0) ) .addElement('m', buildHatchAdder(IngredientDistributor.class) - .atLeast(GT_HatchElement.Maintenance,GT_HatchElement.Energy) + .atLeast(HatchElement.Maintenance,HatchElement.Energy) .casingIndex(CASING_INDEX).dot(3) .buildAndChain( buildHatchAdder(IngredientDistributor.class) @@ -273,7 +273,7 @@ public List> mteClasses() { } @Override - public IGT_HatchAdder adder() { + public IGTHatchAdder adder() { return (s,w,u)->{ if(s==null)return false; @@ -309,7 +309,7 @@ public long count(IngredientDistributor t) { .casingIndex(CASING_INDEX).dot(3).build(), - ofBlock(GregTech_API.sBlockCasings4, 12) + ofBlock(GregTechAPI.sBlockCasings4, 12) ) ) @@ -326,7 +326,7 @@ public List> mteClasses() { } @Override - public IGT_HatchAdder adder() { + public IGTHatchAdder adder() { return IngredientDistributor::addDual; } @@ -342,8 +342,8 @@ public long count(IngredientDistributor t) { }} - ,GT_HatchElement.InputBus - ,GT_HatchElement.InputHatch + ,HatchElement.InputBus + ,HatchElement.InputHatch ).casingIndex(CASING_INDEX).dot(2).build() @@ -353,7 +353,7 @@ public long count(IngredientDistributor t) { public IngredientDistributor(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); - Registration.items.add(new ItemStack(GregTech_API.sBlockMachines, 1, aID)); + Registration.items.add(new ItemStack(GregTechAPI.sBlockMachines, 1, aID)); } @@ -410,8 +410,8 @@ public IStructureDefinition getStructureDefinition() { } @Override - protected GT_Multiblock_Tooltip_Builder createTooltip() { - final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + protected MultiblockTooltipBuilder createTooltip() { + final MultiblockTooltipBuilder tt = new MultiblockTooltipBuilder(); Config.get(tt, "M_ID"); return tt; } @@ -607,7 +607,7 @@ public void startRecipeProcessing() { ((IRecipeProcessingAwareDualHatch)s).startRecipeProcessing(); } - public CheckRecipeResult endRecipeProcessing(GT_MetaTileEntity_MultiBlockBase controller) { + public CheckRecipeResult endRecipeProcessing(MTEMultiBlockBase controller) { return ((IRecipeProcessingAwareDualHatch)s).endRecipeProcessing(controller); }}) ; @@ -632,7 +632,7 @@ public boolean isInputEmpty(){ return !mDualInputHatches.get(0).getFirstNonEmptyInventory().isPresent(); } if(mInputBusses.size()==1){ - GT_MetaTileEntity_Hatch_InputBus bus = mInputBusses.get(0); + MTEHatchInputBus bus = mInputBusses.get(0); for(int i=0;i0){return false;} } @@ -750,8 +750,8 @@ private boolean moveToOutpusME(IDualInputInventory opt) { if(f.length>mOutputHatches.size())return false; for(int index=0;index itemCache; try { @@ -963,8 +963,8 @@ private boolean isAllMEOutputEmpty(){ }else return false; } - for(GT_MetaTileEntity_Hatch_Output o:mOutputHatches){ - if(o instanceof GT_MetaTileEntity_Hatch_Output_ME){ + for(MTEHatchOutput o:mOutputHatches){ + if(o instanceof MTEHatchOutputME){ IItemList itemCache; try { @@ -983,20 +983,20 @@ private boolean isAllMEOutputEmpty(){ static{ if(f==null) try { - f=GT_MetaTileEntity_Hatch_OutputBus_ME.class.getDeclaredField("itemCache"); + f=MTEHatchOutputBusME.class.getDeclaredField("itemCache"); f.setAccessible(true); } catch (Exception e) { e.printStackTrace(); } if(f2==null) try { - f2=GT_MetaTileEntity_Hatch_Output_ME.class.getDeclaredField("fluidCache"); + f2=MTEHatchOutputME.class.getDeclaredField("fluidCache"); f2.setAccessible(true); } catch (Exception e) { e.printStackTrace(); }} @SuppressWarnings({ "unchecked", "unused" }) -private TransferCheckResult checkMEBus(GT_MetaTileEntity_Hatch_OutputBus_ME bus,ItemStack check,int index){ +private TransferCheckResult checkMEBus(MTEHatchOutputBusME bus,ItemStack check,int index){ try { IItemList itemCache =(IItemList) f.get(bus); @@ -1037,7 +1037,7 @@ private TransferCheckResult checkMEBus(GT_MetaTileEntity_Hatch_OutputBus_ME bus, return TransferCheckResult.ofSuccess(); } @SuppressWarnings({ "unchecked", "unused" }) -private TransferCheckResult checkMEHatch(GT_MetaTileEntity_Hatch_Output_ME bus,FluidStack check,int index){ +private TransferCheckResult checkMEHatch(MTEHatchOutputME bus,FluidStack check,int index){ try { IItemList itemCache =(IItemList) f2.get(bus); @@ -1092,8 +1092,8 @@ private FluidStack cp(FluidStack c) { static BaseActionSource getActionSourceFor(Object o){ if(cache==null)try { cache=new Method[2]; - cache[0]=GT_MetaTileEntity_Hatch_OutputBus_ME.class.getDeclaredMethod("getRequest"); - cache[1]=GT_MetaTileEntity_Hatch_Output_ME.class.getDeclaredMethod("getRequest"); + cache[0]=MTEHatchOutputBusME.class.getDeclaredMethod("getRequest"); + cache[1]=MTEHatchOutputME.class.getDeclaredMethod("getRequest"); cache[0].setAccessible(true); cache[1].setAccessible(true); } catch (NoSuchMethodException e) { @@ -1103,9 +1103,9 @@ static BaseActionSource getActionSourceFor(Object o){ if(cache.length==0)return fakeSource; try { - if(o instanceof GT_MetaTileEntity_Hatch_OutputBus_ME) + if(o instanceof MTEHatchOutputBusME) return (BaseActionSource) cache[0].invoke(o); - if(o instanceof GT_MetaTileEntity_Hatch_Output_ME) + if(o instanceof MTEHatchOutputME) return (BaseActionSource) cache[1].invoke(o); } catch (Exception e) { e.printStackTrace(); @@ -1141,9 +1141,9 @@ private boolean moveToOutpus(IDualInputInventory opt,boolean checkSpace) { if(checkSpace){ for(int index=0;index0)anyDiff=true; i[index].stackSize-=diff; } for(int index=0;index0)anyDiff=true; f[index].amount-=diff; @@ -1280,12 +1280,12 @@ private boolean moveToOutpus(IDualInputInventory opt,boolean checkSpace) { return anyDiff; } -private static int storeAll(GT_MetaTileEntity_Hatch_OutputBus bus,ItemStack aStack) { +private static int storeAll(MTEHatchOutputBus bus,ItemStack aStack) { bus.markDirty(); int consumed=0; for (int i = 0, mInventoryLength = bus.mInventory.length; i < mInventoryLength && aStack.stackSize > 0; i++) { ItemStack tSlot = bus.mInventory[i]; - if (GT_Utility.isStackInvalid(tSlot)) { + if (GTUtility.isStackInvalid(tSlot)) { int tRealStackLimit = Math.min(bus.getInventoryStackLimit(), aStack.getMaxStackSize()); if (aStack.stackSize <= tRealStackLimit) { bus.mInventory[i] = aStack; @@ -1415,13 +1415,13 @@ public void addUIWidgets(com.gtnewhorizons.modularui.api.screen.ModularWindow.Bu UIBuildContext buildContext) { builder.widget(new TransferCheckResultSyncer(()->this.lastfail, s->this.lastfail=s)); builder.widget( - new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK) + new DrawableWidget().setDrawable(GTUITextures.PICTURE_SCREEN_BLACK) .setPos(4, 4) .setSize(190, 85)); final SlotWidget inventorySlot = new SlotWidget(inventoryHandler, 1); builder.widget( inventorySlot.setPos(173, 167) - .setBackground(GT_UITextures.SLOT_DARK_GRAY)); + .setBackground(GTUITextures.SLOT_DARK_GRAY)); final DynamicPositionedColumn screenElements = new DynamicPositionedColumn(); drawTexts(screenElements, inventorySlot); @@ -1485,11 +1485,11 @@ ButtonWidget createBlockingModeButton(IWidgetBuilder builder) { : SoundResource.GUI_BUTTON_DOWN.resourceLocation) .setBackground(() -> { if (blocking) { - return new IDrawable[] { GT_UITextures.BUTTON_STANDARD_PRESSED, - GT_UITextures.OVERLAY_BUTTON_POWER_SWITCH_ON }; + return new IDrawable[] { GTUITextures.BUTTON_STANDARD_PRESSED, + GTUITextures.OVERLAY_BUTTON_POWER_SWITCH_ON }; } else { - return new IDrawable[] { GT_UITextures.BUTTON_STANDARD, - GT_UITextures.OVERLAY_BUTTON_POWER_SWITCH_OFF }; + return new IDrawable[] { GTUITextures.BUTTON_STANDARD, + GTUITextures.OVERLAY_BUTTON_POWER_SWITCH_OFF }; } }) diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/multi/LargeProgrammingCircuitProvider.java b/src/main/java/reobf/proghatches/gt/metatileentity/multi/LargeProgrammingCircuitProvider.java index 0ba2ddc..316697c 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/multi/LargeProgrammingCircuitProvider.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/multi/LargeProgrammingCircuitProvider.java @@ -3,10 +3,10 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass; -import static gregtech.api.enums.GT_HatchElement.Energy; -import static gregtech.api.enums.GT_HatchElement.Maintenance; +import static gregtech.api.enums.HatchElement.Energy; +import static gregtech.api.enums.HatchElement.Maintenance; import static gregtech.api.metatileentity.BaseTileEntity.TOOLTIP_DELAY; -import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; +import static gregtech.api.util.GTStructureUtility.buildHatchAdder; import java.lang.reflect.Method; import java.util.ArrayList; @@ -86,29 +86,28 @@ import appeng.me.helpers.AENetworkProxy; import appeng.me.helpers.IGridProxyable; import appeng.util.item.AEItemStack; -import gregtech.api.GregTech_API; +import gregtech.api.GregTechAPI; import gregtech.api.enums.ItemList; import gregtech.api.enums.SoundResource; import gregtech.api.enums.Textures.BlockIcons; -import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.gui.modularui.GTUITextures; import gregtech.api.interfaces.IHatchElement; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_EnhancedMultiBlockBase; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; +import gregtech.api.metatileentity.implementations.MTEEnhancedMultiBlockBase; +import gregtech.api.metatileentity.implementations.MTEHatch; +import gregtech.api.metatileentity.implementations.MTEMultiBlockBase; import gregtech.api.recipe.check.CheckRecipeResult; import gregtech.api.recipe.check.CheckRecipeResultRegistry; import gregtech.api.recipe.check.SimpleCheckRecipeResult; import gregtech.api.render.TextureFactory; -import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -import gregtech.api.util.GT_Utility; -import gregtech.api.util.IGT_HatchAdder; +import gregtech.api.util.MultiblockTooltipBuilder; +import gregtech.api.util.GTUtility; +import gregtech.api.util.IGTHatchAdder; import gregtech.api.util.shutdown.ShutDownReasonRegistry; import gregtech.api.util.shutdown.SimpleShutDownReason; -import gregtech.common.items.GT_MetaGenerated_Tool_01; -import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_LargeTurbine; + import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; @@ -136,7 +135,7 @@ import reobf.proghatches.main.registration.Registration; public class LargeProgrammingCircuitProvider - extends GT_MetaTileEntity_EnhancedMultiBlockBase + extends MTEEnhancedMultiBlockBase implements ISurvivalConstructable, IGridProxyable, ICraftingProvider, IInstantCompletable, ICircuitProvider, IInterfaceViewable, IPowerChannelState, IActionHost @@ -149,7 +148,7 @@ public LargeProgrammingCircuitProvider(String aName) { public LargeProgrammingCircuitProvider(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); - Registration.items.add(new ItemStack(GregTech_API.sBlockMachines, 1, aID)); + Registration.items.add(new ItemStack(GregTechAPI.sBlockMachines, 1, aID)); } @@ -184,14 +183,14 @@ public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) { protected static final String STRUCTURE_PIECE_LAYER_HINT = "layerHint"; protected static final String STRUCTURE_PIECE_TOP_HINT = "topHint"; static { - Function, IHatchElement> provider = s -> new IHatchElement() { + Function, IHatchElement> provider = s -> new IHatchElement() { @Override public List> mteClasses() { return ImmutableList.of(ProgrammingCircuitProvider.class, ProviderChainer.class,ProgrammingCircuitProviderPrefabricated.class); } @Override - public IGT_HatchAdder adder() { + public IGTHatchAdder adder() { return s; } @@ -237,22 +236,22 @@ public long count(LargeProgrammingCircuitProvider t) { .atLeast(Energy, Maintenance).casingIndex(CASING_INDEX).dot(1) .build(), - // ofBlock(GregTech_API.sBlockCasings4, 1), + // ofBlock(GregTechAPI.sBlockCasings4, 1), onElementPass(LargeProgrammingCircuitProvider::onCasingFound, - ofBlock(GregTech_API.sBlockCasings4, 1) + ofBlock(GregTechAPI.sBlockCasings4, 1) )) ) - .addElement('l', ofBlock(GregTech_API.sBlockCasings4, 1)) + .addElement('l', ofBlock(GregTechAPI.sBlockCasings4, 1)) .addElement('x', (IStructureElementChain) () -> { return buildHatchAdder(LargeProgrammingCircuitProvider.class).atLeast(providerTop) .casingIndex(CASING_INDEX).dot(2) .buildAndChain(acc,ofBlock(Api.INSTANCE.definitions().blocks().fluix().maybeBlock().get(), 0), StructureUtility.ofBlockAdder(LargeProgrammingCircuitProvider::onTopCenterFound, - GregTech_API.sBlockCasings4, 1)) + GregTechAPI.sBlockCasings4, 1)) .fallbacks(); } @@ -263,7 +262,7 @@ public long count(LargeProgrammingCircuitProvider t) { .casingIndex(CASING_INDEX).dot(2) // .disallowOnly(ForgeDirection.UP, // ForgeDirection.DOWN) - .buildAndChain(GregTech_API.sBlockCasings4, 1) + .buildAndChain(GregTechAPI.sBlockCasings4, 1) ) @@ -310,8 +309,8 @@ public ITexture[] getTexturesInactive(ITexture aBaseTexture) { } @Override - protected GT_Multiblock_Tooltip_Builder createTooltip() { - final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + protected MultiblockTooltipBuilder createTooltip() { + final MultiblockTooltipBuilder tt = new MultiblockTooltipBuilder(); /* * tt.addMachineType("Programming Circuit Provider") .addInfo( * "Controller block for the Large Programming Circuit Provider") @@ -419,7 +418,7 @@ static boolean addAccUnit(LargeProgrammingCircuitProvider t, Block block, int me } static boolean onTopCenterFound(LargeProgrammingCircuitProvider t, Block block, int meta) { - if (block == GregTech_API.sBlockCasings4 && meta == 1) { + if (block == GregTechAPI.sBlockCasings4 && meta == 1) { t.mTopLayerFound = true; return true; } @@ -435,7 +434,7 @@ static boolean addProviderTop(LargeProgrammingCircuitProvider t, IGregTechTileEn return addProviderWithUpdater(t, aTileEntity, text, tt -> { tt.mTopLayerFound = true; return !tt.providerFoundThisLayer;}); } - static private boolean addProviderWithUpdater( + static private boolean addProviderWithUpdater( LargeProgrammingCircuitProvider t, IGregTechTileEntity aTileEntity, Short text, Predicate cb) { @@ -652,7 +651,7 @@ public void loadNBTData(NBTTagCompound aNBT) { private appeng.util.item.ItemList ret = new appeng.util.item.ItemList(); @SuppressWarnings({ "deprecation", "unchecked" }) - public static void shut(GT_MetaTileEntity_MultiBlockBase thiz,String reason){ + public static void shut(MTEMultiBlockBase thiz,String reason){ if(shut==null){ try { @@ -661,7 +660,7 @@ public static void shut(GT_MetaTileEntity_MultiBlockBase thiz,String reason){ MyMod.LOG.info("Use ShutDownReason"); //lazy-load class Class c=Class.forName("reobf.proghatches.gt.metatileentity.multi.LargeProgrammingCircuitProvider$NewShutRunnable"); - shut=(BiConsumer) c.getConstructors()[0].newInstance(); + shut=(BiConsumer) c.getConstructors()[0].newInstance(); } catch (Exception e) { //2.5.1 MyMod.LOG.info("ShutDownReason.class not found, use 0-arg stopMachine."); @@ -686,11 +685,11 @@ public static void shut(GT_MetaTileEntity_MultiBlockBase thiz,String reason){ shut.accept(thiz,reason); } - static public class NewShutRunnable implements BiConsumer{ + static public class NewShutRunnable implements BiConsumer{ public NewShutRunnable(){} - //GT_MetaTileEntity_MultiBlockBase thiz; + //MTEMultiBlockBase thiz; @Override - public void accept(GT_MetaTileEntity_MultiBlockBase a,String reason) { + public void accept(MTEMultiBlockBase a,String reason) { if(reason==null){ a.stopMachine(ShutDownReasonRegistry.CRITICAL_NONE); return; @@ -702,7 +701,7 @@ public void accept(GT_MetaTileEntity_MultiBlockBase a,String reason) { } - static public BiConsumer shut; + static public BiConsumer shut; public int multiply=1; @Override @@ -998,8 +997,8 @@ ButtonWidget createParallelButton(IWidgetBuilder builder,UIBuildContext build .setBackground(() -> { - return new IDrawable[] { GT_UITextures.BUTTON_STANDARD, - GT_UITextures.PICTURE_INFORMATION }; + return new IDrawable[] { GTUITextures.BUTTON_STANDARD, + GTUITextures.PICTURE_INFORMATION }; }) @@ -1029,11 +1028,11 @@ ButtonWidget createRemoveCircuitButton(IWidgetBuilder builder,UIBuildContext : SoundResource.GUI_BUTTON_DOWN.resourceLocation) .setBackground(() -> { if (removeStorageCircuit) { - return new IDrawable[] { GT_UITextures.BUTTON_STANDARD_PRESSED, - GT_UITextures.OVERLAY_BUTTON_CROSS }; + return new IDrawable[] { GTUITextures.BUTTON_STANDARD_PRESSED, + GTUITextures.OVERLAY_BUTTON_CROSS }; } else { - return new IDrawable[] { GT_UITextures.BUTTON_STANDARD, - GT_UITextures.OVERLAY_BUTTON_CROSS }; + return new IDrawable[] { GTUITextures.BUTTON_STANDARD, + GTUITextures.OVERLAY_BUTTON_CROSS }; } }) @@ -1055,13 +1054,13 @@ ButtonWidget createRemoveCircuitButton(IWidgetBuilder builder,UIBuildContext public void addUIWidgets(com.gtnewhorizons.modularui.api.screen.ModularWindow.Builder builder, UIBuildContext buildContext) { builder.widget( - new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK) + new DrawableWidget().setDrawable(GTUITextures.PICTURE_SCREEN_BLACK) .setPos(4, 4) .setSize(190, 85)); final SlotWidget inventorySlot = new SlotWidget(inventoryHandler, 1); builder.widget( inventorySlot.setPos(173, 167) - .setBackground(GT_UITextures.SLOT_DARK_GRAY)); + .setBackground(GTUITextures.SLOT_DARK_GRAY)); final DynamicPositionedColumn screenElements = new DynamicPositionedColumn(); drawTexts(screenElements, inventorySlot); @@ -1089,7 +1088,7 @@ private ModularWindow createWindow(EntityPlayer s) { final int PARENT_WIDTH = getGUIWidth(); final int PARENT_HEIGHT = getGUIHeight(); ModularWindow.Builder builder = ModularWindow.builder(WIDTH, HEIGHT); - builder.setBackground(GT_UITextures.BACKGROUND_SINGLEBLOCK_DEFAULT); + builder.setBackground(GTUITextures.BACKGROUND_SINGLEBLOCK_DEFAULT); builder.setGuiTint(getGUIColorization()); builder.setDraggable(true); @@ -1112,7 +1111,7 @@ private ModularWindow createWindow(EntityPlayer s) { .setTextColor(Color.WHITE.normal) .setSize(18*6, 18) .setPos(3, 3) - .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD)); + .setBackground(GTUITextures.BACKGROUND_TEXT_FIELD)); /*builder.widget(new IntegerSyncer(()->{ w.setBounds(1,Math.max( totalAcc+1,1)); diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/util/IRecipeProcessingAwareDualHatch.java b/src/main/java/reobf/proghatches/gt/metatileentity/util/IRecipeProcessingAwareDualHatch.java index ffb5349..e4ac5e5 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/util/IRecipeProcessingAwareDualHatch.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/util/IRecipeProcessingAwareDualHatch.java @@ -1,6 +1,6 @@ package reobf.proghatches.gt.metatileentity.util; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; +import gregtech.api.metatileentity.implementations.MTEMultiBlockBase; import gregtech.api.recipe.check.CheckRecipeResult; import gregtech.common.tileentities.machines.IDualInputHatch; //spotless:off @@ -10,7 +10,7 @@ public interface IRecipeProcessingAwareDualHatch extends IDualInputHatch{ void startRecipeProcessing() ; - CheckRecipeResult endRecipeProcessing(GT_MetaTileEntity_MultiBlockBase controller) ; + CheckRecipeResult endRecipeProcessing(MTEMultiBlockBase controller) ; } diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/util/InventoryItemHandler.java b/src/main/java/reobf/proghatches/gt/metatileentity/util/InventoryItemHandler.java index fd4b9c6..84b5123 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/util/InventoryItemHandler.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/util/InventoryItemHandler.java @@ -6,7 +6,7 @@ import com.gtnewhorizons.modularui.api.forge.ItemHandlerHelper; import com.gtnewhorizons.modularui.api.forge.ItemStackHandler; -import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTUtility; //spotless:off /** diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/util/MappingItemHandler.java b/src/main/java/reobf/proghatches/gt/metatileentity/util/MappingItemHandler.java index 5be8596..74a18ff 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/util/MappingItemHandler.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/util/MappingItemHandler.java @@ -4,7 +4,7 @@ import com.gtnewhorizons.modularui.api.forge.ItemHandlerHelper; -import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTUtility; public class MappingItemHandler implements com.gtnewhorizons.modularui.api.forge.IItemHandlerModifiable ,IInterhandlerGroup @@ -120,7 +120,7 @@ public int getSlotLimit(int slot) { public void setStackInSlot(int var1, ItemStack var2) { try{ if (phantom) { - is[var1 - index] = GT_Utility.copyAmount(0, var2); + is[var1 - index] = GTUtility.copyAmount(0, var2); } else is[var1 - index] = var2; diff --git a/src/main/java/reobf/proghatches/item/ItemFixer.java b/src/main/java/reobf/proghatches/item/ItemFixer.java index e269439..d5589b2 100644 --- a/src/main/java/reobf/proghatches/item/ItemFixer.java +++ b/src/main/java/reobf/proghatches/item/ItemFixer.java @@ -5,7 +5,7 @@ import org.spongepowered.libraries.com.google.common.base.Optional; -import com.github.technus.tectech.mechanics.pipe.IConnectsToEnergyTunnel; +import tectech.mechanics.pipe.IConnectsToEnergyTunnel; import com.glodblock.github.common.item.ItemFluidEncodedPattern; import appeng.api.implementations.ICraftingPatternItem; diff --git a/src/main/java/reobf/proghatches/item/ItemMEPlunger.java b/src/main/java/reobf/proghatches/item/ItemMEPlunger.java index 9d78e85..60cb985 100644 --- a/src/main/java/reobf/proghatches/item/ItemMEPlunger.java +++ b/src/main/java/reobf/proghatches/item/ItemMEPlunger.java @@ -36,10 +36,9 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.metatileentity.IMetaTileEntityItemPipe; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.items.GT_MetaBase_Item; -import gregtech.api.items.GT_MetaGenerated_Tool; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank; -import gregtech.api.util.GT_Utility; + +import gregtech.api.metatileentity.implementations.MTEBasicTank; +import gregtech.api.util.GTUtility; import gregtech.common.tileentities.machines.IDualInputHatch; import gregtech.common.tileentities.machines.IDualInputInventory; import net.minecraft.entity.Entity; @@ -221,7 +220,7 @@ public boolean clearDual(ItemStack aStack, EntityPlayer aPlayer, World aWorld, i is.amount=Optional.fromNullable(left).transform(s->s.getStackSize()).or(0l).intValue(); } - GT_Utility.sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, 1.0F, -1.0F, aX, aY, + GTUtility.sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, 1.0F, -1.0F, aX, aY, aZ); } @@ -270,7 +269,7 @@ public boolean clearFluid(ItemStack aStack, EntityPlayer aPlayer, World aWorld, new PlayerSource(aPlayer, (IActionHost) getWirelessGridHost(aStack))); - GT_Utility.sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, 1.0F, -1.0F, + GTUtility.sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, 1.0F, -1.0F, aX, aY, aZ); return true; } @@ -280,8 +279,8 @@ public boolean clearFluid(ItemStack aStack, EntityPlayer aPlayer, World aWorld, if (aTileEntity instanceof IGregTechTileEntity) { IGregTechTileEntity tTileEntity = (IGregTechTileEntity) aTileEntity; IMetaTileEntity mTileEntity = tTileEntity.getMetaTileEntity(); - if (mTileEntity instanceof GT_MetaTileEntity_BasicTank) { - GT_MetaTileEntity_BasicTank machine = (GT_MetaTileEntity_BasicTank) mTileEntity; + if (mTileEntity instanceof MTEBasicTank) { + MTEBasicTank machine = (MTEBasicTank) mTileEntity; if (machine.mFluid != null && machine.mFluid.amount > 0){}else return false; // machine.mFluid.amount = machine.mFluid.amount - // Math.min(machine.mFluid.amount, 1000); @@ -300,7 +299,7 @@ public boolean clearFluid(ItemStack aStack, EntityPlayer aPlayer, World aWorld, machine.mFluid.amount =0; } - GT_Utility.sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, 1.0F, -1.0F, aX, aY, + GTUtility.sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, 1.0F, -1.0F, aX, aY, aZ); return true; } @@ -318,7 +317,7 @@ public boolean clearItem(ItemStack aStack, EntityPlayer aPlayer, World aWorld, i IGregTechTileEntity gtTE = (IGregTechTileEntity) aTileEntity; IMetaTileEntity tMetaTileEntity = gtTE.getMetaTileEntity(); if ((tMetaTileEntity instanceof IMetaTileEntityItemPipe)) { - for (IMetaTileEntityItemPipe tTileEntity : GT_Utility + for (IMetaTileEntityItemPipe tTileEntity : GTUtility .sortMapByValuesAcending(IMetaTileEntityItemPipe.Util .scanPipes((IMetaTileEntityItemPipe) tMetaTileEntity, new HashMap<>(), 0L, false, true)) .keySet()) { @@ -342,7 +341,7 @@ public boolean clearItem(ItemStack aStack, EntityPlayer aPlayer, World aWorld, i new PlayerSource(aPlayer, (IActionHost) getWirelessGridHost(aStack))); // discard ret value - GT_Utility.sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, + GTUtility.sendSoundToPlayers(aWorld, SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, 1.0F, -1.0F, aX, aY, aZ); } diff --git a/src/main/java/reobf/proghatches/item/ItemProgrammingToolkit.java b/src/main/java/reobf/proghatches/item/ItemProgrammingToolkit.java index 468a80c..cc18ff9 100644 --- a/src/main/java/reobf/proghatches/item/ItemProgrammingToolkit.java +++ b/src/main/java/reobf/proghatches/item/ItemProgrammingToolkit.java @@ -34,7 +34,7 @@ import baubles.api.IBauble; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.gui.modularui.GT_UIInfos; +import gregtech.api.gui.modularui.GTUIInfos; public class ItemProgrammingToolkit extends Item implements IItemWithModularUI , IBauble { @@ -143,7 +143,7 @@ public ItemStack onItemRightClick(ItemStack itemStackIn, World worldIn, EntityPl } else { - GT_UIInfos.openPlayerHeldItemUI(player); + GTUIInfos.openPlayerHeldItemUI(player); } return super.onItemRightClick(itemStackIn, worldIn, player); @@ -184,7 +184,7 @@ public ModularWindow createWindow() { /* * final CoverInfo coverInfo = uiBuildContext.getTile() * .getCoverInfoAtSide(uiBuildContext.getCoverSide()); final - * GT_CoverBehaviorBase behavior = coverInfo.getCoverBehavior(); + * CoverBehaviorBase behavior = coverInfo.getCoverBehavior(); * if (coverInfo.getMinimumTickRate() > 0 && * behavior.allowsTickRateAddition()) { builder.widget( new * GT_CoverTickRateButton(coverInfo, builder).setPos(getGUIWidth() - @@ -279,13 +279,13 @@ public UIBuildContext getUIBuildContext() { * public boolean isCoverValid() { return !getUIBuildContext().getTile() * .isDead() && getUIBuildContext().getTile() * .getCoverBehaviorAtSideNew(getUIBuildContext().getCoverSide()) != - * GregTech_API.sNoBehavior; } + * GregTechAPI.sNoBehavior; } */ protected void addTitleToUI(ModularWindow.Builder builder) { /* * ItemStack coverItem = - * GT_Utility.intToStack(getUIBuildContext().getCoverID()); if + * GTUtility.intToStack(getUIBuildContext().getCoverID()); if * (coverItem != null) { builder.widget( new * ItemDrawable(coverItem).asWidget() .setPos(5, 5) .setSize(16, * 16)) .widget( new diff --git a/src/main/java/reobf/proghatches/item/ItemSmartArm.java b/src/main/java/reobf/proghatches/item/ItemSmartArm.java index 4ebc895..32f0ddb 100644 --- a/src/main/java/reobf/proghatches/item/ItemSmartArm.java +++ b/src/main/java/reobf/proghatches/item/ItemSmartArm.java @@ -13,7 +13,7 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.enums.GT_Values; +import gregtech.api.enums.GTValues; import reobf.proghatches.gt.cover.SmartArmCover; import reobf.proghatches.lang.LangManager; import reobf.proghatches.main.MyMod; @@ -71,7 +71,7 @@ public IIcon getIconFromDamage(int i) { public String getItemStackDisplayName(ItemStack p_77653_1_) { return LangManager.translateToLocal("item.proghatch.smartarm.name") + " (" - + GT_Values.VN[p_77653_1_.getItemDamage()] + ")"; + + GTValues.VN[p_77653_1_.getItemDamage()] + ")"; } diff --git a/src/main/java/reobf/proghatches/item/ItemUpgrades.java b/src/main/java/reobf/proghatches/item/ItemUpgrades.java index 98fb4d7..7e1b108 100644 --- a/src/main/java/reobf/proghatches/item/ItemUpgrades.java +++ b/src/main/java/reobf/proghatches/item/ItemUpgrades.java @@ -74,5 +74,6 @@ public void registerIcons(IIconRegister register) { icons[mark(0)] = register.registerIcon("proghatches:upgrade0"); icons[mark(1)] = register.registerIcon("proghatches:upgrade1"); icons[mark(2)] = register.registerIcon("proghatches:upgrade2"); + icons[mark(3)] = register.registerIcon("proghatches:upgrade3"); } } diff --git a/src/main/java/reobf/proghatches/main/CommonProxy.java b/src/main/java/reobf/proghatches/main/CommonProxy.java index 65a3ce5..bfcfc9a 100644 --- a/src/main/java/reobf/proghatches/main/CommonProxy.java +++ b/src/main/java/reobf/proghatches/main/CommonProxy.java @@ -20,7 +20,7 @@ import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GTModHandler; import mcp.mobius.waila.api.IWailaRegistrar; import reobf.proghatches.Tags; import reobf.proghatches.ae.BlockCraftingCondenser; @@ -175,7 +175,7 @@ public void preInit(FMLPreInitializationEvent event) { li.cil.oc.server.driver.Registry.add((li.cil.oc.api.driver.Item) MyMod.pitem); li.cil.oc.server.driver.Registry.add((li.cil.oc.api.driver.Item) MyMod.cpu); - GT_ModHandler.addToRecyclerBlackList(new ItemStack(MyMod.progcircuit)); + GTModHandler.addToRecyclerBlackList(new ItemStack(MyMod.progcircuit)); FMLInterModComms.sendMessage("Waila", "register", "reobf.proghatches.main.CommonProxy.callbackRegister"); //System.out.println(AEConfig.instance); //System.out.println("xxxxxxxxxxxxxxxx"); diff --git a/src/main/java/reobf/proghatches/main/Config.java b/src/main/java/reobf/proghatches/main/Config.java index df793a0..7dffcd7 100644 --- a/src/main/java/reobf/proghatches/main/Config.java +++ b/src/main/java/reobf/proghatches/main/Config.java @@ -20,7 +20,7 @@ import net.minecraftforge.common.config.Property; import reobf.proghatches.lang.LangManager; -import gregtech.api.util.GT_Multiblock_Tooltip_Builder; +import gregtech.api.util.MultiblockTooltipBuilder; public class Config { public static boolean appendAddedBy = true; @@ -72,7 +72,7 @@ public static void synchronizeConfiguration(File configFile) { public static String lang = System.getProperty("user.language").equalsIgnoreCase("zh") ? "zh_CN" : "en_US"; - public static void get(GT_Multiblock_Tooltip_Builder obj, String key, boolean defaulted) { + public static void get(MultiblockTooltipBuilder obj, String key, boolean defaulted) { try (InputStream in = (defaulted ? getInputEN : getInput).apply(key)) { if (in == null) { if (defaulted) { @@ -106,10 +106,10 @@ public static void get(GT_Multiblock_Tooltip_Builder obj, String key, boolean de MethodType tp = MethodType.fromMethodDescriptorString( type + (/*func.equals("toolTipFinisher") ? "V" - :*/ "L"+GT_Multiblock_Tooltip_Builder.class.getName().replace(".", "/")+";") + :*/ "L"+MultiblockTooltipBuilder.class.getName().replace(".", "/")+";") , Config.class.getClassLoader()); - call(obj, args, MethodHandles.lookup().findVirtual(GT_Multiblock_Tooltip_Builder.class, func, tp), tp); + call(obj, args, MethodHandles.lookup().findVirtual(MultiblockTooltipBuilder.class, func, tp), tp); @@ -179,7 +179,7 @@ private static void call(Object callee, String args, MethodHandle virtual, Metho } - public static void get(GT_Multiblock_Tooltip_Builder obj, String key) { + public static void get(MultiblockTooltipBuilder obj, String key) { get(obj, key, false); } diff --git a/src/main/java/reobf/proghatches/main/MyMod.java b/src/main/java/reobf/proghatches/main/MyMod.java index 3846673..4055f57 100644 --- a/src/main/java/reobf/proghatches/main/MyMod.java +++ b/src/main/java/reobf/proghatches/main/MyMod.java @@ -128,21 +128,21 @@ import crazypants.enderio.conduit.geom.Offsets.Axis; import crazypants.enderio.conduit.geom.Offsets.OffsetKey; import crazypants.enderio.conduit.item.IItemConduit; -import gregtech.api.GregTech_API; -import gregtech.api.enums.GT_Values; +import gregtech.api.GregTechAPI; +import gregtech.api.enums.GTValues; import gregtech.api.interfaces.tileentity.ICoverable; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.BaseMetaPipeEntity; import gregtech.api.metatileentity.BaseMetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; -import gregtech.api.net.GT_Packet_SendCoverData; +import gregtech.api.metatileentity.implementations.MTEMultiBlockBase; +import gregtech.api.net.GTPacketSendCoverData; import gregtech.api.util.shutdown.ShutDownReason; import gregtech.api.util.shutdown.ShutDownReasonRegistry; import gregtech.api.util.shutdown.SimpleShutDownReason; -import gregtech.common.blocks.GT_Block_Machines; +import gregtech.common.blocks.BlockMachines; import gregtech.common.covers.CoverInfo; -import gregtech.common.tileentities.machines.GT_MetaTileEntity_Hatch_InputBus_ME; -import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_HeatExchanger; +import gregtech.common.tileentities.machines.MTEHatchInputBusME; + import gregtech.crossmod.waila.GregtechWailaDataProvider; import li.cil.oc.api.Driver; import reobf.proghatches.Tags; @@ -320,7 +320,7 @@ public void init(FMLInitializationEvent event) { OCApi.put(iohub, TileIOHub.OCApi.class); OCApi.put(oc_api, ItemAPICard.APIEnv.class); OCApi.put(oc_redstone, ItemGTRedstoneCard.RedstoneEnv.class); - OCApi.put(new ItemStack( GregTech_API.sBlockMachines, + OCApi.put(new ItemStack( GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset+Registration.DualInputHatchOCOffset), DualInputHachOC.class); OCApi.forEach((k, v) -> Driver.add(new li.cil.oc.api.driver.EnvironmentProvider() { @@ -480,8 +480,8 @@ public void playerInteract(final PlayerInteractEvent event) { for (ForgeDirection side : ForgeDirection.VALID_DIRECTIONS) { if (tileEntity.getCoverBehaviorAtSideNew(side) instanceof AECover) - GT_Values.NW.sendToPlayer( - new GT_Packet_SendCoverData(side, tileEntity.getCoverIDAtSide(side), + GTValues.NW.sendToPlayer( + new GTPacketSendCoverData(side, tileEntity.getCoverIDAtSide(side), tileEntity.getComplexCoverDataAtSide(side), tileEntity), (EntityPlayerMP) event.entityPlayer); @@ -582,7 +582,7 @@ public static ItemStack tutorial(Item it, String key) { public void breakBlock(BlockEvent.BreakEvent b) { // System.out.println(b.block); - if (b.block instanceof GT_Block_Machines) { + if (b.block instanceof BlockMachines) { TileEntity te = b.world.getTileEntity(b.x, b.y, b.z); if (te instanceof ICoverable) { ICoverable c = (ICoverable) te; diff --git a/src/main/java/reobf/proghatches/main/mixin/MixinCallback.java b/src/main/java/reobf/proghatches/main/mixin/MixinCallback.java index 4a1fc41..0b0b3ef 100644 --- a/src/main/java/reobf/proghatches/main/mixin/MixinCallback.java +++ b/src/main/java/reobf/proghatches/main/mixin/MixinCallback.java @@ -23,7 +23,7 @@ import appeng.util.item.AEItemStack; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; +import gregtech.api.metatileentity.implementations.MTEMultiBlockBase; import it.unimi.dsi.fastutil.objects.Reference2IntOpenHashMap; import net.minecraft.inventory.InventoryCrafting; import net.minecraft.item.Item; @@ -62,7 +62,7 @@ public class MixinCallback { //spotless:on public static void handleAddedToMachineList(IGregTechTileEntity aTileEntity, Object o) { - GT_MetaTileEntity_MultiBlockBase thiz = (GT_MetaTileEntity_MultiBlockBase) o; + MTEMultiBlockBase thiz = (MTEMultiBlockBase) o; try { if (aTileEntity == null) return; diff --git a/src/main/java/reobf/proghatches/main/mixin/MixinPlugin.java b/src/main/java/reobf/proghatches/main/mixin/MixinPlugin.java index 06a39f9..487ea0f 100644 --- a/src/main/java/reobf/proghatches/main/mixin/MixinPlugin.java +++ b/src/main/java/reobf/proghatches/main/mixin/MixinPlugin.java @@ -129,7 +129,7 @@ public List getMixins() { // load all jars that mixin involves HashMap map= new HashMap<>(6); /*map.put( "com/github/vfyjxf/nee/NotEnoughEnergistics.class", "NotEnoughEnergistics"); - map.put( "gregtech/GT_Mod.class", "GT5U"); + map.put( "gregtech/GTMod.class", "GT5U"); map.put( "appeng/api/IAppEngApi.class", "ae2"); map.put( "com/gtnewhorizons/modularui/ModularUI.class", "ModularUI"); map.put( "com/glodblock/github/FluidCraft.class", "ae2fc"); diff --git a/src/main/java/reobf/proghatches/main/mixin/mixins/MixinAwarenessForDualHatch.java b/src/main/java/reobf/proghatches/main/mixin/mixins/MixinAwarenessForDualHatch.java index e900acb..609eed9 100644 --- a/src/main/java/reobf/proghatches/main/mixin/mixins/MixinAwarenessForDualHatch.java +++ b/src/main/java/reobf/proghatches/main/mixin/mixins/MixinAwarenessForDualHatch.java @@ -1,6 +1,6 @@ package reobf.proghatches.main.mixin.mixins; -import static gregtech.api.util.GT_Utility.filterValidMTEs; +import static gregtech.api.util.GTUtility.filterValidMTEs; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; @@ -25,11 +25,11 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; +import gregtech.api.metatileentity.implementations.MTEHatchInput; +import gregtech.api.metatileentity.implementations.MTEHatchInputBus; +import gregtech.api.metatileentity.implementations.MTEMultiBlockBase; import gregtech.api.recipe.check.CheckRecipeResult; -import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTUtility; import gregtech.common.tileentities.machines.IDualInputHatch; import gregtech.common.tileentities.machines.IRecipeProcessingAwareHatch; import reobf.proghatches.gt.cover.ProgrammingCover; @@ -39,7 +39,7 @@ @Pseudo @Mixin( - value = GT_MetaTileEntity_MultiBlockBase.class, + value = MTEMultiBlockBase.class, targets={ "com.Nxer.TwistSpaceTechnology.common.modularizedMachine.ModularizedMachineLogic.MultiExecutionCoreMachineBase" @@ -64,9 +64,9 @@ public abstract class MixinAwarenessForDualHatch { try { MH_mDualInputHatches=MethodHandles.lookup().findGetter( - GT_MetaTileEntity_MultiBlockBase.class, + MTEMultiBlockBase.class, "mDualInputHatches", ArrayList.class); - MH_setResultIfFailure=MethodHandles.lookup().findVirtual(GT_MetaTileEntity_MultiBlockBase.class, + MH_setResultIfFailure=MethodHandles.lookup().findVirtual(MTEMultiBlockBase.class, "setResultIfFailure", MethodType.methodType(void.class,CheckRecipeResult.class)); @@ -79,7 +79,7 @@ public abstract class MixinAwarenessForDualHatch { }@Unique public void setResultIfFailure0(CheckRecipeResult endRecipeProcessing) { try { - MH_setResultIfFailure.invoke((GT_MetaTileEntity_MultiBlockBase)(Object)this,endRecipeProcessing); + MH_setResultIfFailure.invoke((MTEMultiBlockBase)(Object)this,endRecipeProcessing); } catch (Throwable e) { e.printStackTrace(); throw new AssertionError(e); @@ -88,7 +88,7 @@ public void setResultIfFailure0(CheckRecipeResult endRecipeProcessing) { }@Unique public ArrayList mDualInputHatches0(){ try { - return (ArrayList) MH_mDualInputHatches.invoke((GT_MetaTileEntity_MultiBlockBase)(Object)this); + return (ArrayList) MH_mDualInputHatches.invoke((MTEMultiBlockBase)(Object)this); } catch (Throwable e) { e.printStackTrace(); throw new AssertionError(e); @@ -121,7 +121,7 @@ public void b(CallbackInfo c) { continue; if (hatch instanceof IRecipeProcessingAwareDualHatch) { setResultIfFailure0(((IRecipeProcessingAwareDualHatch) hatch) - .endRecipeProcessing((GT_MetaTileEntity_MultiBlockBase) (Object) this)); + .endRecipeProcessing((MTEMultiBlockBase) (Object) this)); } } } diff --git a/src/main/java/reobf/proghatches/main/mixin/mixins/MixinFixPipeCoverBug.java b/src/main/java/reobf/proghatches/main/mixin/mixins/MixinFixPipeCoverBug.java index b2a053d..dc7132f 100644 --- a/src/main/java/reobf/proghatches/main/mixin/mixins/MixinFixPipeCoverBug.java +++ b/src/main/java/reobf/proghatches/main/mixin/mixins/MixinFixPipeCoverBug.java @@ -9,7 +9,7 @@ import gregtech.api.metatileentity.BaseMetaPipeEntity; import gregtech.api.metatileentity.CoverableTileEntity; -import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTUtility; import net.minecraft.entity.player.EntityPlayer; import net.minecraftforge.common.util.ForgeDirection; @@ -24,7 +24,7 @@ public class MixinFixPipeCoverBug{ public void onRightclick0(EntityPlayer aPlayer, ForgeDirection side, float aX, float aY, float aZ,CallbackInfoReturnable cc) { realSide=side; if(((CoverableTileEntity)(Object)this).getCoverIDAtSide(side) == 0) - realSide=GT_Utility.determineWrenchingSide(side, aX, aY, aZ); + realSide=GTUtility.determineWrenchingSide(side, aX, aY, aZ); } diff --git a/src/main/java/reobf/proghatches/main/mixin/mixins/MixinFixPipeCoverBug2.java b/src/main/java/reobf/proghatches/main/mixin/mixins/MixinFixPipeCoverBug2.java index 8062ab5..ec551fb 100644 --- a/src/main/java/reobf/proghatches/main/mixin/mixins/MixinFixPipeCoverBug2.java +++ b/src/main/java/reobf/proghatches/main/mixin/mixins/MixinFixPipeCoverBug2.java @@ -8,7 +8,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import gregtech.api.metatileentity.BaseMetaPipeEntity; -import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTUtility; import net.minecraft.entity.player.EntityPlayer; import net.minecraftforge.common.util.ForgeDirection; diff --git a/src/main/java/reobf/proghatches/main/mixin/mixins/MixinGTRecipeFilter.java b/src/main/java/reobf/proghatches/main/mixin/mixins/MixinGTRecipeFilter.java index 6978a59..4b93682 100644 --- a/src/main/java/reobf/proghatches/main/mixin/mixins/MixinGTRecipeFilter.java +++ b/src/main/java/reobf/proghatches/main/mixin/mixins/MixinGTRecipeFilter.java @@ -6,10 +6,10 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; +import gregtech.api.metatileentity.implementations.MTEMultiBlockBase; import reobf.proghatches.main.mixin.MixinCallback; -@Mixin(value = GT_MetaTileEntity_MultiBlockBase.class, remap = false) +@Mixin(value = MTEMultiBlockBase.class, remap = false) public abstract class MixinGTRecipeFilter { @Inject(method = "addInputBusToMachineList", at = @At("RETURN"), require = 1) diff --git a/src/main/java/reobf/proghatches/main/mixin/mixins/MixinHandleProgrammingOnRecipeStart.java b/src/main/java/reobf/proghatches/main/mixin/mixins/MixinHandleProgrammingOnRecipeStart.java index fece68a..39b27f1 100644 --- a/src/main/java/reobf/proghatches/main/mixin/mixins/MixinHandleProgrammingOnRecipeStart.java +++ b/src/main/java/reobf/proghatches/main/mixin/mixins/MixinHandleProgrammingOnRecipeStart.java @@ -10,22 +10,22 @@ import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.ModifyVariable; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; +import gregtech.api.metatileentity.implementations.MTEHatchInputBus; +import gregtech.api.metatileentity.implementations.MTEMultiBlockBase; import reobf.proghatches.gt.cover.IProgrammer; import reobf.proghatches.gt.cover.ProgrammingCover; -@Mixin(value = GT_MetaTileEntity_MultiBlockBase.class, remap = false) +@Mixin(value = MTEMultiBlockBase.class, remap = false) public abstract class MixinHandleProgrammingOnRecipeStart { //spotless:off @ModifyVariable( method = "startRecipeProcessing",ordinal=0/*set it to 0 to enable explicit mode or mixin will raise warnings*/, at = @At(opcode = Opcodes.ASTORE, value = "STORE"/*"reobf.proghatches.main.mixin.StoreInjectionPoint"*/), require = 1) - public GT_MetaTileEntity_Hatch_InputBus startRecipeProcessing(GT_MetaTileEntity_Hatch_InputBus a) { + public MTEHatchInputBus startRecipeProcessing(MTEHatchInputBus a) { //spotless:on try { - GT_MetaTileEntity_Hatch_InputBus bus = (GT_MetaTileEntity_Hatch_InputBus) a; + MTEHatchInputBus bus = (MTEHatchInputBus) a; Arrays.stream(ForgeDirection.VALID_DIRECTIONS) .map(s -> bus.getBaseMetaTileEntity().getCoverBehaviorAtSideNew(s)).filter(Objects::nonNull) .filter(s -> s instanceof IProgrammer) @@ -43,8 +43,8 @@ public GT_MetaTileEntity_Hatch_InputBus startRecipeProcessing(GT_MetaTileEntity_ /* opcode = Opcodes.ASTORE seems to be useless? - [14:57:37] [Client thread/WARN] [mixin]: @At("STORE" implicit GT_MetaTileEntity_Hatch_InputBus) has invalid IMPLICIT discriminator for opcode 8 in gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase::startRecipeProcessing()V: Found 0 candidate variables but exactly 1 is required. - [14:57:37] [Client thread/WARN] [mixin]: @At("STORE" implicit GT_MetaTileEntity_Hatch_InputBus) has invalid IMPLICIT discriminator for opcode 51 in gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase::startRecipeProcessing()V: Found 0 candidate variables but exactly 1 is required. - [14:57:37] [Client thread/WARN] [mixin]: @At("STORE" implicit GT_MetaTileEntity_Hatch_InputBus) has invalid IMPLICIT discriminator for opcode 59 in gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase::startRecipeProcessing()V: Found 0 candidate variables but exactly 1 is required. + [14:57:37] [Client thread/WARN] [mixin]: @At("STORE" implicit MTEHatchInputBus) has invalid IMPLICIT discriminator for opcode 8 in gregtech/api/metatileentity/implementations/MTEMultiBlockBase::startRecipeProcessing()V: Found 0 candidate variables but exactly 1 is required. + [14:57:37] [Client thread/WARN] [mixin]: @At("STORE" implicit MTEHatchInputBus) has invalid IMPLICIT discriminator for opcode 51 in gregtech/api/metatileentity/implementations/MTEMultiBlockBase::startRecipeProcessing()V: Found 0 candidate variables but exactly 1 is required. + [14:57:37] [Client thread/WARN] [mixin]: @At("STORE" implicit MTEHatchInputBus) has invalid IMPLICIT discriminator for opcode 59 in gregtech/api/metatileentity/implementations/MTEMultiBlockBase::startRecipeProcessing()V: Found 0 candidate variables but exactly 1 is required. */ } diff --git a/src/main/java/reobf/proghatches/main/mixin/mixins/MixinNoFuzzyForProgrammingCircuit.java b/src/main/java/reobf/proghatches/main/mixin/mixins/MixinNoFuzzyForProgrammingCircuit.java index b82e797..4c8fa63 100644 --- a/src/main/java/reobf/proghatches/main/mixin/mixins/MixinNoFuzzyForProgrammingCircuit.java +++ b/src/main/java/reobf/proghatches/main/mixin/mixins/MixinNoFuzzyForProgrammingCircuit.java @@ -14,7 +14,7 @@ import appeng.api.storage.data.IItemList; import appeng.util.item.AEItemStack; import appeng.util.item.ItemList; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; +import gregtech.api.metatileentity.implementations.MTEMultiBlockBase; import reobf.proghatches.main.MyMod; @Mixin(value = ItemList.class, remap = false) diff --git a/src/main/java/reobf/proghatches/main/mixin/mixins/eucrafting/MixinEUSourceCoverChunkUnloadNotification.java b/src/main/java/reobf/proghatches/main/mixin/mixins/eucrafting/MixinEUSourceCoverChunkUnloadNotification.java index b3af2e7..8406a2f 100644 --- a/src/main/java/reobf/proghatches/main/mixin/mixins/eucrafting/MixinEUSourceCoverChunkUnloadNotification.java +++ b/src/main/java/reobf/proghatches/main/mixin/mixins/eucrafting/MixinEUSourceCoverChunkUnloadNotification.java @@ -10,7 +10,7 @@ import gregtech.api.metatileentity.BaseTileEntity; import gregtech.api.metatileentity.CoverableTileEntity; -import gregtech.api.util.GT_CoverBehaviorBase; +import gregtech.api.util.CoverBehaviorBase; import gregtech.common.covers.CoverInfo; import net.minecraftforge.common.util.ForgeDirection; import reobf.proghatches.eucrafting.AECover; @@ -35,7 +35,7 @@ protected void unloadCover() { final CoverInfo coverInfo = getCoverInfoAtSide(side); if (coverInfo.isValid()) { - GT_CoverBehaviorBase be = coverInfo.getCoverBehavior(); + CoverBehaviorBase be = coverInfo.getCoverBehavior(); if (be != null && be instanceof AECover) { diff --git a/src/main/java/reobf/proghatches/main/mixin/mixins/eucrafting/MixinMachineIdle.java b/src/main/java/reobf/proghatches/main/mixin/mixins/eucrafting/MixinMachineIdle.java index e6cee50..03c225c 100644 --- a/src/main/java/reobf/proghatches/main/mixin/mixins/eucrafting/MixinMachineIdle.java +++ b/src/main/java/reobf/proghatches/main/mixin/mixins/eucrafting/MixinMachineIdle.java @@ -9,13 +9,13 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; +import gregtech.api.metatileentity.implementations.MTEMultiBlockBase; import gregtech.api.recipe.check.CheckRecipeResult; import gregtech.api.recipe.check.CheckRecipeResultRegistry; import reobf.proghatches.eucrafting.IIdleStateProvider; -@Mixin(value=GT_MetaTileEntity_MultiBlockBase.class,remap=false) +@Mixin(value=MTEMultiBlockBase.class,remap=false) public class MixinMachineIdle implements IIdleStateProvider{ private boolean hasJob; @Shadow int mMaxProgresstime; diff --git a/src/main/java/reobf/proghatches/main/mixin/mixins/eucrafting/MixinMachineIdle2.java b/src/main/java/reobf/proghatches/main/mixin/mixins/eucrafting/MixinMachineIdle2.java index 2ee2318..dde7fc8 100644 --- a/src/main/java/reobf/proghatches/main/mixin/mixins/eucrafting/MixinMachineIdle2.java +++ b/src/main/java/reobf/proghatches/main/mixin/mixins/eucrafting/MixinMachineIdle2.java @@ -10,14 +10,14 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; +import gregtech.api.metatileentity.implementations.MTEBasicMachine; +import gregtech.api.metatileentity.implementations.MTEMultiBlockBase; import gregtech.api.recipe.check.CheckRecipeResult; import gregtech.api.recipe.check.CheckRecipeResultRegistry; import reobf.proghatches.eucrafting.IIdleStateProvider; -@Mixin(value=GT_MetaTileEntity_BasicMachine.class,remap=false) +@Mixin(value=MTEBasicMachine.class,remap=false) public abstract class MixinMachineIdle2 implements IIdleStateProvider{ @Shadow int mMaxProgresstime; diff --git a/src/main/java/reobf/proghatches/main/mixin/mixins/part2/MixinMEBusOverride.java b/src/main/java/reobf/proghatches/main/mixin/mixins/part2/MixinMEBusOverride.java index 23bee89..6ca2b5a 100644 --- a/src/main/java/reobf/proghatches/main/mixin/mixins/part2/MixinMEBusOverride.java +++ b/src/main/java/reobf/proghatches/main/mixin/mixins/part2/MixinMEBusOverride.java @@ -14,12 +14,12 @@ import appeng.api.storage.IMEMonitor; import appeng.api.storage.data.IAEItemStack; import appeng.api.storage.data.IAEStack; -import gregtech.common.tileentities.machines.GT_MetaTileEntity_Hatch_InputBus_ME; -import gregtech.common.tileentities.machines.GT_MetaTileEntity_Hatch_Input_ME; +import gregtech.common.tileentities.machines.MTEHatchInputBusME; +import gregtech.common.tileentities.machines.MTEHatchInputME; import reobf.proghatches.gt.metatileentity.util.IMEHatchOverrided; -@Mixin(remap=false,value={GT_MetaTileEntity_Hatch_InputBus_ME.class, - GT_MetaTileEntity_Hatch_Input_ME.class, +@Mixin(remap=false,value={MTEHatchInputBusME.class, + MTEHatchInputME.class, }) public class MixinMEBusOverride { @@ -28,8 +28,8 @@ public class MixinMEBusOverride { static { try { - minAutoPullStackSize= GT_MetaTileEntity_Hatch_InputBus_ME.class.getDeclaredField("minAutoPullStackSize"); - minAutoPullAmount= GT_MetaTileEntity_Hatch_Input_ME.class.getDeclaredField("minAutoPullAmount"); + minAutoPullStackSize= MTEHatchInputBusME.class.getDeclaredField("minAutoPullStackSize"); + minAutoPullAmount= MTEHatchInputME.class.getDeclaredField("minAutoPullAmount"); minAutoPullAmount.setAccessible(true); minAutoPullStackSize.setAccessible(true); @@ -47,7 +47,7 @@ private void refreshItemList(CallbackInfo ci) { if(this instanceof IMEHatchOverrided){ try { ((IMEHatchOverrided)this).overridedBehoviour( - ( (Object)this instanceof GT_MetaTileEntity_Hatch_InputBus_ME? + ( (Object)this instanceof MTEHatchInputBusME? minAutoPullStackSize:minAutoPullAmount) .getInt(this)); diff --git a/src/main/java/reobf/proghatches/main/mixin/mixins/part2/MixinPresetsInject.java b/src/main/java/reobf/proghatches/main/mixin/mixins/part2/MixinPresetsInject.java index 9128ed1..caf4905 100644 --- a/src/main/java/reobf/proghatches/main/mixin/mixins/part2/MixinPresetsInject.java +++ b/src/main/java/reobf/proghatches/main/mixin/mixins/part2/MixinPresetsInject.java @@ -19,7 +19,7 @@ import com.google.common.collect.Sets; import codechicken.nei.recipe.StackInfo; -import gregtech.api.GregTech_API; +import gregtech.api.GregTechAPI; import net.minecraft.item.ItemStack; import reobf.proghatches.main.Config; import reobf.proghatches.main.MyMod; @@ -94,7 +94,7 @@ public class MixinPresetsInject { for(int r[]:range) add.accept("", IntStream.range(r[0], r[1]) - .mapToObj(s->StackInfo.getItemStackGUID(new ItemStack(GregTech_API.sBlockMachines,1,s))) + .mapToObj(s->StackInfo.getItemStackGUID(new ItemStack(GregTechAPI.sBlockMachines,1,s))) .collect(Collectors.toSet()) ) diff --git a/src/main/java/reobf/proghatches/main/mixin/mixins/part2/MixinVoidingHatch.java b/src/main/java/reobf/proghatches/main/mixin/mixins/part2/MixinVoidingHatch.java index 38a771c..1440347 100644 --- a/src/main/java/reobf/proghatches/main/mixin/mixins/part2/MixinVoidingHatch.java +++ b/src/main/java/reobf/proghatches/main/mixin/mixins/part2/MixinVoidingHatch.java @@ -10,36 +10,36 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import gregtech.api.metatileentity.CoverableTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_OutputBus; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; -import gregtech.api.util.GT_Utility; +import gregtech.api.metatileentity.implementations.MTEHatchOutput; +import gregtech.api.metatileentity.implementations.MTEHatchOutputBus; +import gregtech.api.metatileentity.implementations.MTEMultiBlockBase; +import gregtech.api.util.GTUtility; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; import reobf.proghatches.gt.metatileentity.VoidOutputBus; import reobf.proghatches.gt.metatileentity.VoidOutputHatch; -@Mixin(value = GT_MetaTileEntity_MultiBlockBase.class,remap=false) +@Mixin(value = MTEMultiBlockBase.class,remap=false) public class MixinVoidingHatch { @Shadow - public ArrayList mOutputHatches; + public ArrayList mOutputHatches; @Shadow - public ArrayList mOutputBusses; + public ArrayList mOutputBusses; long lastNoVoidBusTick=-1; @Inject( require = 1,method="addOutput(Lnet/minecraft/item/ItemStack;)Z",at = { @At("HEAD") },cancellable=true) public void addOutput(ItemStack aStack,CallbackInfoReturnable a) { - GT_MetaTileEntity_MultiBlockBase y=(GT_MetaTileEntity_MultiBlockBase)((Object)this); + MTEMultiBlockBase y=(MTEMultiBlockBase)((Object)this); long thisTick=((CoverableTileEntity)y.getBaseMetaTileEntity()).mTickTimer; if(thisTick==lastNoVoidBusTick){ return;//we have checked perviously that no void bus is present, just skip it } lastNoVoidBusTick=thisTick; - for(GT_MetaTileEntity_Hatch_OutputBus xx:GT_Utility.filterValidMTEs(mOutputBusses)){ + for(MTEHatchOutputBus xx:GTUtility.filterValidMTEs(mOutputBusses)){ lastNoVoidBusTick=-1; if(xx instanceof VoidOutputBus){ if(((VoidOutputBus)xx).dump(aStack)){ @@ -56,13 +56,13 @@ public void addOutput(ItemStack aStack,CallbackInfoReturnable a) @Inject( require = 1,method="addOutput(Lnet/minecraftforge/fluids/FluidStack;)Z",at = { @At("HEAD") },cancellable=true) public void addOutput(FluidStack aStack,CallbackInfoReturnable a) { - GT_MetaTileEntity_MultiBlockBase y=(GT_MetaTileEntity_MultiBlockBase)((Object)this); + MTEMultiBlockBase y=(MTEMultiBlockBase)((Object)this); long thisTick=((CoverableTileEntity)y.getBaseMetaTileEntity()).mTickTimer; if(thisTick==lastNoVoidHatchTick){ return; } lastNoVoidHatchTick=thisTick; - for(GT_MetaTileEntity_Hatch_Output xx:GT_Utility.filterValidMTEs(mOutputHatches)){ + for(MTEHatchOutput xx:GTUtility.filterValidMTEs(mOutputHatches)){ if(xx instanceof VoidOutputHatch){ lastNoVoidHatchTick=-1; if(((VoidOutputHatch)xx).dump(aStack)){ diff --git a/src/main/java/reobf/proghatches/main/registration/PHRecipes.java b/src/main/java/reobf/proghatches/main/registration/PHRecipes.java index 7406022..def2fc8 100644 --- a/src/main/java/reobf/proghatches/main/registration/PHRecipes.java +++ b/src/main/java/reobf/proghatches/main/registration/PHRecipes.java @@ -3,10 +3,10 @@ import static gregtech.api.enums.ItemList.*; import static gregtech.api.enums.Materials.*; import static gregtech.api.enums.Mods.GTPlusPlus; -import static gregtech.api.util.GT_RecipeBuilder.HOURS; -import static gregtech.api.util.GT_RecipeBuilder.SECONDS; -import static gregtech.api.util.GT_RecipeConstants.RESEARCH_ITEM; -import static gregtech.api.util.GT_RecipeConstants.RESEARCH_TIME; +import static gregtech.api.util.GTRecipeBuilder.HOURS; +import static gregtech.api.util.GTRecipeBuilder.SECONDS; +import static gregtech.api.util.GTRecipeConstants.RESEARCH_ITEM; +import static gregtech.api.util.GTRecipeConstants.RESEARCH_TIME; import java.util.ArrayList; import java.util.Arrays; @@ -31,31 +31,31 @@ import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.ShapedOreRecipe; -import com.github.technus.tectech.recipe.TT_recipeAdder; -import com.github.technus.tectech.thing.CustomItemList; + import com.glodblock.github.loader.ItemAndBlockHolder; import appeng.core.Api; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.ironchest.IronChest; import crazypants.enderio.EnderIOTab; -import gregtech.api.GregTech_API; -import gregtech.api.enums.GT_Values; +import gregtech.api.GregTechAPI; +import gregtech.api.enums.GTValues; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.enums.TierEU; import gregtech.api.recipe.RecipeMaps; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_RecipeBuilder; -import gregtech.api.util.GT_RecipeConstants; -import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTOreDictUnificator; +import gregtech.api.util.GTRecipe; +import gregtech.api.util.GTRecipeBuilder; +import gregtech.api.util.GTRecipeConstants; +import gregtech.api.util.GTUtility; import mods.railcraft.common.core.Railcraft; import reobf.proghatches.item.ItemProgrammingCircuit; import reobf.proghatches.main.Config; import reobf.proghatches.main.MyMod; import tconstruct.smeltery.TinkerSmeltery; +import tectech.recipe.TTRecipeAdder; import thaumcraft.api.ThaumcraftApi; import thaumcraft.common.config.ConfigItems; //spotless:off @@ -80,8 +80,8 @@ public class PHRecipes implements Runnable { { Bio }, { Optical/*,Nano,*/ }, { Piko/*,Exotic,*/ },//dreamcraft circuit - { Quantum/*,Cosmic,*/ }, - { Quantum /*Transcendent*/ } }; + { Piko /*Quantum,Cosmic,*/ }, + { Piko /*Quantum Transcendent*/ } }; Materials[][] matNewVersion = { { Primitive }, @@ -103,18 +103,18 @@ public class PHRecipes implements Runnable { /////////////////////////////////// public void prefab(){ - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( new ItemStack( - GregTech_API.sBlockMachines, + GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset+Registration.CircuitProviderOffset) - , GT_Utility.getIntegratedCircuit(1) + , GTUtility.getIntegratedCircuit(1) ) .itemOutputs( new ItemStack( - GregTech_API.sBlockMachines, + GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset+Registration.PrefabOffset) ) @@ -124,18 +124,18 @@ public void prefab(){ for(int i=1;i<=3;i++) - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( new ItemStack( - GregTech_API.sBlockMachines, + GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset+Registration.CircuitProviderOffset) - , GT_Utility.getIntegratedCircuit(i+1) + , GTUtility.getIntegratedCircuit(i+1) ) .itemOutputs( new ItemStack( - GregTech_API.sBlockMachines, + GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset+Registration.PrefabOffset+i) ) @@ -144,18 +144,18 @@ public void prefab(){ .addTo(RecipeMaps.laserEngraverRecipes); - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( new ItemStack( - GregTech_API.sBlockMachines, + GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset+Registration.CircuitProviderOffset) - , GT_Utility.getIntegratedCircuit(24) + , GTUtility.getIntegratedCircuit(24) ) .itemOutputs( new ItemStack( - GregTech_API.sBlockMachines, + GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset+Registration.PrefabOffset+5) ) @@ -174,7 +174,7 @@ public void prefab(){ boolean flag=true; public void smartArm(){ - for (int i = 0; i < GT_Values.VP.length - 1; i++) { + for (int i = 0; i < GTValues.VP.length - 1; i++) { int ii = i; @@ -195,55 +195,55 @@ public void smartArm(){ /* ItemStack[] t0 = Arrays.stream(mat[i]) - .map(s -> GT_OreDictUnificator.getOres(OrePrefixes.circuit, s)) + .map(s -> GTOreDictUnificator.getOres(OrePrefixes.circuit, s)) .flatMap(ArrayList::stream) - .map(s -> GT_Utility.copyAmount(4, s)) + .map(s -> GTUtility.copyAmount(4, s)) .toArray(ItemStack[]::new); ItemStack[] t1 = Arrays.stream(mat[Math.min(i + 1, mat.length - 1)]) - .map(s -> GT_OreDictUnificator.getOres(OrePrefixes.circuit, s)) + .map(s -> GTOreDictUnificator.getOres(OrePrefixes.circuit, s)) .flatMap(ArrayList::stream) - .map(s -> GT_Utility.copyAmount(2, s)) + .map(s -> GTUtility.copyAmount(2, s)) .toArray(ItemStack[]::new); ItemStack[] tm1=null,tm2=null; if(ii>6){ tm1 = Arrays.stream(mat[i-1]) - .map(s -> GT_OreDictUnificator.getOres(OrePrefixes.circuit, s)) + .map(s -> GTOreDictUnificator.getOres(OrePrefixes.circuit, s)) .flatMap(ArrayList::stream) - .map(s -> GT_Utility.copyAmount(8, s)) + .map(s -> GTUtility.copyAmount(8, s)) .toArray(ItemStack[]::new); tm2 = Arrays.stream(mat[i-2]) - .map(s -> GT_OreDictUnificator.getOres(OrePrefixes.circuit, s)) + .map(s -> GTOreDictUnificator.getOres(OrePrefixes.circuit, s)) .flatMap(ArrayList::stream) - .map(s -> GT_Utility.copyAmount(16, s)) + .map(s -> GTUtility.copyAmount(16, s)) .toArray(ItemStack[]::new); }*/ int amountAmp=(int) Math.pow(2,ii-6); - // GT_RecipeConstants.AssemblyLine.doAdd(builder) + // GTRecipeConstants.AssemblyLine.doAdd(builder) if(ii>6){ if( - null!= (GT_OreDictUnificator.get(circuitM2,1))&& - null!=(GT_OreDictUnificator.get(circuitM1,1))&& - null!=(GT_OreDictUnificator.get(circuit,1))&& - null!= (GT_OreDictUnificator.get(circuitP,1)) + null!= (GTOreDictUnificator.get(circuitM2,1))&& + null!=(GTOreDictUnificator.get(circuitM1,1))&& + null!=(GTOreDictUnificator.get(circuit,1))&& + null!= (GTOreDictUnificator.get(circuitP,1)) ){ }else{ MyMod.LOG.fatal("OreDict Item not found! Are you in Dev?"); MyMod.LOG.fatal(circuitM2+" "+circuitM1 +" "+circuit+" "+circuitP); - MyMod.LOG.fatal( (GT_OreDictUnificator.get(circuitM2,1))+" "+ - (GT_OreDictUnificator.get(circuitM1,1))+" "+ - (GT_OreDictUnificator.get(circuit,1))+" "+ - (GT_OreDictUnificator.get(circuitP,1))); + MyMod.LOG.fatal( (GTOreDictUnificator.get(circuitM2,1))+" "+ + (GTOreDictUnificator.get(circuitM1,1))+" "+ + (GTOreDictUnificator.get(circuit,1))+" "+ + (GTOreDictUnificator.get(circuitP,1))); continue; } - GT_RecipeBuilder.builder() + GTRecipeBuilder.builder() .metadata(RESEARCH_ITEM, new ItemStack(MyMod.smartarm, 1, ii-1)) .metadata(RESEARCH_TIME, 1 * HOURS) .itemInputs( @@ -265,16 +265,16 @@ public void smartArm(){ .itemOutputs( new ItemStack(MyMod.smartarm, 1, ii)) .eut(TierEU.RECIPE_IV) .duration(600) - .addTo( GT_RecipeConstants.AssemblyLine); + .addTo( GTRecipeConstants.AssemblyLine); } else RecipeMaps.assemblerRecipes.add( - new GT_Recipe/*.GT_Recipe_WithAlt*/( + new GTRecipe/*.GTRecipe_WithAlt*/( false, new ItemStack[] { - GT_OreDictUnificator.get(circuit, 4), - GT_OreDictUnificator.get(circuitP, 2), + GTOreDictUnificator.get(circuit, 4), + GTOreDictUnificator.get(circuitP, 2), Circuit_Chip_Stemcell.get(32) , arms[i] @@ -293,7 +293,7 @@ public void smartArm(){ null// FO , 20 * SECONDS, - (int) GT_Values.VP[i], + (int) GTValues.VP[i], 0/*, new ItemStack[][] { t0,t1} // ALT*/ ) @@ -315,6 +315,7 @@ public void smartArm(){ /** * */ + @SuppressWarnings("deprecation") @Override public void run() { @@ -399,14 +400,14 @@ public void run() { pc.forEach((s, i) -> { - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs(s, Materials.Titanium.getPlates(1)) .fluidInputs(Materials.TungstenSteel.getMolten(144*20L)) .itemOutputs(new ItemStack(MyMod.cover, 4 * i, 0)) .duration(1 * SECONDS) .eut(480) .addTo(RecipeMaps.mixerRecipes); - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs(s, Materials.Titanium.getPlates(1)) .fluidInputs(Materials.StainlessSteel.getMolten(144*20L)) .itemOutputs(new ItemStack(MyMod.cover, 2 * i, 0)) @@ -416,11 +417,11 @@ public void run() { }); pc0.forEach(s -> { - GregTech_API.getConfigurationCircuitList(100) + GregTechAPI.getConfigurationCircuitList(100) .stream() .forEach(ss -> { - GT_Values.RA.stdBuilder() - .itemInputs(s, GT_Utility.copyAmount(0, ss)) + GTValues.RA.stdBuilder() + .itemInputs(s, GTUtility.copyAmount(0, ss)) .itemOutputs(ItemProgrammingCircuit.wrap(ss)) .duration(1 * SECONDS) @@ -435,90 +436,90 @@ public void run() { .map(s -> s.get(1)) .collect(ArrayList::new, ArrayList::add, ArrayList::addAll); for (int i = 12097; i <= 12102; i++) { - is.add(new ItemStack(GregTech_API.sBlockMachines, 1, i)); + is.add(new ItemStack(GregTechAPI.sBlockMachines, 1, i)); } // stuff from gtnhcoremod ItemStack[] single_fluid = is.toArray(new ItemStack[0]); is = Arrays.stream(HATCHES_INPUT_BUS) .map(s -> s.get(1)) .collect(ArrayList::new, ArrayList::add, ArrayList::addAll); - is.add(new ItemStack(GregTech_API.sBlockMachines, 1, 30030));// gt++ superbus - is.add(new ItemStack(GregTech_API.sBlockMachines, 1, 30030)); - is.add(new ItemStack(GregTech_API.sBlockMachines, 1, 30030)); - is.add(new ItemStack(GregTech_API.sBlockMachines, 1, 30030)); - is.add(new ItemStack(GregTech_API.sBlockMachines, 1, 30030)); + is.add(new ItemStack(GregTechAPI.sBlockMachines, 1, 30030));// gt++ superbus + is.add(new ItemStack(GregTechAPI.sBlockMachines, 1, 30030)); + is.add(new ItemStack(GregTechAPI.sBlockMachines, 1, 30030)); + is.add(new ItemStack(GregTechAPI.sBlockMachines, 1, 30030)); + is.add(new ItemStack(GregTechAPI.sBlockMachines, 1, 30030)); ItemStack[] single_item = is.toArray(new ItemStack[0]); - for (int i = 4; i < GT_Values.VN.length - 1; i++) { + for (int i = 4; i < GTValues.VN.length - 1; i++) { - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs(multi[i].get(1), single_item[i], new ItemStack(MyMod.cover, 1, 0)) .fluidInputs(Materials.AdvancedGlue.getFluid(4000)) .itemOutputs( new ItemStack( - GregTech_API.sBlockMachines, + GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset + Registration.QuadDualInputHatchOffset + i)) .duration(20 * SECONDS) - .eut(GT_Values.VP[i]) + .eut(GTValues.VP[i]) .addTo(RecipeMaps.mixerRecipes); } - for (int i = 0; i < GT_Values.VN.length - 1; i++) { + for (int i = 0; i < GTValues.VN.length - 1; i++) { - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs(single_fluid[i], single_item[i], new ItemStack(MyMod.cover, 1, 0)) .fluidInputs(Materials.AdvancedGlue.getFluid(4000)) .itemOutputs( new ItemStack( - GregTech_API.sBlockMachines, + GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset + Registration.DualInputHatchOffset + i)) .duration(20 * SECONDS) - .eut(GT_Values.VP[i]) + .eut(GTValues.VP[i]) .addTo(RecipeMaps.mixerRecipes); } - for (int i = 0; i < GT_Values.VN.length - 1; i++) { + for (int i = 0; i < GTValues.VN.length - 1; i++) { Object circuit = OrePrefixes.circuit.get(mat[i][0]); Object circuitP = OrePrefixes.circuit.get(mat[Math.min(i + 1, mat.length - 2)][0]); - if (circuit == null || GT_OreDictUnificator.get(circuit, 1) == null) { - MyMod.LOG.fatal("Circuit not found for " + GT_Values.VN[i] + "!"); + if (circuit == null || GTOreDictUnificator.get(circuit, 1) == null) { + MyMod.LOG.fatal("Circuit not found for " + GTValues.VN[i] + "!"); continue; } /* * //GT OreDict handling is too magic for me to understand - * GT_Values.RA.stdBuilder() + * GTValues.RA.stdBuilder() * .itemInputs( * new - * ItemStack(GregTech_API.sBlockMachines,1,Config.metaTileEntityOffset+Registration.DualInputHatchOffset+i) + * ItemStack(GregTechAPI.sBlockMachines,1,Config.metaTileEntityOffset+Registration.DualInputHatchOffset+i) * , new Object[] {circuit,2} * ,new ItemStack(MyMod.smartarm,1,i) * ) * .fluidInputs(Materials.AdvancedGlue.getFluid(4000)) * .itemOutputs( - * new ItemStack(GregTech_API.sBlockMachines,1,Config.metaTileEntityOffset+Registration. + * new ItemStack(GregTechAPI.sBlockMachines,1,Config.metaTileEntityOffset+Registration. * BufferedDualInputHatchOffset+i) * ) * .duration(20 * SECONDS) - * .eut(GT_Values.VP[i]) + * .eut(GTValues.VP[i]) * .addTo(RecipeMaps.assemblerRecipes); */ RecipeMaps.assemblerRecipes.add( - new GT_Recipe/*.GT_Recipe_WithAlt*/( + new GTRecipe/*.GTRecipe_WithAlt*/( false, - new ItemStack[] { GT_OreDictUnificator.get((circuit), 2), single_item[i], + new ItemStack[] { GTOreDictUnificator.get((circuit), 2), single_item[i], new ItemStack( - GregTech_API.sBlockMachines, + GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset + Registration.DualInputHatchOffset + i) , new ItemStack(MyMod.smartarm, 1, i) }// II , new ItemStack[] { new ItemStack( - GregTech_API.sBlockMachines, + GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset + Registration.BufferedDualInputHatchOffset + i) } // IO @@ -532,29 +533,29 @@ public void run() { null// FO , 20 * SECONDS, - (int) GT_Values.VP[i], + (int) GTValues.VP[i], 0/*, new ItemStack[][] { Arrays.stream(mat[i]) - .map(s -> GT_OreDictUnificator.getOres(OrePrefixes.circuit, s)) + .map(s -> GTOreDictUnificator.getOres(OrePrefixes.circuit, s)) .flatMap(ArrayList::stream) - .map(s -> GT_Utility.copyAmount(2, s)) + .map(s -> GTUtility.copyAmount(2, s)) .toArray(ItemStack[]::new) } */// ALT )); RecipeMaps.assemblerRecipes.add( - new GT_Recipe( + new GTRecipe( false, - new ItemStack[] { GT_OreDictUnificator.get((circuit), 2), single_item[i], + new ItemStack[] { GTOreDictUnificator.get((circuit), 2), single_item[i], new ItemStack( - GregTech_API.sBlockMachines, + GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset + Registration.QuadDualInputHatchOffset + i) , new ItemStack(MyMod.smartarm, 1, i) }// II , new ItemStack[] { new ItemStack( - GregTech_API.sBlockMachines, + GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset + Registration.BufferedQuadDualInputHatchOffset + i) } // IO @@ -568,29 +569,29 @@ public void run() { null// FO , 20 * SECONDS, - (int) GT_Values.VP[i], + (int) GTValues.VP[i], 0/*, new ItemStack[][] { Arrays.stream(mat[i]) - .map(s -> GT_OreDictUnificator.getOres(OrePrefixes.circuit, s)) + .map(s -> GTOreDictUnificator.getOres(OrePrefixes.circuit, s)) .flatMap(ArrayList::stream) - .map(s -> GT_Utility.copyAmount(2, s)) + .map(s -> GTUtility.copyAmount(2, s)) .toArray(ItemStack[]::new) } */// ALT )); RecipeMaps.assemblerRecipes.add( - new GT_Recipe( + new GTRecipe( false, - new ItemStack[] { GT_OreDictUnificator.get(circuitP, 2), - GT_Utility.copyAmount(5, single_item[i]), + new ItemStack[] { GTOreDictUnificator.get(circuitP, 2), + GTUtility.copyAmount(5, single_item[i]), new ItemStack( - GregTech_API.sBlockMachines, + GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset + Registration.BufferedQuadDualInputHatchOffset + i), new ItemStack(MyMod.smartarm, 5, i) }// II , new ItemStack[] { new ItemStack( - GregTech_API.sBlockMachines, + GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset + Registration.BufferedQuadDualInputHatchMKIIOffset + i) } // IO @@ -604,20 +605,20 @@ public void run() { null// FO , 20 * SECONDS, - (int) GT_Values.VP[i], + (int) GTValues.VP[i], 0/*, new ItemStack[][] { Arrays.stream(mat[Math.min(i + 1, mat.length - 1)]) - .map(s -> GT_OreDictUnificator.getOres(OrePrefixes.circuit, s)) + .map(s -> GTOreDictUnificator.getOres(OrePrefixes.circuit, s)) .flatMap(ArrayList::stream) - .map(s -> GT_Utility.copyAmount(2, s)) + .map(s -> GTUtility.copyAmount(2, s)) .toArray(ItemStack[]::new) } */// ALT )); } pc.forEach((s, i) -> { - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( s, new ItemStack(ItemAndBlockHolder.INTERFACE), @@ -646,14 +647,14 @@ public void run() { .fluidInputs(Materials.AdvancedGlue.getFluid(4000)) .itemOutputs( new ItemStack( - GregTech_API.sBlockMachines, + GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset + Registration.CircuitProviderOffset)) .duration(20 * SECONDS) - .eut(GT_Values.VP[5]) + .eut(GTValues.VP[5]) .addTo(RecipeMaps.assemblerRecipes); //T0 - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( s, Api.INSTANCE.definitions().blocks().iface().maybeStack(1).get(), @@ -678,34 +679,34 @@ public void run() { .fluidInputs(Materials.AdvancedGlue.getFluid(4000)) .itemOutputs( new ItemStack( - GregTech_API.sBlockMachines, + GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset + Registration.CircuitProviderOffsetT0)) .duration(20 * SECONDS) - .eut(GT_Values.VP[3]) + .eut(GTValues.VP[3]) .addTo(RecipeMaps.assemblerRecipes); }); pc0.forEach((s) -> { - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( s, Hatch_CraftingInput_Bus_Slave.get(1), - GT_Utility.getIntegratedCircuit(13)) + GTUtility.getIntegratedCircuit(13)) .fluidInputs(Materials.AdvancedGlue.getFluid(4000)) .itemOutputs( new ItemStack( - GregTech_API.sBlockMachines, + GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset + Registration.SlaveOffset)) .duration(20 * SECONDS) - .eut(GT_Values.VP[7]) + .eut(GTValues.VP[7]) .addTo(RecipeMaps.assemblerRecipes); }); - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( new ItemStack(GameRegistry.findItem("RIO", "tile.remote_interface")), new ItemStack(GameRegistry.findItem("RIO", "item.chip.transfer"), 1, 0), @@ -713,13 +714,13 @@ public void run() { .fluidInputs(Materials.AdvancedGlue.getFluid(4000)) .itemOutputs( new ItemStack( - GregTech_API.sBlockMachines, + GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset + Registration.RemoteInputBusOffset)) .duration(20 * SECONDS) - .eut(GT_Values.VP[5]) + .eut(GTValues.VP[5]) .addTo(RecipeMaps.assemblerRecipes); - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( new ItemStack(GameRegistry.findItem("RIO", "tile.remote_interface")), new ItemStack(GameRegistry.findItem("RIO", "item.chip.transfer"), 1, 1), @@ -729,18 +730,18 @@ public void run() { .fluidInputs(Materials.AdvancedGlue.getFluid(4000)) .itemOutputs( new ItemStack( - GregTech_API.sBlockMachines, + GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset + Registration.RemoteInputHatchOffset)) .duration(20 * SECONDS) - .eut(GT_Values.VP[5]) + .eut(GTValues.VP[5]) .addTo(RecipeMaps.assemblerRecipes); - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( new ItemStack( - GregTech_API.sBlockMachines, + GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset + Registration.BufferedQuadDualInputHatchOffset + 8), Quantum_Tank_LV.get(24), @@ -749,60 +750,60 @@ public void run() { .fluidInputs(Materials.AdvancedGlue.getFluid(4000)) .itemOutputs( new ItemStack( - GregTech_API.sBlockMachines, + GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset + Registration.SuperFluidHatch)) .duration(20 * SECONDS) - .eut(GT_Values.VP[8]) + .eut(GTValues.VP[8]) .addTo(RecipeMaps.assemblerRecipes); - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( Hatch_CraftingInput_Bus_ME.get(1), new ItemStack( - GregTech_API.sBlockMachines, + GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset + Registration.BufferedQuadDualInputHatchMKIIOffset + 8)) .fluidInputs(Materials.AdvancedGlue.getFluid(4000)) .itemOutputs( - new ItemStack(GregTech_API.sBlockMachines, 1, Config.metaTileEntityOffset + Registration.PatternOffset)) + new ItemStack(GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset + Registration.PatternOffset)) .duration(20 * SECONDS) - .eut(GT_Values.VP[9]) + .eut(GTValues.VP[9]) .addTo(RecipeMaps.assemblerRecipes); - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( Hatch_CraftingInput_Bus_ME_ItemOnly.get(1), new ItemStack( MyMod.smartarm,4,6)) .fluidInputs(Materials.AdvancedGlue.getFluid(4000)) .itemOutputs( - new ItemStack(GregTech_API.sBlockMachines, 1, Config.metaTileEntityOffset + Registration.PatternOffsetBus)) + new ItemStack(GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset + Registration.PatternOffsetBus)) .duration(20 * SECONDS) - .eut(GT_Values.VP[6]) + .eut(GTValues.VP[6]) .addTo(RecipeMaps.assemblerRecipes); for (int i = 0; i < 4; i++) { - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs(single_item[i], new ItemStack(GameRegistry.findItem("Automagy", "blockTenaciousChest")) ) .fluidInputs(Materials.AdvancedGlue.getFluid(4000)) .itemOutputs( new ItemStack( - GregTech_API.sBlockMachines, + GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset + Registration.TenaciousOffset + i)) .duration(20 * SECONDS) - .eut(GT_Values.VP[i]) + .eut(GTValues.VP[i]) .addTo(RecipeMaps.assemblerRecipes); - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( new ItemStack(GameRegistry.findItem("Automagy", "glyph"), 1, 3), new ItemStack( - GregTech_API.sBlockMachines, + GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset + Registration.TenaciousOffset + i) @@ -810,18 +811,18 @@ public void run() { .fluidInputs(Materials.AdvancedGlue.getFluid(4000)) .itemOutputs( new ItemStack( - GregTech_API.sBlockMachines, + GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset + Registration.FilterOffset + i) ) .duration(20 * SECONDS) - .eut(GT_Values.VP[i]) + .eut(GTValues.VP[i]) .addTo(RecipeMaps.assemblerRecipes); } - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs(Cover_Controller.get(1), Cover_AdvancedRedstoneReceiverInternal.get(1) ) @@ -830,13 +831,13 @@ public void run() { ) .duration(20 * SECONDS) - .eut(GT_Values.VP[2]) + .eut(GTValues.VP[2]) .addTo(RecipeMaps.mixerRecipes); - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( new ItemStack(GameRegistry.findItem("OpenComputers", "item"), 1, 33), - GT_Utility.getIntegratedCircuit(14), + GTUtility.getIntegratedCircuit(14), Machine_HV_Scanner.get(1), new ItemStack(GameRegistry.findItem("OpenComputers", "item"), 2, 25), new ItemStack(GameRegistry.findItem("OpenComputers", "item"), 2, 78)) @@ -845,12 +846,12 @@ public void run() { ) .duration(20 * SECONDS) - .eut(GT_Values.VP[2]) + .eut(GTValues.VP[2]) .addTo(RecipeMaps.circuitAssemblerRecipes); - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( new ItemStack(GameRegistry.findItem("OpenComputers", "item"), 1, 33), - GT_Utility.getIntegratedCircuit(15), + GTUtility.getIntegratedCircuit(15), Cover_AdvancedRedstoneReceiverInternal.get(1), Cover_AdvancedRedstoneTransmitterInternal.get(1)) .fluidInputs(Materials.SolderingAlloy.getMolten(144*20)) @@ -858,10 +859,10 @@ public void run() { ) .duration(20 * SECONDS) - .eut(GT_Values.VP[2]) + .eut(GTValues.VP[2]) .addTo(RecipeMaps.circuitAssemblerRecipes); pc.forEach((s, i) -> { - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( s, ItemList.Tool_Scanner.get(1), @@ -876,39 +877,39 @@ public void run() { ) .duration(20 * SECONDS) - .eut(GT_Values.VP[3]) + .eut(GTValues.VP[3]) .addTo(RecipeMaps.assemblerRecipes); }); pc0.forEach((s) -> { - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs(new ItemStack(Items.book), s) .fluidInputs(Materials.SolderingAlloy.getMolten(144)) .itemOutputs(MyMod.tutorial() ) .duration(20 * SECONDS) - .eut(GT_Values.VP[2]) + .eut(GTValues.VP[2]) .addTo(RecipeMaps.assemblerRecipes); }); - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs(new ItemStack(Items.book), new ItemStack(GameRegistry.findItem("IC2","itemBatREDischarged"),0,OreDictionary.WILDCARD_VALUE)) .fluidInputs(Materials.BatteryAlloy.getMolten(144)) .itemOutputs(MyMod.tutorial("programmable_hatches.eucreafting.tutorial") ) .duration(20 * SECONDS) - .eut(GT_Values.VP[2]) + .eut(GTValues.VP[2]) .addTo(RecipeMaps.assemblerRecipes); - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs(new ItemStack(Items.book), new ItemStack(GameRegistry.findItem("IC2","itemBatRE"),0,OreDictionary.WILDCARD_VALUE)) .fluidInputs(Materials.BatteryAlloy.getMolten(144)) .itemOutputs(MyMod.tutorial("programmable_hatches.eucreafting.tutorial") ) .duration(20 * SECONDS) - .eut(GT_Values.VP[2]) + .eut(GTValues.VP[2]) .addTo(RecipeMaps.assemblerRecipes); ////////////// @@ -918,7 +919,7 @@ public void run() { smartArm(); Item oc=GameRegistry.findItem("OpenComputers", "item"); Item ocae=GameRegistry.findItem("OpenComputers", "item.ae"); - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( new ItemStack(oc,2,53),//inv new ItemStack(oc,1,61),//inv upgrade @@ -937,13 +938,13 @@ public void run() { .eut(480) .addTo(RecipeMaps.mixerRecipes); - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( new ItemStack(GameRegistry.findItem("OpenComputers", "item"), 1, 33), new ItemStack(GameRegistry.findItem("OpenComputers", "item"), 1, 51), new ItemStack(GameRegistry.findItem("OpenComputers", "cable"), 4, 0), Emitter_EV.get(1), - GT_Utility.getIntegratedCircuit(16) + GTUtility.getIntegratedCircuit(16) ) .fluidInputs(Materials.Enderium.getMolten(144*16)) @@ -953,14 +954,14 @@ public void run() { .eut(480) .addTo(RecipeMaps.assemblerRecipes);; - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( Casing_EV.get(1), Sensor_EV.get(1), new ItemStack(GameRegistry.findItem("OpenComputers", "cable"), 32, 0), new ItemStack(GameRegistry.findItem("OpenComputers", "item"), 1, 51), new ItemStack(GameRegistry.findItem("OpenComputers", "item"), 1, 33), - GT_Utility.getIntegratedCircuit(17) + GTUtility.getIntegratedCircuit(17) ) .fluidInputs(Materials.Enderium.getMolten(144*16)) @@ -982,11 +983,11 @@ public void run() { }) - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( io[0] , new ItemStack(MyMod.cover, 1,37), - GT_Utility.getIntegratedCircuit(18) + GTUtility.getIntegratedCircuit(18) ) @@ -997,9 +998,9 @@ public void run() { .addTo(RecipeMaps.formingPressRecipes);; - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( - GT_Utility.getIntegratedCircuit(19), + GTUtility.getIntegratedCircuit(19), Api.INSTANCE.definitions().blocks().fluix().maybeStack(1).get() ) @@ -1009,9 +1010,9 @@ public void run() { .eut(480) .addTo(RecipeMaps.cutterRecipes);; - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( - GT_Utility.getIntegratedCircuit(19), + GTUtility.getIntegratedCircuit(19), Materials.Iron.getPlates(1), new ItemStack(Items.comparator), Emitter_MV.get(1) @@ -1024,7 +1025,7 @@ public void run() { .addTo(RecipeMaps.assemblerRecipes);; - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( new ItemStack(ItemAndBlockHolder.BUFFER), Conveyor_Module_HV.get(1), @@ -1033,7 +1034,7 @@ public void run() { ) .itemOutputs( new ItemStack( - GregTech_API.sBlockMachines, + GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset + Registration.IngBufferOffset)) @@ -1041,7 +1042,7 @@ public void run() { .eut(480) .addTo(RecipeMaps.assemblerRecipes); - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( new ItemStack(ItemAndBlockHolder.LARGE_BUFFER), Conveyor_Module_IV.get(1), @@ -1050,7 +1051,7 @@ public void run() { ) .itemOutputs( new ItemStack( - GregTech_API.sBlockMachines, + GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset + Registration.IngBufferOffset+1)) @@ -1060,20 +1061,20 @@ public void run() { - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( new ItemStack(ItemAndBlockHolder.LEVEL_MAINTAINER), //Casing_EV.get(1), Casing_CleanStainlessSteel.get(1), new ItemStack( - GregTech_API.sBlockMachines, + GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset + Registration.CircuitProviderOffset) ) .itemOutputs( new ItemStack( - GregTech_API.sBlockMachines, + GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset + Registration.LargeProviderOffset)) @@ -1081,7 +1082,7 @@ public void run() { .eut(480*4*4) .addTo(RecipeMaps.assemblerRecipes); - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( new ItemStack(ItemAndBlockHolder.LEVEL_MAINTAINER), Casing_EV.get(1), @@ -1098,7 +1099,7 @@ public void run() { ) .itemOutputs( new ItemStack( - GregTech_API.sBlockMachines, + GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset + Registration.ChainerOffset)) @@ -1107,9 +1108,9 @@ public void run() { .addTo(RecipeMaps.assemblerRecipes); - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( - GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Terbium, 4) + GTOreDictUnificator.get(OrePrefixes.frameGt, Materials.Terbium, 4) ,new ItemStack(MyMod.smartarm,32,4) , Materials.TungstenSteel.getPlates(16) @@ -1117,7 +1118,7 @@ public void run() { ) .itemOutputs( new ItemStack( - GregTech_API.sBlockMachines, + GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset + Registration.IngredientDistributorOffset)) @@ -1157,7 +1158,7 @@ public void run() { }; - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( list[1][i-1].get(1), Api.INSTANCE.definitions().parts().storageBus().maybeStack(1).get() @@ -1165,7 +1166,7 @@ public void run() { ) .itemOutputs( new ItemStack( - GregTech_API.sBlockMachines, + GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset+Registration.MEChest + i-1) ) @@ -1173,7 +1174,7 @@ public void run() { .eut((int) (30*Math.pow(4, i-1))) .addTo(RecipeMaps.formingPressRecipes); - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( list[0][i-1].get(1), ItemAndBlockHolder.FLUID_STORAGE_BUS.stack(1) @@ -1181,7 +1182,7 @@ public void run() { ) .itemOutputs( new ItemStack( - GregTech_API.sBlockMachines, + GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset+Registration.METank + i-1) ) @@ -1191,23 +1192,23 @@ public void run() { CraftingManager.getInstance().addRecipe( new ItemStack( - GregTech_API.sBlockMachines, + GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset+Registration.MEChest + i-1) , new Object[]{"c",'c', new ItemStack( - GregTech_API.sBlockMachines, + GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset+Registration.MEChest + i-1) }); CraftingManager.getInstance().addRecipe( new ItemStack( - GregTech_API.sBlockMachines, + GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset+Registration.METank + i-1) , new Object[]{"c",'c', new ItemStack( - GregTech_API.sBlockMachines, + GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset+Registration.METank + i-1) @@ -1220,37 +1221,37 @@ public void run() { prefab(); - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( new ItemStack(MyMod.cover, 1, 0)) .fluidInputs(Materials.Enderium.getMolten(144*10)) .itemOutputs( new ItemStack(MyMod.cover, 1, 4)) .duration(20 * SECONDS) - .eut(GT_Values.VP[3]) + .eut(GTValues.VP[3]) .addTo(RecipeMaps.assemblerRecipes); - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( Hatch_Input_Bus_ME_Advanced.get(1), Hatch_DataAccess_UV.get(1), - com.github.technus.tectech.thing. CustomItemList.Machine_Multi_DataBank.get(1), - com.github.technus.tectech.thing. CustomItemList.dataInAss_Hatch.get(1), - com.github.technus.tectech.thing. CustomItemList.dataOutAss_Hatch.get(1), - com.github.technus.tectech.thing. CustomItemList.LASERpipe.get(4) + tectech.thing. CustomItemList.Machine_Multi_DataBank.get(1), + tectech.thing. CustomItemList.dataInAss_Hatch.get(1), + tectech.thing. CustomItemList.dataOutAss_Hatch.get(1), + tectech.thing. CustomItemList.LASERpipe.get(4) ) //.fluidInputs(Materials.Enderium.getMolten(144*10)) .itemOutputs( new ItemStack( - GregTech_API.sBlockMachines, + GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset+Registration.DataHatchMEOffset)) .duration(20 * SECONDS) - .eut(GT_Values.VP[8]) + .eut(GTValues.VP[8]) .addTo(RecipeMaps.assemblerRecipes); - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( new ItemStack( ConfigItems.itemGolemCore,1,8), @@ -1261,11 +1262,11 @@ public void run() { new ItemStack( ConfigItems.itemGolemCore,1,120)) .duration(20 * SECONDS) - .eut(GT_Values.VP[3]) + .eut(GTValues.VP[3]) .addTo(RecipeMaps.assemblerRecipes); - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( new ItemStack(GameRegistry.findItem("IC2","blockReactorChamber")), Sensor_LuV.get(1), @@ -1276,20 +1277,20 @@ public void run() { new ItemStack( MyMod.reactorsyncer)) .duration(20 * SECONDS) - .eut(GT_Values.VP[3]) + .eut(GTValues.VP[3]) .addTo(RecipeMaps.assemblerRecipes); - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( new ItemStack(GameRegistry.findItem("IC2NuclearControl","blockNuclearControlMain"),1,9), Sensor_LuV.get(1), new ItemStack(GameRegistry.findItem("OpenComputers","adapter")) ) .itemOutputs(new ItemStack(MyMod.reader)) - .duration(20 * SECONDS).eut(GT_Values.VP[3]).addTo(RecipeMaps.assemblerRecipes); + .duration(20 * SECONDS).eut(GTValues.VP[3]).addTo(RecipeMaps.assemblerRecipes); - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( Api.INSTANCE.definitions().parts().storageBus().maybeStack(1).get(), new ItemStack(ItemAndBlockHolder.FLUID_STORAGE_BUS), @@ -1297,38 +1298,38 @@ public void run() { new ItemStack(ItemAndBlockHolder.LEVEL_MAINTAINER) ) .itemOutputs(new ItemStack(MyMod.amountmaintainer)) - .duration(20 * SECONDS).eut(GT_Values.VP[6]).addTo(RecipeMaps.assemblerRecipes); + .duration(20 * SECONDS).eut(GTValues.VP[6]).addTo(RecipeMaps.assemblerRecipes); - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( new ItemStack(ItemAndBlockHolder.LEVEL_MAINTAINER), Api.INSTANCE.definitions().blocks().craftingStorage1k().maybeStack(32).get() ) .itemOutputs(new ItemStack(MyMod.submitter)) - .duration(20 * SECONDS).eut(GT_Values.VP[8]).addTo(RecipeMaps.assemblerRecipes); + .duration(20 * SECONDS).eut(GTValues.VP[8]).addTo(RecipeMaps.assemblerRecipes); - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( - new ItemStack(GregTech_API.sBlockMachines,0,Config.metaTileEntityOffset+Registration.SlaveOffset), + new ItemStack(GregTechAPI.sBlockMachines,0,Config.metaTileEntityOffset+Registration.SlaveOffset), new ItemStack(GameRegistry.findItem("RIO", "tile.remote_interface")), new ItemStack(GameRegistry.findItem("RIO", "item.chip.transfer"), 1, 0), new ItemStack(GameRegistry.findItem("RIO", "item.chip.transfer"), 1, 1) ) .fluidInputs(new FluidStack(TinkerSmeltery.moltenEnderFluid,1000)) - .itemOutputs(new ItemStack( GregTech_API.sBlockMachines, + .itemOutputs(new ItemStack( GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset+Registration.MappingSlaveOffset)) - .duration(20 * SECONDS).eut(GT_Values.VP[3]).addTo(RecipeMaps.assemblerRecipes); + .duration(20 * SECONDS).eut(GTValues.VP[3]).addTo(RecipeMaps.assemblerRecipes); - GT_Values.RA.stdBuilder() - .metadata(RESEARCH_ITEM, new ItemStack( GregTech_API.sBlockMachines, + GTValues.RA.stdBuilder() + .metadata(RESEARCH_ITEM, new ItemStack( GregTechAPI.sBlockMachines, 1,Config.metaTileEntityOffset+Registration.MappingSlaveOffset)) .metadata(RESEARCH_TIME, 1 * HOURS) .itemInputs( - new ItemStack( GregTech_API.sBlockMachines, + new ItemStack( GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset+Registration.MappingSlaveOffset), new ItemStack( ItemAndBlockHolder.INTERFACE), @@ -1344,12 +1345,12 @@ public void run() { HeeEndium.getMolten(1000), FluidRegistry.getFluid("endergoo")==null?Water.getFluid(1): new FluidStack(FluidRegistry.getFluid("endergoo"),1000) ) - .itemOutputs(new ItemStack( GregTech_API.sBlockMachines, + .itemOutputs(new ItemStack( GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset+Registration.PatternMappingSlaveOffset)) - .duration(20000 * SECONDS).eut(GT_Values.VP[1]).addTo(GT_RecipeConstants.AssemblyLine); + .duration(20000 * SECONDS).eut(GTValues.VP[1]).addTo(GTRecipeConstants.AssemblyLine); - /*GT_Values.RA.stdBuilder() + /*GTValues.RA.stdBuilder() .metadata(RESEARCH_ITEM, new ItemStack(Items.apple)) .metadata(RESEARCH_TIME, 100 ) .itemInputs( @@ -1369,32 +1370,32 @@ public void run() { new ItemStack(Items.bed) ) - .duration(100 * SECONDS).eut(GT_Values.VP[1]).addTo(GT_RecipeConstants.AssemblyLine); + .duration(100 * SECONDS).eut(GTValues.VP[1]).addTo(GTRecipeConstants.AssemblyLine); */ - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( - new ItemStack( GregTech_API.sBlockMachines, + new ItemStack( GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset+Registration.QuadDualInputHatchOffset+10), new ItemStack(MyMod.iohub) ) - .itemOutputs(new ItemStack( GregTech_API.sBlockMachines, + .itemOutputs(new ItemStack( GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset+Registration.DualInputHatchOCOffset)) - .duration(20 * SECONDS).eut(GT_Values.VP[10]).addTo(RecipeMaps.assemblerRecipes); + .duration(20 * SECONDS).eut(GTValues.VP[10]).addTo(RecipeMaps.assemblerRecipes); - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( new ItemStack( MyMod.toolkit,0,OreDictionary.WILDCARD_VALUE) , new ItemStack(Items.diamond) - , GT_Utility.getIntegratedCircuit(7) + , GTUtility.getIntegratedCircuit(7) ) @@ -1409,7 +1410,7 @@ public void run() { if(flag){ - /*GT_Values.RA.stdBuilder() + /*GTValues.RA.stdBuilder() .itemInputs( new ItemStack( GameRegistry.findItem("computronics","computronics.chatBox")), @@ -1424,7 +1425,7 @@ public void run() { .addTo(RecipeMaps.assemblerRecipes);*/ - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs(Hatch_Input_Bus_ME.get(1), Materials.Steel.getPlates(1) ) @@ -1433,7 +1434,7 @@ public void run() { .eut(480*4*4) .addTo(RecipeMaps.formingPressRecipes); - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs(Hatch_Input_ME.get(1), Materials.Steel.getPlates(1) ) @@ -1442,7 +1443,7 @@ public void run() { .eut(480*4*4) .addTo(RecipeMaps.formingPressRecipes); - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs(Hatch_Input_Bus_ULV.get(16), Materials.Steel.getPlates(1) ) @@ -1454,24 +1455,24 @@ public void run() { for(int i=0;i<4;i++) - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( new ItemStack( MyMod.upgrades,3,0), HATCHES_INPUT_BUS[i].get(1) ) .itemOutputs( new ItemStack( - GregTech_API.sBlockMachines, + GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset + Registration.MultiCircuitBusOffset + i)) .duration(15 * SECONDS) - .eut(GT_Values.VP[i]) + .eut(GTValues.VP[i]) .addTo(RecipeMaps.assemblerRecipes); } /* - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( gregtech.api.enums.ItemList.Shape_Mold_Block.get(0) @@ -1481,11 +1482,11 @@ public void run() { MyMod.submitter)) .duration(150 * SECONDS) - .eut(GT_Values.VP[8]) + .eut(GTValues.VP[8]) .addTo(RecipeMaps.fluidSolidifierRecipes); - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( gregtech.api.enums.ItemList.Shape_Mold_Plate.get(0) @@ -1495,18 +1496,18 @@ public void run() { MyMod.amountmaintainer)) .duration(150 * SECONDS) - .eut(GT_Values.VP[7]) + .eut(GTValues.VP[7]) .addTo(RecipeMaps.fluidSolidifierRecipes); */ - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( Hatch_Input_Bus_ME .get(1) , new ItemStack(GameRegistry.findItem("OpenComputers", "item"), 1,29) ) .itemOutputs(new ItemStack( - GregTech_API.sBlockMachines, + GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset + Registration.RestrictedBusME) ) @@ -1514,14 +1515,14 @@ public void run() { .eut(480) .addTo(RecipeMaps.assemblerRecipes); - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( Hatch_Input_ME .get(1) , new ItemStack(GameRegistry.findItem("OpenComputers", "item"), 1,29) ) .itemOutputs(new ItemStack( - GregTech_API.sBlockMachines, + GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset + Registration.RestrictedHatchME) ) @@ -1533,13 +1534,13 @@ public void run() { for(ItemList i:new ItemList[]{ItemList.ItemFilter_Export,ItemList.ItemFilter_Import}) - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( - new ItemStack(GregTech_API.sBlockMachines,1,Config.metaTileEntityOffset + Registration.SlaveOffset) ,CertusQuartz.getPlates(4),i.get(1) + new ItemStack(GregTechAPI.sBlockMachines,1,Config.metaTileEntityOffset + Registration.SlaveOffset) ,CertusQuartz.getPlates(4),i.get(1) ) .itemOutputs(new ItemStack( - GregTech_API.sBlockMachines, + GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset + Registration.SlaveBusOffset) ) @@ -1551,46 +1552,46 @@ public void run() { - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( - new ItemStack(GregTech_API.sBlockMachines,1,Config.metaTileEntityOffset + Registration.SlaveOffset) + new ItemStack(GregTechAPI.sBlockMachines,1,Config.metaTileEntityOffset + Registration.SlaveOffset) , Lapis.getPlates(4),ItemList.FluidFilter.get(1) ) - .itemOutputs(new ItemStack(GregTech_API.sBlockMachines,1,Config.metaTileEntityOffset + Registration.SlaveHatchOffset) ) + .itemOutputs(new ItemStack(GregTechAPI.sBlockMachines,1,Config.metaTileEntityOffset + Registration.SlaveHatchOffset) ) .duration(100 * SECONDS) .eut(480) .addTo(RecipeMaps.assemblerRecipes); - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( ItemList.Hatch_Input_Bus_ME_Advanced.get(1) , ItemList.Machine_Multi_Assemblyline.get(0) , new ItemStack(Items.fishing_rod) ) - .itemOutputs(new ItemStack(GregTech_API.sBlockMachines,1,Config.metaTileEntityOffset + Registration.DecoyBusME) ) + .itemOutputs(new ItemStack(GregTechAPI.sBlockMachines,1,Config.metaTileEntityOffset + Registration.DecoyBusME) ) .duration(100 * SECONDS) .eut(480) .addTo(RecipeMaps.assemblerRecipes); - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( ItemList.Hatch_Input_ME_Advanced.get(1) , ItemList.Machine_Multi_Assemblyline.get(0) , new ItemStack(Items.fishing_rod) ) - .itemOutputs(new ItemStack(GregTech_API.sBlockMachines,1,Config.metaTileEntityOffset + Registration.DecoyHatchME) ) + .itemOutputs(new ItemStack(GregTechAPI.sBlockMachines,1,Config.metaTileEntityOffset + Registration.DecoyHatchME) ) .duration(100 * SECONDS) .eut(480) .addTo(RecipeMaps.assemblerRecipes); - TT_recipeAdder.addResearchableAssemblylineRecipe( - new ItemStack(GregTech_API.sBlockMachines,1,Config.metaTileEntityOffset + Registration.RestrictedBusME) + TTRecipeAdder.addResearchableAssemblylineRecipe( + new ItemStack(GregTechAPI.sBlockMachines,1,Config.metaTileEntityOffset + Registration.RestrictedBusME) , 10_000, 1, 2000, 1, new ItemStack[]{ ItemList.Hatch_Input_Bus_ME_Advanced.get(1), new ItemStack(Items.comparator), @@ -1605,12 +1606,12 @@ public void run() { Materials.RedstoneAlloy.getMolten(144*6) } , - new ItemStack(GregTech_API.sBlockMachines,1,Config.metaTileEntityOffset + Registration.PFilterBusME) - , SECONDS*120, (int) GT_Values.VP[8]); + new ItemStack(GregTechAPI.sBlockMachines,1,Config.metaTileEntityOffset + Registration.PFilterBusME) + , SECONDS*120, (int) GTValues.VP[8]); - TT_recipeAdder.addResearchableAssemblylineRecipe( - new ItemStack(GregTech_API.sBlockMachines,1,Config.metaTileEntityOffset + Registration.RestrictedHatchME) + TTRecipeAdder.addResearchableAssemblylineRecipe( + new ItemStack(GregTechAPI.sBlockMachines,1,Config.metaTileEntityOffset + Registration.RestrictedHatchME) , 10_000, 1, 2000, 1, new ItemStack[]{ ItemList.Hatch_Input_ME_Advanced.get(1), new ItemStack(Items.comparator), @@ -1625,11 +1626,11 @@ public void run() { Materials.RedstoneAlloy.getMolten(144*6) } , - new ItemStack(GregTech_API.sBlockMachines,1,Config.metaTileEntityOffset + Registration.PFilterHatchME) - , SECONDS*120, (int) GT_Values.VP[9]); + new ItemStack(GregTechAPI.sBlockMachines,1,Config.metaTileEntityOffset + Registration.PFilterHatchME) + , SECONDS*120, (int) GTValues.VP[9]); - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( new ItemStack(ItemAndBlockHolder.INTERFACE), ItemList.FluidFilter.get(8) @@ -1641,7 +1642,7 @@ public void run() { for(ItemList item: new ItemList[]{ItemList.ItemFilter_Import,ItemList.ItemFilter_Export}){ - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( Api.INSTANCE.definitions().blocks().iface().maybeStack(1).get(), item.get(8), @@ -1652,11 +1653,11 @@ public void run() { .duration(100 * SECONDS) .eut(480*4*4*4) .addTo(RecipeMaps.assemblerRecipes); - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( Api.INSTANCE.definitions().blocks().iface().maybeStack(1).get(), item.get(8), - GT_Utility.getIntegratedCircuit(9) + GTUtility.getIntegratedCircuit(9) ) .itemOutputs(new ItemStack(MyMod.storageproxy,1,2) ) .duration(100 * SECONDS) @@ -1679,35 +1680,35 @@ public void run() { } - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( new ItemStack(GameRegistry.findItem("ExtraUtilities", "trashcan"),1,0), Hatch_Output_Bus_IV.get(1), - GT_Utility.getIntegratedCircuit(3) + GTUtility.getIntegratedCircuit(3) ) .itemOutputs( - new ItemStack(GregTech_API.sBlockMachines,1,Config.metaTileEntityOffset + Registration.VBus) + new ItemStack(GregTechAPI.sBlockMachines,1,Config.metaTileEntityOffset + Registration.VBus) ) .duration(100 * SECONDS) .eut(480*4) .addTo(RecipeMaps.assemblerRecipes); - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( new ItemStack(GameRegistry.findItem("ExtraUtilities", "trashcan"),1,1), Hatch_Output_IV.get(1), - GT_Utility.getIntegratedCircuit(4) + GTUtility.getIntegratedCircuit(4) ) .itemOutputs( - new ItemStack(GregTech_API.sBlockMachines,1,Config.metaTileEntityOffset + Registration.VHatch) + new ItemStack(GregTechAPI.sBlockMachines,1,Config.metaTileEntityOffset + Registration.VHatch) ) .duration(100 * SECONDS) .eut(480*4) .addTo(RecipeMaps.assemblerRecipes); - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( Cover_Controller.get(1), new ItemStack(MyMod.cover, 1,37) @@ -1721,7 +1722,7 @@ public void run() { .addTo(RecipeMaps.assemblerRecipes); - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( Api.INSTANCE.parts().partExportBus.stack(1), @@ -1738,7 +1739,7 @@ public void run() { .duration(100 * SECONDS) .eut(480) .addTo(RecipeMaps.assemblerRecipes); - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( new ItemStack( ItemAndBlockHolder.FLUID_EXPORT_BUS), @@ -1755,7 +1756,7 @@ public void run() { .duration(100 * SECONDS) .eut(480) .addTo(RecipeMaps.assemblerRecipes); - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( Api.INSTANCE.definitions().parts().p2PTunnelME().maybeStack(1).get(), Api.INSTANCE.definitions().blocks().molecularAssembler().maybeStack(1).get() @@ -1767,7 +1768,7 @@ public void run() { .duration(1000 * SECONDS) .eut(480) .addTo(RecipeMaps.assemblerRecipes); - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( new ItemStack( GameRegistry.findItem("EnderIO","itemMaterial"),6,1),//Conduit Binder Api.INSTANCE.definitions().blocks().molecularAssembler().maybeStack(1).get() @@ -1780,7 +1781,7 @@ public void run() { .eut(480) .addTo(RecipeMaps.assemblerRecipes); - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( Optional.of( @@ -1797,13 +1798,13 @@ public void run() { .eut(480) .addTo(RecipeMaps.assemblerRecipes); - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( Api.INSTANCE.definitions().blocks().craftingUnit().maybeStack(1).get(), new ItemStack( - GregTech_API.sBlockMachines, + GregTechAPI.sBlockMachines, 1, Config.metaTileEntityOffset+Registration.CircuitProviderOffsetT0) , Api.INSTANCE.definitions().materials().cardInverter().maybeStack(1).get() @@ -1816,7 +1817,7 @@ public void run() { .addTo(RecipeMaps.assemblerRecipes); for(int i=0;i<=4;i++) - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( new ItemStack( IronChest.ironChestBlock,1,new int[]{3,0,4,1,2}[i]) @@ -1845,7 +1846,7 @@ public void run() { ItemStack bbb=new ItemStack(MyMod.condensers[i]); - GT_Values.RA.stdBuilder() + GTValues.RA.stdBuilder() .itemInputs( bb,new ItemStack(MyMod.smartarm, 4,i+5) diff --git a/src/main/java/reobf/proghatches/main/registration/ProgHatchCreativeTab.java b/src/main/java/reobf/proghatches/main/registration/ProgHatchCreativeTab.java index 88aad47..dadadc8 100644 --- a/src/main/java/reobf/proghatches/main/registration/ProgHatchCreativeTab.java +++ b/src/main/java/reobf/proghatches/main/registration/ProgHatchCreativeTab.java @@ -8,8 +8,8 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.GregTech_API; -import gregtech.api.util.GT_Utility; +import gregtech.api.GregTechAPI; +import gregtech.api.util.GTUtility; import reobf.proghatches.item.ItemProgrammingCircuit; import reobf.proghatches.main.MyMod; import thaumcraft.common.config.ConfigItems; @@ -23,7 +23,7 @@ public ProgHatchCreativeTab(String lable) { @SideOnly(Side.CLIENT) public ItemStack getIconItemStack() { - return ItemProgrammingCircuit.wrap(GT_Utility.getIntegratedCircuit(0)); + return ItemProgrammingCircuit.wrap(GTUtility.getIntegratedCircuit(0)); } @SuppressWarnings("unchecked") @@ -32,7 +32,7 @@ public void displayAllReleventItems(List p_78018_1_) { p_78018_1_.addAll(Registration.items); p_78018_1_.add(ItemProgrammingCircuit.wrap(null)); - GregTech_API.getConfigurationCircuitList(100).stream().map(ItemProgrammingCircuit::wrap) + GregTechAPI.getConfigurationCircuitList(100).stream().map(ItemProgrammingCircuit::wrap) .forEach(p_78018_1_::add); p_78018_1_.add(new ItemStack(MyMod.fixer)); p_78018_1_.add(new ItemStack(MyMod.toolkit)); diff --git a/src/main/java/reobf/proghatches/main/registration/Registration.java b/src/main/java/reobf/proghatches/main/registration/Registration.java index 1737991..f3a5a4b 100644 --- a/src/main/java/reobf/proghatches/main/registration/Registration.java +++ b/src/main/java/reobf/proghatches/main/registration/Registration.java @@ -13,12 +13,12 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraftforge.common.util.ForgeDirection; -import gregtech.api.GregTech_API; +import gregtech.api.GregTechAPI; import gregtech.api.enums.Dyes; -import gregtech.api.enums.GT_Values; +import gregtech.api.enums.GTValues; import gregtech.api.render.TextureFactory; import gregtech.api.util.LightingHelper; -import gregtech.common.render.GT_CopiedBlockTexture; +import gregtech.common.render.GTCopiedBlockTextureRender; import reobf.proghatches.eucrafting.AECover; import reobf.proghatches.eucrafting.BridgingData; import reobf.proghatches.eucrafting.InterfaceData; @@ -121,45 +121,45 @@ public class Registration implements Runnable { public void run() { - for (int i = 0; i < GT_Values.VN.length - 1; i++) { + for (int i = 0; i < GTValues.VN.length - 1; i++) { new DualInputHatch( Config.metaTileEntityOffset + DualInputHatchOffset + i, "hatch.input.dual.tier." + i, - String.format(LangManager.translateToLocal("hatch.input.dual.tier.name"), GT_Values.VN[i]), + String.format(LangManager.translateToLocal("hatch.input.dual.tier.name"), GTValues.VN[i]), i, false); } - for (int i = 0; i < GT_Values.VN.length - 1; i++) { + for (int i = 0; i < GTValues.VN.length - 1; i++) { new DualInputHatch( Config.metaTileEntityOffset + QuadDualInputHatchOffset + i, "hatch.input.dual.quad.tier." + i, - String.format(LangManager.translateToLocal("hatch.input.dual.quad.tier.name"), GT_Values.VN[i]), + String.format(LangManager.translateToLocal("hatch.input.dual.quad.tier.name"), GTValues.VN[i]), i, true); } - for (int i = 0; i < GT_Values.VN.length - 1; i++) { + for (int i = 0; i < GTValues.VN.length - 1; i++) { new BufferedDualInputHatch( Config.metaTileEntityOffset + BufferedDualInputHatchOffset + i, "hatch.input.buffered.dual.tier." + i, - String.format(LangManager.translateToLocal("hatch.input.buffered.dual.tier.name"), GT_Values.VN[i]), + String.format(LangManager.translateToLocal("hatch.input.buffered.dual.tier.name"), GTValues.VN[i]), i, false, 1); } - for (int i = 0; i < GT_Values.VN.length - 1; i++) { + for (int i = 0; i < GTValues.VN.length - 1; i++) { new BufferedDualInputHatch( Config.metaTileEntityOffset + BufferedQuadDualInputHatchOffset + i, "hatch.input.buffered.dual.quad.tier." + i, - String.format(LangManager.translateToLocal("hatch.input.buffered.dual.quad.tier.name"), GT_Values.VN[i]), + String.format(LangManager.translateToLocal("hatch.input.buffered.dual.quad.tier.name"), GTValues.VN[i]), i, true, @@ -167,12 +167,12 @@ public void run() { } - for (int i = 0; i < GT_Values.VN.length - 1; i++) { + for (int i = 0; i < GTValues.VN.length - 1; i++) { new BufferedDualInputHatch( Config.metaTileEntityOffset + BufferedQuadDualInputHatchMKIIOffset + i, "hatch.input.buffered.dual.quad.tier.mkii." + i, - String.format(LangManager.translateToLocal("hatch.input.buffered.dual.quad.tier.mkii.name"), GT_Values.VN[i]), + String.format(LangManager.translateToLocal("hatch.input.buffered.dual.quad.tier.mkii.name"), GTValues.VN[i]), i, true, 6+Math.max(i-4, 0)*2); @@ -192,45 +192,45 @@ public void run() { 5, 4, 1); - GregTech_API.registerCover( + GregTechAPI.registerCover( new ItemStack(MyMod.cover, 1, 100), TextureFactory.of( MACHINE_CASINGS[1][0], TextureFactory.of(gregtech.api.enums.Textures.BlockIcons.OVERLAY_SCREEN_GLOW)), new LevelControlCover()); - GregTech_API.registerCover( + GregTechAPI.registerCover( new ItemStack(MyMod.cover, 1, 0), TextureFactory.of( MACHINE_CASINGS[1][0], TextureFactory.of(gregtech.api.enums.Textures.BlockIcons.OVERLAY_SCREEN_GLOW)), new ProgrammingCover()); - GregTech_API.registerCover( + GregTechAPI.registerCover( new ItemStack(MyMod.cover, 1, 1), TextureFactory.of( MACHINE_CASINGS[1][0], TextureFactory.of(gregtech.api.enums.Textures.BlockIcons.OVERLAY_SCREEN_GLOW)), new WirelessControlCover()); - GregTech_API.registerCover( + GregTechAPI.registerCover( new ItemStack(MyMod.cover, 1, 4), TextureFactory.of( MACHINE_CASINGS[1][0], TextureFactory.of(gregtech.api.enums.Textures.BlockIcons.OVERLAY_SCREEN_GLOW)), new LinkedBusSlaveCover()); //WIP - /*GregTech_API.registerCover( + /*GregTechAPI.registerCover( new ItemStack(MyMod.cover, 1, 15), TextureFactory.of( MACHINE_CASINGS[1][0], TextureFactory.of(gregtech.api.enums.Textures.BlockIcons.OVERLAY_SCREEN_GLOW)), new RecipeOutputAwarenessCover());*/ - /* GregTech_API.registerCover( + /* GregTechAPI.registerCover( new ItemStack(MyMod.cover, 1, 2), TextureFactory.of( MACHINE_CASINGS[1][0], TextureFactory.of(gregtech.api.enums.Textures.BlockIcons.OVERLAY_SCREEN_GLOW)), new RecipeCheckResultCover());*/ - GregTech_API.registerCover( + GregTechAPI.registerCover( new ItemStack(MyMod.cover, 1, 3), TextureFactory.of( MACHINE_CASINGS[1][0], @@ -240,14 +240,14 @@ public void run() { for (int i = 0; i < 15; i++) { ; - GregTech_API.registerCover( + GregTechAPI.registerCover( new ItemStack(MyMod.smartarm, 1, i), TextureFactory .of(MACHINE_CASINGS[i][0], TextureFactory.of(gregtech.api.enums.Textures.BlockIcons.OVERLAY_ARM)), new SmartArmCover(i)); } - GregTech_API.registerCover( + GregTechAPI.registerCover( new ItemStack(MyMod.cover,1,32), TextureFactory.of( AEApi.instance().blocks().blockInterface.block()) @@ -256,30 +256,30 @@ public void run() { new AECover(InterfaceData.class)); - GregTech_API.registerCover( + GregTechAPI.registerCover( new ItemStack(MyMod.cover,1,33), TextureFactory.of( ItemAndBlockHolder.INTERFACE), new AECover(InterfaceData.FluidInterfaceData_TileFluidInterface.class)); - GregTech_API.registerCover( + GregTechAPI.registerCover( new ItemStack(MyMod.cover,1,34), TextureFactory.of( AEApi.instance().blocks().blockInterface.block()), new AECover(InterfaceP2PNoFluidData.class)); - GregTech_API.registerCover( + GregTechAPI.registerCover( new ItemStack(MyMod.cover,1,35), TextureFactory.of( ItemAndBlockHolder.INTERFACE), new AECover(InterfaceP2PData.class)); - GregTech_API.registerCover( + GregTechAPI.registerCover( new ItemStack(MyMod.cover,1,36), new DeferredGetterTexture(()->MyMod.block_euinterface,ForgeDirection.UP, 0, Dyes._NULL.mRGBa, false), new AECover(InterfaceP2PEUData.class)); - GregTech_API.registerCover( + GregTechAPI.registerCover( new ItemStack(MyMod.cover,1,37), TextureFactory.of( @@ -293,7 +293,7 @@ public void run() { new AECover(BridgingData.class)); for(int i=0;i<=4;i++){ - GregTech_API.registerCover( + GregTechAPI.registerCover( new ItemStack(MyMod.cover,1,90+i), TextureFactory.of( MACHINE_CASINGS[1][0], @@ -359,14 +359,14 @@ public void run() { for (int i = 0; i < 4; i++) new FilterOutputBus( Config.metaTileEntityOffset + TenaciousOffset + i, "hatch.output.tenacious." + i, - LangManager.translateToLocalFormatted("hatch.output.tenacious.name", GT_Values.VN[i]), + LangManager.translateToLocalFormatted("hatch.output.tenacious.name", GTValues.VN[i]), i, true); for (int i = 0; i < 4; i++) new FilterOutputBus( Config.metaTileEntityOffset + FilterOffset + i, "hatch.output.filter." + i, - LangManager.translateToLocalFormatted("hatch.output.filter.name", GT_Values.VN[i]), + LangManager.translateToLocalFormatted("hatch.output.filter.name", GTValues.VN[i]), i, false); @@ -420,7 +420,7 @@ public void run() { for (int i = 0; i < 4; i++) new MultiCircuitInputBus( Config.metaTileEntityOffset + MultiCircuitBusOffset + i, "bus.input.multicircuit." + i, - LangManager.translateToLocalFormatted("bus.input.multicircuit.name",GT_Values.VN[i]), + LangManager.translateToLocalFormatted("bus.input.multicircuit.name",GTValues.VN[i]), i+4 ); @@ -518,7 +518,7 @@ public void run() { new DualInputHatch( Config.metaTileEntityOffset + MultiCircuitDualInputHatchOffset + i, "hatch.input.multicircuit.dual.tier." + (i+4), - String.format(LangManager.translateToLocal("hatch.input.multicircuit.dual.tier.name"), GT_Values.VN[i+4]), + String.format(LangManager.translateToLocal("hatch.input.multicircuit.dual.tier.name"), GTValues.VN[i+4]), i+4, false,true); @@ -529,13 +529,13 @@ public void run() { new DualInputHatch( Config.metaTileEntityOffset + MultiCircuitQuadDualInputHatchOffset + i, "hatch.input.multicircuit.dual.quad.tier." + (i+4), - String.format(LangManager.translateToLocal("hatch.input.multicircuit.dual.quad.tier.name"), GT_Values.VN[i+4]), + String.format(LangManager.translateToLocal("hatch.input.multicircuit.dual.quad.tier.name"), GTValues.VN[i+4]), i, true,true); }*/ } -public class DeferredGetterTexture extends GT_CopiedBlockTexture{ +public class DeferredGetterTexture extends GTCopiedBlockTextureRender{ private IIcon getIcon(int ordinalSide) { return getBlock().getIcon(ordinalSide, 0); diff --git a/src/main/java/reobf/proghatches/oc/ItemGTRedstoneCard.java b/src/main/java/reobf/proghatches/oc/ItemGTRedstoneCard.java index 4fae645..930c46c 100644 --- a/src/main/java/reobf/proghatches/oc/ItemGTRedstoneCard.java +++ b/src/main/java/reobf/proghatches/oc/ItemGTRedstoneCard.java @@ -17,7 +17,7 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import gregtech.common.covers.redstone.GT_Cover_AdvancedRedstoneReceiverBase.GateMode; +import gregtech.common.covers.redstone.CoverAdvancedRedstoneReceiverBase.GateMode; import li.cil.oc.api.Network; import li.cil.oc.api.machine.Arguments; import li.cil.oc.api.machine.Callback; diff --git a/src/main/java/reobf/proghatches/oc/ItemWirelessPeripheralCard.java b/src/main/java/reobf/proghatches/oc/ItemWirelessPeripheralCard.java index dc12949..3269306 100644 --- a/src/main/java/reobf/proghatches/oc/ItemWirelessPeripheralCard.java +++ b/src/main/java/reobf/proghatches/oc/ItemWirelessPeripheralCard.java @@ -8,7 +8,7 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.SoundResource; -import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTUtility; import li.cil.oc.api.network.EnvironmentHost; import li.cil.oc.api.network.ManagedEnvironment; import li.cil.oc.api.network.Message; @@ -169,7 +169,7 @@ public NBTTagCompound dataTag(ItemStack stack) { public ItemStack onItemRightClick(ItemStack itemStackIn, World worldIn, EntityPlayer player) { if (player.isSneaking()) { - GT_Utility.doSoundAtClient(SoundResource.IC2_TOOLS_OD_SCANNER, 1, 1.0F, player.posX, player.posY, + GTUtility.doSoundAtClient(SoundResource.IC2_TOOLS_OD_SCANNER, 1, 1.0F, player.posX, player.posY, player.posZ); itemStackIn.setTagCompound(null); diff --git a/src/main/java/reobf/proghatches/oc/TileCardReader.java b/src/main/java/reobf/proghatches/oc/TileCardReader.java index 480cd8c..cfa03af 100644 --- a/src/main/java/reobf/proghatches/oc/TileCardReader.java +++ b/src/main/java/reobf/proghatches/oc/TileCardReader.java @@ -17,7 +17,7 @@ import com.gtnewhorizons.modularui.common.widget.SlotWidget; import com.gtnewhorizons.modularui.common.widget.textfield.TextFieldWidget; -import gregtech.api.gui.modularui.GT_UITextures; +import gregtech.api.gui.modularui.GTUITextures; import gregtech.api.gui.modularui.GUITextureSet; import li.cil.oc.api.machine.Arguments; import li.cil.oc.api.machine.Callback; diff --git a/src/main/java/reobf/proghatches/oc/TileWirelessPeripheralStation.java b/src/main/java/reobf/proghatches/oc/TileWirelessPeripheralStation.java index 8d9612d..8bdb62c 100644 --- a/src/main/java/reobf/proghatches/oc/TileWirelessPeripheralStation.java +++ b/src/main/java/reobf/proghatches/oc/TileWirelessPeripheralStation.java @@ -9,7 +9,7 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.SoundResource; -import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTUtility; import li.cil.oc.api.network.Message; import li.cil.oc.api.network.Node; import li.cil.oc.api.network.Visibility; @@ -155,7 +155,7 @@ public boolean onBlockActivated(World worldIn, int x, int y, int z, EntityPlayer TileWirelessPeripheralStation tile = (TileWirelessPeripheralStation) worldIn.getTileEntity(x, y, z); if (Wrench.holdsApplicableWrench(player, new BlockPosition(x, y, z, Some.apply(worldIn)))) { if (!worldIn.isRemote && tile.oneComputer == false) { - GT_Utility.sendSoundToPlayers(worldIn, SoundResource.RANDOM_ANVIL_BREAK, 1.0F, -1.0F, x, y, z); + GTUtility.sendSoundToPlayers(worldIn, SoundResource.RANDOM_ANVIL_BREAK, 1.0F, -1.0F, x, y, z); Wrench.wrenchUsed(player, new BlockPosition(x, y, z, Some.apply(worldIn))); tile.oneComputer = true; } @@ -169,7 +169,7 @@ public boolean onBlockActivated(World worldIn, int x, int y, int z, EntityPlayer if (is.getTagCompound() == null) is.setTagCompound(new NBTTagCompound()); - GT_Utility.doSoundAtClient(SoundResource.IC2_TOOLS_OD_SCANNER, 1, 1.0F, x + 0.5, y + 0.5, z + 0.5); + GTUtility.doSoundAtClient(SoundResource.IC2_TOOLS_OD_SCANNER, 1, 1.0F, x + 0.5, y + 0.5, z + 0.5); is.getTagCompound().setString("remoteUUID", tile.thisUUID.toString()); diff --git a/src/main/java/reobf/proghatches/thaum/AIFix.java b/src/main/java/reobf/proghatches/thaum/AIFix.java index 88208a0..f95343f 100644 --- a/src/main/java/reobf/proghatches/thaum/AIFix.java +++ b/src/main/java/reobf/proghatches/thaum/AIFix.java @@ -9,8 +9,8 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.BaseMetaTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Maintenance; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; +import gregtech.api.metatileentity.implementations.MTEHatchMaintenance; +import gregtech.api.metatileentity.implementations.MTEMultiBlockBase; import gregtech.api.multitileentity.base.MultiTileEntity; import net.minecraft.entity.ai.EntityAIBase; import net.minecraft.tileentity.TileEntity; @@ -78,13 +78,13 @@ public boolean continueExecuting() { int hostx,hosty,hostz; - private GT_MetaTileEntity_Hatch_Maintenance getHatchOf(int hostx,int hosty,int hostz){ + private MTEHatchMaintenance getHatchOf(int hostx,int hosty,int hostz){ TileEntity te= theWorld.getTileEntity(hostx,hosty,hostz); if(te instanceof BaseMetaTileEntity){ IMetaTileEntity mte= ((BaseMetaTileEntity) te).getMetaTileEntity(); - if(mte instanceof GT_MetaTileEntity_MultiBlockBase){ - GT_MetaTileEntity_MultiBlockBase mb=(GT_MetaTileEntity_MultiBlockBase) mte; - Iterator itr = mb.mMaintenanceHatches.iterator(); + if(mte instanceof MTEMultiBlockBase){ + MTEMultiBlockBase mb=(MTEMultiBlockBase) mte; + Iterator itr = mb.mMaintenanceHatches.iterator(); if(itr.hasNext()){ return itr.next(); @@ -94,12 +94,12 @@ private GT_MetaTileEntity_Hatch_Maintenance getHatchOf(int hostx,int hosty,int h return null; } - private GT_MetaTileEntity_Hatch_Maintenance getHatch(int xx,int yy,int zz){ + private MTEHatchMaintenance getHatch(int xx,int yy,int zz){ TileEntity te= theWorld.getTileEntity(xx,yy,zz); if(te instanceof BaseMetaTileEntity){ IMetaTileEntity mte= ((BaseMetaTileEntity) te).getMetaTileEntity(); - if(mte instanceof GT_MetaTileEntity_Hatch_Maintenance){ - return (GT_MetaTileEntity_Hatch_Maintenance) mte; + if(mte instanceof MTEHatchMaintenance){ + return (MTEHatchMaintenance) mte; }} return null; @@ -108,8 +108,8 @@ private boolean needFix(int hostx,int hosty,int hostz){ TileEntity te= theWorld.getTileEntity(hostx,hosty,hostz); if(te instanceof BaseMetaTileEntity){ IMetaTileEntity mte= ((BaseMetaTileEntity) te).getMetaTileEntity(); - if(mte instanceof GT_MetaTileEntity_MultiBlockBase){ - GT_MetaTileEntity_MultiBlockBase mb=(GT_MetaTileEntity_MultiBlockBase) mte; + if(mte instanceof MTEMultiBlockBase){ + MTEMultiBlockBase mb=(MTEMultiBlockBase) mte; if ( mb.mMachine&& @@ -142,7 +142,7 @@ private boolean findHatch() { ){continue;} if(needFix(x,y,z)) { - GT_MetaTileEntity_Hatch_Maintenance hatch = getHatchOf(x,y,z); + MTEHatchMaintenance hatch = getHatchOf(x,y,z); if(hatch==null){return false;} IGregTechTileEntity bs = hatch.getBaseMetaTileEntity(); xx=bs.getXCoord(); @@ -164,7 +164,7 @@ public void updateTask() { double dist = this.theGolem.getDistanceSq((double)this.xx + 0.5D, (double)this.yy + 0.5D, (double)this.zz + 0.5D); this.theGolem.getLookHelper().setLookPosition((double)this.xx + 0.5D, (double)this.yy + 0.5D, (double)this.zz + 0.5D, 30.0F, 30.0F); if(dist <= 4.0D) { - GT_MetaTileEntity_Hatch_Maintenance hatch = getHatch(xx,yy,zz); + MTEHatchMaintenance hatch = getHatch(xx,yy,zz); if(hatch==null){ System.out.println(xx+" "+yy+" "+zz); working=false;return; diff --git a/src/main/java/reobf/proghatches/util/IIconTexture.java b/src/main/java/reobf/proghatches/util/IIconTexture.java index 3b74d13..102e25d 100644 --- a/src/main/java/reobf/proghatches/util/IIconTexture.java +++ b/src/main/java/reobf/proghatches/util/IIconTexture.java @@ -7,9 +7,10 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.util.LightingHelper; -import gregtech.common.render.GT_TextureBase; +import gregtech.common.render.GTTextureBase; -public class IIconTexture extends GT_TextureBase implements ITexture { + +public class IIconTexture extends GTTextureBase implements ITexture { private final IIcon mBlock; // private final byte mSide, mMeta; diff --git a/src/main/java/reobf/proghatches/util/ProghatchesUtil.java b/src/main/java/reobf/proghatches/util/ProghatchesUtil.java index b3b6938..0eb909a 100644 --- a/src/main/java/reobf/proghatches/util/ProghatchesUtil.java +++ b/src/main/java/reobf/proghatches/util/ProghatchesUtil.java @@ -1,6 +1,6 @@ package reobf.proghatches.util; -import static gregtech.api.util.GT_Utility.*; +import static gregtech.api.util.GTUtility.*; import java.io.IOException; import java.lang.reflect.InvocationTargetException; @@ -40,21 +40,24 @@ import net.minecraft.network.PacketBuffer; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; import reobf.proghatches.gt.metatileentity.SuperChestME; import reobf.proghatches.main.MyMod; -import gregtech.api.GregTech_API; +import gregtech.api.GregTechAPI; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.util.GT_Log; -import gregtech.api.util.GT_Utility; -import gregtech.common.covers.redstone.GT_Cover_AdvancedRedstoneReceiverBase; + +import gregtech.api.util.GTUtility; +import gregtech.common.covers.redstone.CoverAdvancedRedstoneReceiverBase; + /* - * copied from GT_Cover_AdvancedRedstoneTransmitterBase and GT_Cover_AdvancedRedstoneReceiverBase + * copied from GT_Cover_AdvancedRedstoneTransmitterBase and CoverAdvancedRedstoneReceiverBase */ public class ProghatchesUtil { public static void removeAllSignalAt(UUID uuid, long hash) { - Map> frequencies = GregTech_API.sAdvancedWirelessRedstone.get(String.valueOf(uuid)); + Map> frequencies = GregTechAPI.sAdvancedWirelessRedstone.get(String.valueOf(uuid)); if (frequencies == null) return; frequencies.keySet().forEach(frequency -> @@ -67,7 +70,7 @@ public static void removeAllSignalAt(UUID uuid, long hash) { } public static void removeSignalAt(UUID uuid, int frequency, long hash) { - Map> frequencies = GregTech_API.sAdvancedWirelessRedstone.get(String.valueOf(uuid)); + Map> frequencies = GregTechAPI.sAdvancedWirelessRedstone.get(String.valueOf(uuid)); if (frequencies == null) return; frequencies.computeIfPresent(frequency, (freq, longByteMap) -> { @@ -77,19 +80,19 @@ public static void removeSignalAt(UUID uuid, int frequency, long hash) { } public static void setSignalAt(UUID uuid, int frequency, long hash, byte value) { - Map> frequencies = GregTech_API.sAdvancedWirelessRedstone + Map> frequencies = GregTechAPI.sAdvancedWirelessRedstone .computeIfAbsent(String.valueOf(uuid), k -> new ConcurrentHashMap<>()); Map signals = frequencies.computeIfAbsent(frequency, k -> new ConcurrentHashMap<>()); signals.put(hash, value); } - public static Byte getSignalAt(UUID uuid, int frequency, GT_Cover_AdvancedRedstoneReceiverBase.GateMode mode) { + public static Byte getSignalAt(UUID uuid, int frequency, CoverAdvancedRedstoneReceiverBase.GateMode mode) { return getSignalAt(uuid, frequency, mode, true); } - public static Byte getSignalAt(UUID uuid, int frequency, GT_Cover_AdvancedRedstoneReceiverBase.GateMode mode, + public static Byte getSignalAt(UUID uuid, int frequency, CoverAdvancedRedstoneReceiverBase.GateMode mode, boolean missingAsFalse) { - Map> frequencies = GregTech_API.sAdvancedWirelessRedstone.get(String.valueOf(uuid)); + Map> frequencies = GregTechAPI.sAdvancedWirelessRedstone.get(String.valueOf(uuid)); Map signals; if (frequencies == null) { if (missingAsFalse) @@ -140,7 +143,7 @@ public static int moveFromSlotToSlotSafe(IInventory fromInv, IInventory toInv, i return 0; } - return GT_Utility.moveFromSlotToSlot(fromInv, toInv, aGrabFrom, aPutTo, aFilter, aInvertFilter, + return GTUtility.moveFromSlotToSlot(fromInv, toInv, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce); } @@ -148,7 +151,7 @@ public static int moveFromSlotToSlotSafe(IInventory fromInv, IInventory toInv, i public static ItemStack getWrittenBook(Item it, String aMapping, String aTitle, String aAuthor, String... aPages) { if (isStringInvalid(aMapping)) return null; - ItemStack rStack = null;// GregTech_API.sBookList.get(aMapping); + ItemStack rStack = null;// GregTechAPI.sBookList.get(aMapping); if (rStack != null) return copyAmount(1, rStack); if (isStringInvalid(aTitle) || isStringInvalid(aAuthor) || aPages.length == 0) @@ -295,4 +298,6 @@ public static void handleUse(EntityPlayer player, TileEntity tile, IPriorityHost } } + + } diff --git a/src/main/resources/assets/proghatches/lang/en_US.lang b/src/main/resources/assets/proghatches/lang/en_US.lang index 9e55276..cbfb316 100644 --- a/src/main/resources/assets/proghatches/lang/en_US.lang +++ b/src/main/resources/assets/proghatches/lang/en_US.lang @@ -702,3 +702,14 @@ item.proghatch.cover.dedicated.tooltips.94.0=Record 64 types of item to write ci programmable_hatches.gt.merge.0=Merge buffers locking same recipe and multiblock will see one single buffer. programmable_hatches.gt.merge.1=Might cause some problems if sum of some material hits 2.1G? proghatch.submitter.tooltip.0=Use Redstone Comparator to get the index of currently submitted pattern. +programmable_hatches.gt.elasticbuffer.0=Infinity Buffer Mode +programmable_hatches.gt.elasticbuffer.1=Append an extra Buffer to accept input if no other Buffers can. +programmable_hatches.gt.elasticbuffer.2=Those extra Buffers are not viewable and will be removed if empty. +programmable_hatches.gt.elasticbuffer.3=Will be merged to an empty regular Buffer if possible. +programmable_hatches.gt.elasticbuffer.4=This option is only available on some hatch. +item.proghatch.upgrades.tooltips.3=3 +item.proghatch.upgrades.tooltips.3.0=Right click a Dual Input Hatch to install. +item.proghatch.upgrades.tooltips.3.1=Unlock Infinity Buffer Mode, for non-ME hatches. +item.proghatch.upgrades.tooltips.3.2=Harvest the Hatch to retrieve installed Upgrades. +item.proghatch.upgrades.3=Infinity Buffer Upgrade +proghatch.gui.button.power_switch.ex=§cShift-Click to open experimental option panel. diff --git a/src/main/resources/assets/proghatches/lang/zh_CN.lang b/src/main/resources/assets/proghatches/lang/zh_CN.lang index c59eb87..63bed30 100644 --- a/src/main/resources/assets/proghatches/lang/zh_CN.lang +++ b/src/main/resources/assets/proghatches/lang/zh_CN.lang @@ -700,3 +700,14 @@ item.proghatch.cover.dedicated.tooltips.94.0=记录64种物品 以便在机器GU programmable_hatches.gt.merge.0=合并锁定同一配方的缓存,向多方块显示为单个缓存 programmable_hatches.gt.merge.1=单种材料超过2.1G可能会有问题? proghatch.submitter.tooltip.0=使用红石比较器获取当前提交的样板序号 +programmable_hatches.gt.elasticbuffer.0=无尽缓冲模式 +programmable_hatches.gt.elasticbuffer.1=其它缓冲区填满时临时增加额外缓冲区 +programmable_hatches.gt.elasticbuffer.2=额外缓冲区为空时会被移除,也无法在GUI浏览 +programmable_hatches.gt.elasticbuffer.3=如果常规缓冲区有空位,额外缓冲区内容物会被转移进去 +programmable_hatches.gt.elasticbuffer.4=这个选项仅在ME仓室可用,或者安装升级解锁 +item.proghatch.upgrades.tooltips.3=3 +item.proghatch.upgrades.tooltips.3.0=右键一个二合一输入仓以安装升级 +item.proghatch.upgrades.tooltips.3.1=为非ME仓解锁无尽缓冲模式 +item.proghatch.upgrades.tooltips.3.2=拆卸输入仓回收已安装的升级 +item.proghatch.upgrades.3=无尽缓冲升级 +proghatch.gui.button.power_switch.ex=§cShift点击打开实验性功能选项窗口 diff --git a/src/main/resources/assets/proghatches/textures/items/upgrade3.png b/src/main/resources/assets/proghatches/textures/items/upgrade3.png new file mode 100644 index 0000000..788a01d Binary files /dev/null and b/src/main/resources/assets/proghatches/textures/items/upgrade3.png differ