mirror of
https://github.com/GTNewHorizons/Postea.git
synced 2026-11-24 05:54:31 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cf0743435e |
No files matched your search
@@ -1,39 +0,0 @@
|
|||||||
# This workflow only meant for the source mod you shouldn't bring it into your own project
|
|
||||||
|
|
||||||
name: Buildscript maintenance
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ master, main ]
|
|
||||||
paths:
|
|
||||||
- build.gradle
|
|
||||||
workflow_dispatch: { }
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
buildscript-maintenance:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
# Avoid running this workflow on forks
|
|
||||||
if: github.repository == 'GTNewHorizons/ExampleMod1.7.10'
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
pull-requests: write
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Ensure build script version is up to date
|
|
||||||
id: update-buildscript
|
|
||||||
run: |
|
|
||||||
new_version="$(date +%s)"
|
|
||||||
sed --in-place "1s!^//version:.*!//version: $new_version!g" build.gradle
|
|
||||||
echo "::set-output name=new_version::$new_version"
|
|
||||||
|
|
||||||
- name: Create Pull Request
|
|
||||||
id: create-pull-request
|
|
||||||
uses: peter-evans/create-pull-request@v4
|
|
||||||
with:
|
|
||||||
add-paths: build.gradle
|
|
||||||
commit-message: '[ci skip] update build script version to ${{ steps.update-buildscript.outputs.new_version }}'
|
|
||||||
branch: buildscript-maintenance
|
|
||||||
title: Update build script version to ${{ steps.update-buildscript.outputs.new_version }}
|
|
||||||
body: This pull request is created by the buildscript-maintenance workflow
|
|
||||||
@@ -1,86 +0,0 @@
|
|||||||
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
|
|
||||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
|
|
||||||
|
|
||||||
name: Release latest starter and migration packages
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ master, main ]
|
|
||||||
tags: [ '*' ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
zip-and-release-packages:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Set release version
|
|
||||||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Prepare release folder
|
|
||||||
run: |
|
|
||||||
mkdir packages
|
|
||||||
|
|
||||||
- name: Zip starter
|
|
||||||
uses: montudor/action-zip@v1
|
|
||||||
with:
|
|
||||||
args: >
|
|
||||||
zip -r packages/starter.zip . \
|
|
||||||
\
|
|
||||||
-x "*.git/*" \
|
|
||||||
\
|
|
||||||
-x ".github/scripts/update_version" \
|
|
||||||
-x ".github/workflows/buildscript-maintenance.yml" \
|
|
||||||
-x ".github/workflows/release-packages.yml" \
|
|
||||||
\
|
|
||||||
-x "*docs/*" \
|
|
||||||
-x "README.md" \
|
|
||||||
-x "LICENSE" \
|
|
||||||
-x "gtnhShared/*" \
|
|
||||||
\
|
|
||||||
-x "packages/" \
|
|
||||||
-x "packages/starter.zip" \
|
|
||||||
-x "packages/migration.zip"
|
|
||||||
|
|
||||||
- name: Zip migration
|
|
||||||
uses: montudor/action-zip@v1
|
|
||||||
with:
|
|
||||||
args: >
|
|
||||||
zip -r packages/migration.zip . \
|
|
||||||
\
|
|
||||||
-x "*.git/*" \
|
|
||||||
\
|
|
||||||
-x ".github/scripts/update_version" \
|
|
||||||
-x ".github/workflows/buildscript-maintenance.yml" \
|
|
||||||
-x ".github/workflows/release-packages.yml" \
|
|
||||||
\
|
|
||||||
-x "*docs/*" \
|
|
||||||
-x "*src/*" \
|
|
||||||
-x "LICENSE" \
|
|
||||||
-x "README.md" \
|
|
||||||
-x "gtnhShared/*" \
|
|
||||||
\
|
|
||||||
-x "packages/" \
|
|
||||||
-x "packages/starter.zip" \
|
|
||||||
-x "packages/migration.zip"
|
|
||||||
|
|
||||||
- name: Update latest tag
|
|
||||||
uses: "marvinpinto/action-automatic-releases@latest"
|
|
||||||
if: ${{ (github.ref == 'master' || github.ref == 'main') }}
|
|
||||||
with:
|
|
||||||
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
|
||||||
automatic_release_tag: "latest-packages"
|
|
||||||
prerelease: true
|
|
||||||
title: "Latest starter and migration packages"
|
|
||||||
files: packages/*
|
|
||||||
|
|
||||||
- name: Release named version
|
|
||||||
if: ${{ !(github.ref == 'master' || github.ref == 'main') }}
|
|
||||||
uses: "marvinpinto/action-automatic-releases@latest"
|
|
||||||
with:
|
|
||||||
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
|
||||||
automatic_release_tag: "${{ env.RELEASE_VERSION }}-packages"
|
|
||||||
prerelease: false
|
|
||||||
title: "${{ env.RELEASE_VERSION }} starter and migration packages"
|
|
||||||
files: packages/*
|
|
||||||
+7
-23
@@ -1,4 +1,4 @@
|
|||||||
//version: 1697697256
|
//version: 1701530445
|
||||||
/*
|
/*
|
||||||
DO NOT CHANGE THIS FILE!
|
DO NOT CHANGE THIS FILE!
|
||||||
Also, you may replace this file at any time if there is an update available.
|
Also, you may replace this file at any time if there is an update available.
|
||||||
@@ -28,27 +28,12 @@ import java.util.concurrent.TimeUnit
|
|||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
|
||||||
|
|
||||||
maven {
|
|
||||||
name 'forge'
|
|
||||||
url 'https://maven.minecraftforge.net'
|
|
||||||
}
|
|
||||||
maven {
|
maven {
|
||||||
// GTNH RetroFuturaGradle and ASM Fork
|
// GTNH RetroFuturaGradle and ASM Fork
|
||||||
name "GTNH Maven"
|
name "GTNH Maven"
|
||||||
url "http://jenkins.usrv.eu:8081/nexus/content/groups/public/"
|
url "http://jenkins.usrv.eu:8081/nexus/content/groups/public/"
|
||||||
allowInsecureProtocol = true
|
allowInsecureProtocol = true
|
||||||
}
|
}
|
||||||
maven {
|
|
||||||
name 'sonatype'
|
|
||||||
url 'https://oss.sonatype.org/content/repositories/snapshots/'
|
|
||||||
}
|
|
||||||
maven {
|
|
||||||
name 'Scala CI dependencies'
|
|
||||||
url 'https://repo1.maven.org/maven2/'
|
|
||||||
}
|
|
||||||
|
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -302,7 +287,7 @@ if (apiPackage) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (accessTransformersFile) {
|
if (accessTransformersFile) {
|
||||||
for (atFile in accessTransformersFile.split(",")) {
|
for (atFile in accessTransformersFile.split(" ")) {
|
||||||
String targetFile = "src/main/resources/META-INF/" + atFile.trim()
|
String targetFile = "src/main/resources/META-INF/" + atFile.trim()
|
||||||
if (!getFile(targetFile).exists()) {
|
if (!getFile(targetFile).exists()) {
|
||||||
throw new GradleException("Could not resolve \"accessTransformersFile\"! Could not find " + targetFile)
|
throw new GradleException("Could not resolve \"accessTransformersFile\"! Could not find " + targetFile)
|
||||||
@@ -646,7 +631,7 @@ repositories {
|
|||||||
|
|
||||||
def mixinProviderGroup = "io.github.legacymoddingmc"
|
def mixinProviderGroup = "io.github.legacymoddingmc"
|
||||||
def mixinProviderModule = "unimixins"
|
def mixinProviderModule = "unimixins"
|
||||||
def mixinProviderVersion = "0.1.7.1"
|
def mixinProviderVersion = "0.1.13"
|
||||||
def mixinProviderSpecNoClassifer = "${mixinProviderGroup}:${mixinProviderModule}:${mixinProviderVersion}"
|
def mixinProviderSpecNoClassifer = "${mixinProviderGroup}:${mixinProviderModule}:${mixinProviderVersion}"
|
||||||
def mixinProviderSpec = "${mixinProviderSpecNoClassifer}:dev"
|
def mixinProviderSpec = "${mixinProviderSpecNoClassifer}:dev"
|
||||||
ext.mixinProviderSpec = mixinProviderSpec
|
ext.mixinProviderSpec = mixinProviderSpec
|
||||||
@@ -793,12 +778,12 @@ ext.java17PatchDependenciesCfg = configurations.create("java17PatchDependencies"
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
def lwjgl3ifyVersion = '1.5.1'
|
def lwjgl3ifyVersion = '1.5.7'
|
||||||
if (modId != 'lwjgl3ify') {
|
if (modId != 'lwjgl3ify') {
|
||||||
java17Dependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}")
|
java17Dependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}")
|
||||||
}
|
}
|
||||||
if (modId != 'hodgepodge') {
|
if (modId != 'hodgepodge') {
|
||||||
java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.3.17')
|
java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.3.35')
|
||||||
}
|
}
|
||||||
|
|
||||||
java17PatchDependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}:forgePatches") {transitive = false}
|
java17PatchDependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}:forgePatches") {transitive = false}
|
||||||
@@ -1187,9 +1172,8 @@ publishing {
|
|||||||
version = System.getenv("RELEASE_VERSION") ?: identifiedVersion
|
version = System.getenv("RELEASE_VERSION") ?: identifiedVersion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
if (usesMavenPublishing.toBoolean()) {
|
if (usesMavenPublishing.toBoolean() && System.getenv("MAVEN_USER") != null) {
|
||||||
maven {
|
maven {
|
||||||
url = mavenPublishUrl
|
url = mavenPublishUrl
|
||||||
allowInsecureProtocol = mavenPublishUrl.startsWith("http://") // Mostly for the GTNH maven
|
allowInsecureProtocol = mavenPublishUrl.startsWith("http://") // Mostly for the GTNH maven
|
||||||
@@ -1311,7 +1295,7 @@ def addCurseForgeRelation(String type, String name) {
|
|||||||
|
|
||||||
// Updating
|
// Updating
|
||||||
|
|
||||||
def buildscriptGradleVersion = "8.2.1"
|
def buildscriptGradleVersion = "8.5"
|
||||||
|
|
||||||
tasks.named('wrapper', Wrapper).configure {
|
tasks.named('wrapper', Wrapper).configure {
|
||||||
gradleVersion = buildscriptGradleVersion
|
gradleVersion = buildscriptGradleVersion
|
||||||
|
|||||||
+2
-2
@@ -35,6 +35,6 @@
|
|||||||
*/
|
*/
|
||||||
dependencies {
|
dependencies {
|
||||||
// api("net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev")
|
// api("net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev")
|
||||||
// api('com.github.GTNewHorizons:GT5-Unofficial:5.09.44.71:dev')
|
// api('com.github.GTNewHorizons:GT5-Unofficial:5.09.44.104:dev')
|
||||||
api('com.github.GTNewHorizons:NotEnoughIds:1.4.6:dev')
|
api('com.github.GTNewHorizons:NotEnoughIds:1.5.3:dev')
|
||||||
}
|
}
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
@@ -1,15 +1,17 @@
|
|||||||
package com.colen.postea;
|
package com.colen.postea;
|
||||||
|
|
||||||
|
import java.util.function.Function;
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
|
||||||
import com.colen.postea.API.BlockReplacementManager;
|
import com.colen.postea.API.BlockReplacementManager;
|
||||||
import com.colen.postea.Utility.BlockConversionInfo;
|
import com.colen.postea.Utility.BlockConversionInfo;
|
||||||
|
|
||||||
import cpw.mods.fml.common.Loader;
|
import cpw.mods.fml.common.Loader;
|
||||||
import cpw.mods.fml.common.Mod;
|
import cpw.mods.fml.common.Mod;
|
||||||
import cpw.mods.fml.common.ModContainer;
|
import cpw.mods.fml.common.ModContainer;
|
||||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
|
|
||||||
import java.util.function.Function;
|
|
||||||
|
|
||||||
@Mod(modid = Tags.MODID, version = Tags.VERSION, name = Tags.MODNAME, acceptedMinecraftVersions = "[1.7.10]")
|
@Mod(modid = Tags.MODID, version = Tags.VERSION, name = Tags.MODNAME, acceptedMinecraftVersions = "[1.7.10]")
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
@@ -18,7 +20,8 @@ public class Postea {
|
|||||||
@Mod.EventHandler
|
@Mod.EventHandler
|
||||||
public void preInit(FMLPreInitializationEvent event) {
|
public void preInit(FMLPreInitializationEvent event) {
|
||||||
|
|
||||||
ModContainer activeMod = Loader.instance().activeModContainer();
|
ModContainer activeMod = Loader.instance()
|
||||||
|
.activeModContainer();
|
||||||
String modID = activeMod.getModId();
|
String modID = activeMod.getModId();
|
||||||
String v = activeMod.getVersion();
|
String v = activeMod.getVersion();
|
||||||
|
|
||||||
@@ -26,13 +29,15 @@ public class Postea {
|
|||||||
|
|
||||||
BlockConversionInfo blockConversionInfoNew = new BlockConversionInfo();
|
BlockConversionInfo blockConversionInfoNew = new BlockConversionInfo();
|
||||||
|
|
||||||
if ((blockConversionInfoOld.x == -1) && (blockConversionInfoOld.y == 3) && (blockConversionInfoOld.z == -1)) {
|
if ((blockConversionInfoOld.x == -1) && (blockConversionInfoOld.y == 3)
|
||||||
|
&& (blockConversionInfoOld.z == -1)) {
|
||||||
blockConversionInfoNew.blockID = Block.getIdFromBlock(Blocks.wool);
|
blockConversionInfoNew.blockID = Block.getIdFromBlock(Blocks.wool);
|
||||||
blockConversionInfoNew.metadata = 1;
|
blockConversionInfoNew.metadata = 1;
|
||||||
return blockConversionInfoNew;
|
return blockConversionInfoNew;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((blockConversionInfoOld.x == -1) && (blockConversionInfoOld.y == 3) && (blockConversionInfoOld.z == 1)) {
|
if ((blockConversionInfoOld.x == -1) && (blockConversionInfoOld.y == 3)
|
||||||
|
&& (blockConversionInfoOld.z == 1)) {
|
||||||
blockConversionInfoNew.blockID = Block.getIdFromBlock(Blocks.wool);
|
blockConversionInfoNew.blockID = Block.getIdFromBlock(Blocks.wool);
|
||||||
blockConversionInfoNew.metadata = 1;
|
blockConversionInfoNew.metadata = 1;
|
||||||
return blockConversionInfoNew;
|
return blockConversionInfoNew;
|
||||||
@@ -44,7 +49,8 @@ public class Postea {
|
|||||||
return blockConversionInfoNew;
|
return blockConversionInfoNew;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((blockConversionInfoOld.x == 1) && (blockConversionInfoOld.y == 3) && (blockConversionInfoOld.z == -1)) {
|
if ((blockConversionInfoOld.x == 1) && (blockConversionInfoOld.y == 3)
|
||||||
|
&& (blockConversionInfoOld.z == -1)) {
|
||||||
blockConversionInfoNew.blockID = Block.getIdFromBlock(Blocks.wool);
|
blockConversionInfoNew.blockID = Block.getIdFromBlock(Blocks.wool);
|
||||||
blockConversionInfoNew.metadata = 1;
|
blockConversionInfoNew.metadata = 1;
|
||||||
return blockConversionInfoNew;
|
return blockConversionInfoNew;
|
||||||
|
|||||||
Reference in new issue
Block a user