aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Robertz <dream-master@gmx.net>2022-12-14 12:26:42 +0100
committerGitHub <noreply@github.com>2022-12-14 12:26:42 +0100
commit7702ea4cecfdf78e602ff314db1c9fd0fbfd454c (patch)
tree2d1da082e7a283d920ff017fca80fd46a1df23bd
parented3b559004eef56cadc4382b1db2504c2fdf83a3 (diff)
parent12bfafdc2f2de09bdcbf31cf27c4809e2bd84b3b (diff)
downloadGT5-Unofficial-7702ea4cecfdf78e602ff314db1c9fd0fbfd454c.tar.gz
GT5-Unofficial-7702ea4cecfdf78e602ff314db1c9fd0fbfd454c.tar.bz2
GT5-Unofficial-7702ea4cecfdf78e602ff314db1c9fd0fbfd454c.zip
Merge pull request #49 from GTNewHorizons/feature/modular-ui
Migrate to ModularUI
-rw-r--r--build.gradle68
-rw-r--r--dependencies.gradle6
-rw-r--r--src/main/java/client/gui/GUIContainer_ModularNuclearReactor.java40
-rw-r--r--src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java7
-rw-r--r--src/main/java/common/tileentities/GTMTE_ModularNuclearReactor.java9
-rw-r--r--src/main/java/common/tileentities/GTMTE_SOFuelCellMK1.java7
-rw-r--r--src/main/java/common/tileentities/GTMTE_SOFuelCellMK2.java7
-rw-r--r--src/main/java/common/tileentities/GTMTE_SpaceElevator.java7
-rw-r--r--src/main/resources/assets/kekztech/textures/gui/MultiblockDisplay_REACTOR.pngbin2125 -> 0 bytes
-rw-r--r--src/main/resources/assets/kekztech/textures/gui/ReaktorGUI_background.pngbin30399 -> 0 bytes
10 files changed, 37 insertions, 114 deletions
diff --git a/build.gradle b/build.gradle
index 504a179750..89350b8a35 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,4 +1,4 @@
-//version: 1667597057
+//version: 1669411416
/*
DO NOT CHANGE THIS FILE!
Also, you may replace this file at any time if there is an update available.
@@ -234,9 +234,9 @@ try {
}
catch (Exception ignored) {
out.style(Style.Failure).text(
- 'This mod must be version controlled by Git AND the repository must provide at least one tag,\n' +
- 'or the VERSION override must be set! ').style(Style.SuccessHeader).text('(Do NOT download from GitHub using the ZIP option, instead\n' +
- 'clone the repository, see ').style(Style.Info).text('https://gtnh.miraheze.org/wiki/Development').style(Style.SuccessHeader).println(' for details.)'
+ 'This mod must be version controlled by Git AND the repository must provide at least one tag,\n' +
+ 'or the VERSION override must be set! ').style(Style.SuccessHeader).text('(Do NOT download from GitHub using the ZIP option, instead\n' +
+ 'clone the repository, see ').style(Style.Info).text('https://gtnh.miraheze.org/wiki/Development').style(Style.SuccessHeader).println(' for details.)'
)
versionOverride = 'NO-GIT-TAG-SET'
identifiedVersion = versionOverride
@@ -262,13 +262,13 @@ def jvmArguments = []
if (usesMixins.toBoolean() || forceEnableMixins.toBoolean()) {
arguments += [
- "--tweakClass org.spongepowered.asm.launch.MixinTweaker"
+ "--tweakClass org.spongepowered.asm.launch.MixinTweaker"
]
if (usesMixinDebug.toBoolean()) {
jvmArguments += [
- "-Dmixin.debug.countInjections=true",
- "-Dmixin.debug.verbose=true",
- "-Dmixin.debug.export=true"
+ "-Dmixin.debug.countInjections=true",
+ "-Dmixin.debug.verbose=true",
+ "-Dmixin.debug.export=true"
]
}
}
@@ -338,10 +338,10 @@ dependencies {
annotationProcessor('org.ow2.asm:asm-debug-all:5.0.3')
annotationProcessor('com.google.guava:guava:24.1.1-jre')
annotationProcessor('com.google.code.gson:gson:2.8.6')
- annotationProcessor('org.spongepowered:mixin:0.8.5-GTNH:processor')
+ annotationProcessor('com.gtnewhorizon:gtnhmixins:2.1.1:processor')
}
if (usesMixins.toBoolean() || forceEnableMixins.toBoolean()) {
- compile('com.gtnewhorizon:gtnhmixins:2.0.1')
+ compile('com.gtnewhorizon:gtnhmixins:2.1.1')
}
}
@@ -395,8 +395,8 @@ shadowJar {
minimize() // This will only allow shading for actually used classes
configurations = [
- project.configurations.shadowImplementation,
- project.configurations.shadowCompile
+ project.configurations.shadowImplementation,
+ project.configurations.shadowCompile
]
dependsOn(relocateShadowJar)
}
@@ -428,12 +428,12 @@ afterEvaluate {
if (usesMixins.toBoolean()) {
tasks.compileJava {
options.compilerArgs += [
- "-AreobfSrgFile=${tasks.reobf.srg}",
- "-AoutSrgFile=${mixinSrg}",
- "-AoutRefMapFile=${refMap}",
- // Elan: from what I understand they are just some linter configs so you get some warning on how to properly code
- "-XDenableSunApiLintControl",
- "-XDignore.symbol.file"
+ "-AreobfSrgFile=${tasks.reobf.srg}",
+ "-AoutSrgFile=${mixinSrg}",
+ "-AoutRefMapFile=${refMap}",
+ // Elan: from what I understand they are just some linter configs so you get some warning on how to properly code
+ "-XDenableSunApiLintControl",
+ "-XDignore.symbol.file"
]
}
}
@@ -442,8 +442,8 @@ afterEvaluate {
runClient {
if (developmentEnvironmentUserName) {
arguments += [
- "--username",
- developmentEnvironmentUserName
+ "--username",
+ developmentEnvironmentUserName
]
}
@@ -458,9 +458,9 @@ runServer {
tasks.withType(JavaExec).configureEach {
javaLauncher.set(
- javaToolchains.launcherFor {
- languageVersion = projectJavaVersion
- }
+ javaToolchains.launcherFor {
+ languageVersion = projectJavaVersion
+ }
)
}
@@ -476,9 +476,9 @@ processResources {
// replace modVersion and minecraftVersion
expand "minecraftVersion": project.minecraft.version,
- "modVersion": modVersion,
- "modId": modId,
- "modName": modName
+ "modVersion": modVersion,
+ "modId": modId,
+ "modName": modName
}
if (usesMixins.toBoolean()) {
@@ -508,9 +508,9 @@ def getManifestAttributes() {
if (usesMixins.toBoolean()) {
manifestAttributes += [
- "TweakClass" : "org.spongepowered.asm.launch.MixinTweaker",
- "MixinConfigs" : "mixins." + modId + ".json",
- "ForceLoadAsMod": !containsMixinsAndOrCoreModOnly.toBoolean()
+ "TweakClass" : "org.spongepowered.asm.launch.MixinTweaker",
+ "MixinConfigs" : "mixins." + modId + ".json",
+ "ForceLoadAsMod": !containsMixinsAndOrCoreModOnly.toBoolean()
]
}
return manifestAttributes
@@ -538,8 +538,8 @@ task shadowDevJar(type: ShadowJar) {
minimize() // This will only allow shading for actually used classes
configurations = [
- project.configurations.shadowImplementation,
- project.configurations.shadowCompile
+ project.configurations.shadowImplementation,
+ project.configurations.shadowCompile
]
}
@@ -633,8 +633,8 @@ publishing {
pom.withXml {
def badArtifacts = [:].withDefault { [] as Set<String> }
for (configuration in [
- projectConfigs.minecraft,
- projectConfigs.minecraftDeps
+ projectConfigs.minecraft,
+ projectConfigs.minecraftDeps
]) {
for (dependency in configuration.allDependencies) {
badArtifacts[dependency.group == null ? "" : dependency.group] += dependency.name
@@ -1100,4 +1100,4 @@ def getSecondaryArtifacts() {
if (!noPublishedSources) secondaryArtifacts += [sourcesJar]
if (apiPackage) secondaryArtifacts += [apiJar]
return secondaryArtifacts
-} \ No newline at end of file
+}
diff --git a/dependencies.gradle b/dependencies.gradle
index e92b38489a..511a159cfa 100644
--- a/dependencies.gradle
+++ b/dependencies.gradle
@@ -1,9 +1,9 @@
// Add your dependencies here
dependencies {
- compile 'com.github.GTNewHorizons:GT5-Unofficial:5.09.41.68:dev'
- compile 'com.github.GTNewHorizons:TecTech:5.0.42:dev'
- compile 'com.github.GTNewHorizons:bartworks:0.5.89:dev'
+ compile 'com.github.GTNewHorizons:GT5-Unofficial:5.09.41.158:dev'
+ compile 'com.github.GTNewHorizons:TecTech:5.0.52:dev'
+ compile 'com.github.GTNewHorizons:bartworks:0.5.119:dev'
compile 'com.github.GTNewHorizons:StructureLib:1.1.12:dev'
compile 'com.github.GTNewHorizons:ThaumicTinkerer:2.6.4:dev'
diff --git a/src/main/java/client/gui/GUIContainer_ModularNuclearReactor.java b/src/main/java/client/gui/GUIContainer_ModularNuclearReactor.java
deleted file mode 100644
index eabbb26ff1..0000000000
--- a/src/main/java/client/gui/GUIContainer_ModularNuclearReactor.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package client.gui;
-
-import common.container.Container_ModularNuclearReactor;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import kekztech.KekzCore;
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.gui.inventory.GuiContainer;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.util.ResourceLocation;
-import org.lwjgl.opengl.GL11;
-
-public class GUIContainer_ModularNuclearReactor extends GuiContainer {
-
- private ResourceLocation texture =
- new ResourceLocation(KekzCore.MODID, "textures/gui/MultiblockDisplay_REACTOR.png");
-
- private InventoryPlayer inventory;
- private IGregTechTileEntity te;
-
- public GUIContainer_ModularNuclearReactor(IGregTechTileEntity te, EntityPlayer player) {
- super(new Container_ModularNuclearReactor(te, player));
- inventory = player.inventory;
- this.te = te;
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
- Minecraft.getMinecraft().renderEngine.bindTexture(texture);
-
- GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
-
- final int x = (super.width - super.xSize) / 2;
- final int y = (super.height - super.ySize) / 2;
- super.drawTexturedModalRect(x, y, 0, 0, super.xSize, super.ySize);
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(int par1, int par2) {}
-}
diff --git a/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java b/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java
index a989cc3886..f492d3c643 100644
--- a/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java
+++ b/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java
@@ -28,7 +28,6 @@ import common.Blocks;
import gregtech.api.enums.Dyes;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Textures.BlockIcons;
-import gregtech.api.gui.GT_GUIContainer_MultiMachine;
import gregtech.api.interfaces.IGlobalWirelessEnergy;
import gregtech.api.interfaces.IHatchElement;
import gregtech.api.interfaces.ITexture;
@@ -46,7 +45,6 @@ import java.util.function.Consumer;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
@@ -473,11 +471,6 @@ public class GTMTE_LapotronicSuperCapacitor
return sTexture;
}
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_GUIContainer_MultiMachine(
- aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "MultiblockDisplay.png");
- }
-
private String global_energy_user_uuid;
@Override
diff --git a/src/main/java/common/tileentities/GTMTE_ModularNuclearReactor.java b/src/main/java/common/tileentities/GTMTE_ModularNuclearReactor.java
index 67aaf2a0f9..ee9c0550b0 100644
--- a/src/main/java/common/tileentities/GTMTE_ModularNuclearReactor.java
+++ b/src/main/java/common/tileentities/GTMTE_ModularNuclearReactor.java
@@ -1,6 +1,5 @@
package common.tileentities;
-import client.gui.GUIContainer_ModularNuclearReactor;
import common.Blocks;
import gregtech.api.GregTech_API;
import gregtech.api.enums.Textures;
@@ -10,7 +9,6 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
import gregtech.api.objects.GT_RenderedTexture;
import net.minecraft.block.Block;
-import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.ForgeDirection;
import org.joml.Vector3i;
@@ -94,13 +92,6 @@ public class GTMTE_ModularNuclearReactor extends GT_MetaTileEntity_MultiBlockBas
: new ITexture[] {Textures.BlockIcons.getCasingTextureForId(CASING_TEXTURE_ID)};
}
- // TODO: Opening UI crashes server. Controller isn't craftable right now.
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- /*return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(),
- "MultiblockDisplay.png");*/
- return new GUIContainer_ModularNuclearReactor(aBaseMetaTileEntity, aPlayerInventory.player);
- }
-
@Override
public boolean isCorrectMachinePart(ItemStack stack) {
return true;
diff --git a/src/main/java/common/tileentities/GTMTE_SOFuelCellMK1.java b/src/main/java/common/tileentities/GTMTE_SOFuelCellMK1.java
index 1909b5ef27..11e941584f 100644
--- a/src/main/java/common/tileentities/GTMTE_SOFuelCellMK1.java
+++ b/src/main/java/common/tileentities/GTMTE_SOFuelCellMK1.java
@@ -10,7 +10,6 @@ import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.GregTech_API;
import gregtech.api.enums.Materials;
import gregtech.api.enums.Textures;
-import gregtech.api.gui.GT_GUIContainer_MultiMachine;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
@@ -24,7 +23,6 @@ import gregtech.api.util.GT_Utility;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
-import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
@@ -139,11 +137,6 @@ public class GTMTE_SOFuelCellMK1 extends GT_MetaTileEntity_EnhancedMultiBlockBas
return new ITexture[] {Textures.BlockIcons.getCasingTextureForId(CASING_TEXTURE_ID)};
}
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_GUIContainer_MultiMachine(
- aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "MultiblockDisplay.png");
- }
-
@Override
public boolean isCorrectMachinePart(ItemStack stack) {
return true;
diff --git a/src/main/java/common/tileentities/GTMTE_SOFuelCellMK2.java b/src/main/java/common/tileentities/GTMTE_SOFuelCellMK2.java
index 4438c0add1..a7b806add9 100644
--- a/src/main/java/common/tileentities/GTMTE_SOFuelCellMK2.java
+++ b/src/main/java/common/tileentities/GTMTE_SOFuelCellMK2.java
@@ -12,7 +12,6 @@ import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.GregTech_API;
import gregtech.api.enums.Materials;
import gregtech.api.enums.Textures;
-import gregtech.api.gui.GT_GUIContainer_MultiMachine;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
@@ -25,7 +24,6 @@ import gregtech.api.util.GT_Utility;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
-import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
@@ -142,11 +140,6 @@ public class GTMTE_SOFuelCellMK2 extends GT_MetaTileEntity_EnhancedMultiBlockBas
return new ITexture[] {Textures.BlockIcons.getCasingTextureForId(CASING_TEXTURE_ID)};
}
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_GUIContainer_MultiMachine(
- aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "MultiblockDisplay.png");
- }
-
@Override
public boolean isCorrectMachinePart(ItemStack stack) {
return true;
diff --git a/src/main/java/common/tileentities/GTMTE_SpaceElevator.java b/src/main/java/common/tileentities/GTMTE_SpaceElevator.java
index cabf4552d6..097c16af59 100644
--- a/src/main/java/common/tileentities/GTMTE_SpaceElevator.java
+++ b/src/main/java/common/tileentities/GTMTE_SpaceElevator.java
@@ -3,7 +3,6 @@ package common.tileentities;
import common.Blocks;
import gregtech.api.enums.Dyes;
import gregtech.api.enums.Textures;
-import gregtech.api.gui.GT_GUIContainer_MultiMachine;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
@@ -12,7 +11,6 @@ import gregtech.api.objects.GT_RenderedTexture;
import java.util.ArrayList;
import java.util.HashSet;
import net.minecraft.block.Block;
-import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumChatFormatting;
@@ -103,11 +101,6 @@ public class GTMTE_SpaceElevator extends GT_MetaTileEntity_MultiBlockBase {
return sTexture;
}
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_GUIContainer_MultiMachine(
- aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "MultiblockDisplay.png");
- }
-
@Override
public boolean isCorrectMachinePart(ItemStack stack) {
return true;
diff --git a/src/main/resources/assets/kekztech/textures/gui/MultiblockDisplay_REACTOR.png b/src/main/resources/assets/kekztech/textures/gui/MultiblockDisplay_REACTOR.png
deleted file mode 100644
index aff9248d4a..0000000000
--- a/src/main/resources/assets/kekztech/textures/gui/MultiblockDisplay_REACTOR.png
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/assets/kekztech/textures/gui/ReaktorGUI_background.png b/src/main/resources/assets/kekztech/textures/gui/ReaktorGUI_background.png
deleted file mode 100644
index 7c87a7de7d..0000000000
--- a/src/main/resources/assets/kekztech/textures/gui/ReaktorGUI_background.png
+++ /dev/null
Binary files differ