diff options
63 files changed, 2430 insertions, 575 deletions
diff --git a/.github/workflows/release-tags.yml b/.github/workflows/release-tags.yml index 25c354b227..c86d8889b7 100644 --- a/.github/workflows/release-tags.yml +++ b/.github/workflows/release-tags.yml @@ -43,3 +43,9 @@ jobs: prerelease: false title: "${{ env.RELEASE_VERSION }}" files: build/libs/*.jar + + - name: Publish to Maven + run: ./gradlew publish + env: + MAVEN_USER: ${{ secrets.MAVEN_USER }} + MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} diff --git a/.gitignore b/.gitignore index ba4022fb72..860dfaf823 100644 --- a/.gitignore +++ b/.gitignore @@ -26,6 +26,7 @@ whitelist.json *.ipr *.iws src/main/resources/mixins.*.json +*.bat asm /screenshots /world diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000000..a6b5f68cd0 --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1,3 @@ +# Any Github changes require admin approval +/.github/** @GTNewHorizons/admin + diff --git a/build.gradle b/build.gradle index e466de0fd5..b647108772 100644 --- a/build.gradle +++ b/build.gradle @@ -1,9 +1,9 @@ -//version: 1641429628 +//version: 1642484596 /* DO NOT CHANGE THIS FILE! Also, you may replace this file at any time if there is an update available. -Please check https://github.com/SinTh0r4s/ExampleMod1.7.10/blob/main/build.gradle for updates. +Please check https://github.com/GTNewHorizons/ExampleMod1.7.10/blob/main/build.gradle for updates. */ @@ -88,6 +88,7 @@ checkPropertyExists("containsMixinsAndOrCoreModOnly") checkPropertyExists("usesShadowedDependencies") checkPropertyExists("developmentEnvironmentUserName") +boolean noPublishedSources = project.findProperty("noPublishedSources") ? project.noPublishedSources.toBoolean() : false String javaSourceDir = "src/main/java/" String scalaSourceDir = "src/main/scala/" @@ -151,12 +152,16 @@ configurations.all { // Fix Jenkins' Git: chmod a file should not be detected as a change and append a '.dirty' to the version 'git config core.fileMode false'.execute() -// Pulls version from git tag + +// Pulls version first from the VERSION env and then git tag +String identifiedVersion try { - version = minecraftVersion + "-" + gitVersion() + String versionOverride = System.getenv("VERSION") ?: null + identifiedVersion = versionOverride == null ? gitVersion() : versionOverride + version = minecraftVersion + "-" + identifiedVersion } catch (Exception e) { - throw new IllegalStateException("This mod must be version controlled by Git AND the repository must provide at least one tag!"); + throw new IllegalStateException("This mod must be version controlled by Git AND the repository must provide at least one tag, or the VERSION override must be set!"); } group = modGroup @@ -223,7 +228,7 @@ dependencies { annotationProcessor("com.google.code.gson:gson:2.8.6") annotationProcessor("org.spongepowered:mixin:0.8-SNAPSHOT") // using 0.8 to workaround a issue in 0.7 which fails mixin application - compile("org.spongepowered:mixin:0.7.11-SNAPSHOT") { + compile("com.github.GTNewHorizons:SpongePoweredMixin:0.7.12-GTNH") { // Mixin includes a lot of dependencies that are too up-to-date exclude module: "launchwrapper" exclude module: "guava" @@ -231,7 +236,7 @@ dependencies { exclude module: "commons-io" exclude module: "log4j-core" } - compile("com.github.GTNewHorizons:SpongeMixins:1.3.3:dev") + compile("com.github.GTNewHorizons:SpongeMixins:1.5.0") } } @@ -480,7 +485,9 @@ task apiJar(type: Jar) { } artifacts { - archives sourcesJar + if(!noPublishedSources) { + archives sourcesJar + } archives devJar if(apiPackage) { archives apiJar @@ -491,29 +498,28 @@ artifacts { publishing { publications { maven(MavenPublication) { - artifact source: jar - artifact source: sourcesJar, classifier: "src" - artifact source: devJar, classifier: "dev" + artifact source: usesShadowedDependencies.toBoolean() ? shadowJar : jar, classifier: "" + if(!noPublishedSources) { + artifact source: sourcesJar, classifier: "src" + } + artifact source: usesShadowedDependencies.toBoolean() ? shadowDevJar : devJar, classifier: "dev" if (apiPackage) { artifact source: apiJar, classifier: "api" } - groupId = System.getenv("ARTIFACT_GROUP_ID") ?: group + groupId = System.getenv("ARTIFACT_GROUP_ID") ?: "com.github.GTNewHorizons" artifactId = System.getenv("ARTIFACT_ID") ?: project.name - version = System.getenv("ARTIFACT_VERSION") ?: project.version + // Using the identified version, not project.version as it has the prepended 1.7.10 + version = System.getenv("RELEASE_VERSION") ?: identifiedVersion } } - + repositories { maven { - String owner = System.getenv("REPOSITORY_OWNER") ?: "Unknown" - String repositoryName = System.getenv("REPOSITORY_NAME") ?: "Unknown" - String githubRepositoryUrl = "https://maven.pkg.github.com/$owner/$repositoryName" - name = "GitHubPackages" - url = githubRepositoryUrl + url = "http://jenkins.usrv.eu:8081/nexus/content/repositories/releases" credentials { - username = System.getenv("GITHUB_ACTOR") ?: "NONE" - password = System.getenv("GITHUB_TOKEN") ?: "NONE" + username = System.getenv("MAVEN_USER") ?: "NONE" + password = System.getenv("MAVEN_PASSWORD") ?: "NONE" } } } @@ -537,7 +543,7 @@ if (isNewBuildScriptVersionAvailable(projectDir.toString())) { } static URL availableBuildScriptUrl() { - new URL("https://raw.githubusercontent.com/SinTh0r4s/ExampleMod1.7.10/main/build.gradle") + new URL("https://raw.githubusercontent.com/GTNewHorizons/ExampleMod1.7.10/main/build.gradle") } boolean performBuildScriptUpdate(String projectDir) { @@ -579,7 +585,7 @@ configure(updateBuildScript) { def checkPropertyExists(String propertyName) { if (project.hasProperty(propertyName) == false) { - throw new GradleException("This project requires a property \"" + propertyName + "\"! Please add it your \"gradle.properties\". You can find all properties and their description here: https://github.com/SinTh0r4s/ExampleMod1.7.10/blob/main/gradle.properties") + throw new GradleException("This project requires a property \"" + propertyName + "\"! Please add it your \"gradle.properties\". You can find all properties and their description here: https://github.com/GTNewHorizons/ExampleMod1.7.10/blob/main/gradle.properties") } } diff --git a/dependencies.gradle b/dependencies.gradle index d961dac3ac..8643003184 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -1,42 +1,38 @@ // Add your dependencies here dependencies { - compile("com.github.GTNewHorizons:GT5-Unofficial:master-SNAPSHOT:dev") - /*compileOnly("com.github.GTNewHorizons:StructureLib:master-SNAPSHOT:dev") { // Transitive from GT5-Unofficial + compile("com.github.GTNewHorizons:GT5-Unofficial:5.09.40.18:dev") + compile("com.github.GTNewHorizons:StructureLib:1.0.14:dev") + compileOnly("com.github.GTNewHorizons:NotEnoughItems:2.1.22-GTNH:dev") { transitive = false } - compileOnly("com.github.GTNewHorizons:NotEnoughItems:master-SNAPSHOT:dev") { // Transitive from GT5-Unofficial + compileOnly("com.github.GTNewHorizons:CodeChickenLib:1.1.5.1:dev") { transitive = false } - compileOnly("com.github.GTNewHorizons:CodeChickenLib:master-SNAPSHOT:dev") { // Transitive from GT5-Unofficial - transitive = false - } - compileOnly("net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev") { // Transitive from GT5-Unofficial - transitive = false - }*/ + compile("net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev") compile("curse.maven:cofh-core-69162:2388751") compile("curse.maven:advsolar-362768:2885953") - compileOnly("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:master-SNAPSHOT:dev") { + compileOnly("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-70-GTNH:dev") { transitive = false } - compileOnly("com.github.GTNewHorizons:Baubles:master-SNAPSHOT:dev") { + compileOnly("com.github.GTNewHorizons:Baubles:1.0.1.14:dev") { transitive = false } - compileOnly("com.github.GTNewHorizons:ForestryMC:master-SNAPSHOT:dev") { + compileOnly("com.github.GTNewHorizons:ForestryMC:4.4.4:dev") { transitive = false } - compileOnly("com.github.GTNewHorizons:Railcraft:master-SNAPSHOT:dev") { + compileOnly("com.github.GTNewHorizons:Railcraft:9.13.5:dev") { transitive = false } - compileOnly("com.github.GTNewHorizons:EnderIO:master-SNAPSHOT:dev") { + compileOnly("com.github.GTNewHorizons:EnderIO:2.3.1.27:dev") { transitive = false } - compileOnly("com.github.GTNewHorizons:EnderCore:master-SNAPSHOT:dev") { + compileOnly("com.github.GTNewHorizons:EnderCore:0.2.6:dev") { transitive = false } - compileOnly("com.github.GTNewHorizons:SC2:master-SNAPSHOT:dev") { + compileOnly("com.github.GTNewHorizons:SC2:2.0.1:dev") { transitive = false } @@ -49,4 +45,7 @@ dependencies { compileOnly("thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev") { transitive = false } + compileOnly("com.github.GTNewHorizons:Chisel:2.10.6-GTNH:dev") { + transitive = false + } } diff --git a/repositories.gradle b/repositories.gradle index d88a8fcc74..23d0667ab9 100644 --- a/repositories.gradle +++ b/repositories.gradle @@ -2,6 +2,10 @@ repositories { maven { + name = "GTNH Maven" + url = "http://jenkins.usrv.eu:8081/nexus/content/groups/public/" + } + maven { name = "ic2" url = "http://maven.ic2.player.to/" metadataSources { diff --git a/src/main/java/gtPlusPlus/GTplusplus.java b/src/main/java/gtPlusPlus/GTplusplus.java index 9787a38504..1513a0999c 100644 --- a/src/main/java/gtPlusPlus/GTplusplus.java +++ b/src/main/java/gtPlusPlus/GTplusplus.java @@ -228,6 +228,22 @@ public class GTplusplus implements ActionListener { Logger.INFO( "Finally, we are finished. Have some cripsy bacon as a reward." ); + + // Log free GT++ Meta IDs + if (CORE.DEVENV) { + // 750 - 999 are reserved for Alkalus. + for (int i=750; i<1000;i++) { + if (gregtech.api.GregTech_API.METATILEENTITIES[i] == null) { + Logger.INFO("MetaID "+i+" is free."); + } + } + // 30000 - 31999 are reserved for Alkalus. + for (int i=30000; i<32000;i++) { + if (gregtech.api.GregTech_API.METATILEENTITIES[i] == null) { + Logger.INFO("MetaID "+i+" is free."); + } + } + } } @EventHandler diff --git a/src/main/java/gtPlusPlus/core/block/machine/VolumetricFlaskSetter.java b/src/main/java/gtPlusPlus/core/block/machine/VolumetricFlaskSetter.java index 36ea2af7cc..90f9c1056a 100644 --- a/src/main/java/gtPlusPlus/core/block/machine/VolumetricFlaskSetter.java +++ b/src/main/java/gtPlusPlus/core/block/machine/VolumetricFlaskSetter.java @@ -92,12 +92,7 @@ public class VolumetricFlaskSetter extends BasicTileBlockWithTooltip { @Override public int getRenderBlockPass() { - return 1; - } - - @Override - public boolean isOpaqueCube() { - return false; + return 0; } @Override diff --git a/src/main/java/gtPlusPlus/core/config/ConfigHandler.java b/src/main/java/gtPlusPlus/core/config/ConfigHandler.java index 0e88a20aac..2e1d43bdda 100644 --- a/src/main/java/gtPlusPlus/core/config/ConfigHandler.java +++ b/src/main/java/gtPlusPlus/core/config/ConfigHandler.java @@ -226,6 +226,8 @@ public class ConfigHandler { pollutionPerSecondMultiMassFabricator = config.get("pollution", "pollutionPerSecondMultiMassFabricator", pollutionPerSecondMultiMassFabricator,"pollution rate in gibbl/s for the Matter fabrication CPU").getInt(pollutionPerSecondMultiMassFabricator); pollutionPerSecondMultiRefinery = config.get("pollution", "pollutionPerSecondMultiRefinery", pollutionPerSecondMultiRefinery,"pollution rate in gibbl/s for the Reactor fuel processing plant").getInt(pollutionPerSecondMultiRefinery); //pollutionPerSecondMultiGeneratorArray; + pollutionPerSecondMultiIndustrialRockBreaker = config.get("pollution", "pollutionPerSecondMultiIndustrialRockBreaker", pollutionPerSecondMultiIndustrialRockBreaker,"pollution rate in gibbl/s for the Industrial Rock Breaker").getInt(pollutionPerSecondMultiIndustrialRockBreaker); + pollutionPerSecondMultiIndustrialChisel = config.get("pollution", "pollutionPerSecondMultiIndustrialChisel", pollutionPerSecondMultiIndustrialChisel,"pollution rate in gibbl/s for the Industrial Chisel").getInt(pollutionPerSecondMultiIndustrialChisel); pollutionPerSecondMultiTreeFarm = config.get("pollution", "pollutionPerSecondMultiTreeFarm", pollutionPerSecondMultiTreeFarm,"pollution rate in gibbl/s for the Tree growth simulator").getInt(pollutionPerSecondMultiTreeFarm); pollutionPerSecondMultiFrothFlotationCell = config.get("pollution", "pollutionPerSecondMultiFrothFlotationCell", pollutionPerSecondMultiFrothFlotationCell,"pollution rate in gibbl/s for the Flotation cell regulator").getInt(pollutionPerSecondMultiFrothFlotationCell); pollutionPerSecondMultiAutoCrafter = config.get("pollution", "pollutionPerSecondMultiAutoCrafter", pollutionPerSecondMultiAutoCrafter,"pollution rate in gibbl/s for the Large-Scale auto assembler v1.01").getInt(pollutionPerSecondMultiAutoCrafter); diff --git a/src/main/java/gtPlusPlus/core/container/Container_VolumetricFlaskSetter.java b/src/main/java/gtPlusPlus/core/container/Container_VolumetricFlaskSetter.java index de3106c957..65e84d7272 100644 --- a/src/main/java/gtPlusPlus/core/container/Container_VolumetricFlaskSetter.java +++ b/src/main/java/gtPlusPlus/core/container/Container_VolumetricFlaskSetter.java @@ -4,6 +4,7 @@ import java.util.Iterator; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.block.ModBlocks; import gtPlusPlus.core.inventories.Inventory_VolumetricFlaskSetter; import gtPlusPlus.core.slots.SlotNoInput; @@ -24,8 +25,8 @@ public class Container_VolumetricFlaskSetter extends Container { public final Inventory_VolumetricFlaskSetter inventoryChest; - public short mCustomValue; - private short oCustomValue; + public int mCustomValue; + private int oCustomValue; private int mTimer; @@ -181,5 +182,9 @@ public class Container_VolumetricFlaskSetter extends Container { break; } } + + public void log(String aString) { + Logger.INFO("[Flask-Container] "+aString); + } }
\ No newline at end of file diff --git a/src/main/java/gtPlusPlus/core/gui/machine/GUI_VolumetricFlaskSetter.java b/src/main/java/gtPlusPlus/core/gui/machine/GUI_VolumetricFlaskSetter.java index 0257e51d0c..512f31dd47 100644 --- a/src/main/java/gtPlusPlus/core/gui/machine/GUI_VolumetricFlaskSetter.java +++ b/src/main/java/gtPlusPlus/core/gui/machine/GUI_VolumetricFlaskSetter.java @@ -5,13 +5,13 @@ import org.lwjgl.opengl.GL11; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.container.Container_VolumetricFlaskSetter; import gtPlusPlus.core.gui.widget.GuiValueField; import gtPlusPlus.core.handler.PacketHandler; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.network.packet.Packet_VolumetricFlaskGui; import gtPlusPlus.core.tileentities.general.TileEntityVolumetricFlaskSetter; -import net.minecraft.client.gui.GuiTextField; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.resources.I18n; import net.minecraft.util.ResourceLocation; @@ -19,67 +19,203 @@ import net.minecraft.util.ResourceLocation; @SideOnly(Side.CLIENT) public class GUI_VolumetricFlaskSetter extends GuiContainer { - private GuiTextField mText; + private static final ResourceLocation mGuiTextures = new ResourceLocation( + CORE.MODID, "textures/gui/VolumetricFlaskSetter.png" + ); + private Container_VolumetricFlaskSetter mContainer; private boolean mIsOpen = false; + private GuiValueField mText; private TileEntityVolumetricFlaskSetter mTile; - private Container_VolumetricFlaskSetter mContainer; - private static final ResourceLocation mGuiTextures = new ResourceLocation(CORE.MODID, "textures/gui/VolumetricFlaskSetter.png"); - public GUI_VolumetricFlaskSetter(Container_VolumetricFlaskSetter aContainer){ + public GUI_VolumetricFlaskSetter(Container_VolumetricFlaskSetter aContainer) { super(aContainer); mContainer = aContainer; mTile = mContainer.mTileEntity; } - public void initGui(){ + @Override + protected void drawGuiContainerBackgroundLayer(final float f, final int i, final int j) { + GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); + this.mc.renderEngine.bindTexture(mGuiTextures); + final int x = (this.width - this.xSize) / 2; + final int y = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); + } + + @Override + protected void drawGuiContainerForegroundLayer(final int i, final int j) { + super.drawGuiContainerForegroundLayer(i, j); + this.mText.drawTextBox(); + this.fontRendererObj.drawString( + I18n.format("container.VolumetricFlaskSetter", new Object[0]), 4, 3, 4210752 + ); + int aYVal = 49; |
