Skip to content

Commit 0e526cd

Browse files
committed
Merge branch 'master' into zb/block-breaker-improvements
2 parents 1cb6b62 + 8bc2ba5 commit 0e526cd

File tree

260 files changed

+9758
-5332
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

260 files changed

+9758
-5332
lines changed

.github/workflows/format_java.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ jobs:
1515
formatting:
1616
name: Formatting
1717
runs-on: ubuntu-latest
18+
env:
19+
DISABLE_BUILDSCRIPT_UPDATE_CHECK: true
1820

1921
steps:
2022
- name: Checkout Repository

.github/workflows/nuclear_test_release.yml

Lines changed: 0 additions & 49 deletions
This file was deleted.

.github/workflows/publish_project.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ jobs:
2424
permissions:
2525
contents: write # needed to create GitHub releases
2626

27+
env:
28+
DISABLE_BUILDSCRIPT_UPDATE_CHECK: true
29+
2730
steps:
2831
- name: Checkout Repository
2932
uses: actions/checkout@v4

.github/workflows/test_java.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ jobs:
1515
test:
1616
name: Tests
1717
runs-on: ubuntu-latest
18+
env:
19+
DISABLE_BUILDSCRIPT_UPDATE_CHECK: true
1820

1921
steps:
2022
- name: Checkout Repository

.github/workflows/update_gradle_cache.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ jobs:
1616
update-cache:
1717
name: Update Grade Cache
1818
runs-on: ubuntu-latest
19+
env:
20+
DISABLE_BUILDSCRIPT_UPDATE_CHECK: true
1921

2022
steps:
2123
- name: Checkout Repository

build.gradle

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//version: 1743737794
1+
//version: 1753288091
22
/*
33
* DO NOT CHANGE THIS FILE!
44
* Also, you may replace this file at any time if there is an update available.
@@ -50,6 +50,8 @@ def out = services.get(StyledTextOutputFactory).create('an-output')
5050

5151

5252
// Project properties
53+
loadProjectProperties()
54+
5355

5456
// Required properties: we don't know how to handle these being missing gracefully
5557
checkPropertyExists("modName")
@@ -870,10 +872,10 @@ if (enableJava17RunTasks.toBoolean()) {
870872

871873
dependencies {
872874
if (modId != 'lwjgl3ify') {
873-
java17Dependencies("io.github.twilightflower:lwjgl3ify:1.0.0")
874-
}
875-
java17PatchDependencies("io.github.twilightflower:lwjgl3ify:1.0.0:forgePatches") {
875+
java17Dependencies("io.github.twilightflower:lwjgl3ify:1.0.1")
876+
java17PatchDependencies("io.github.twilightflower:lwjgl3ify:1.0.1:forgePatches") {
876877
transitive = false
878+
}
877879
}
878880
}
879881

@@ -1009,7 +1011,7 @@ abstract class RunHotswappableMinecraftTask extends RunMinecraftTask {
10091011

10101012
if (project.usesMixins.toBoolean()) {
10111013
this.extraJvmArgs.addAll(project.provider(() -> {
1012-
def mixinCfg = project.configurations.detachedConfiguration(project.dependencies.create(mixinProviderSpec))
1014+
def mixinCfg = project.configurations.detachedConfiguration(project.dependencies.create(project.mixinProviderSpec))
10131015
mixinCfg.canBeConsumed = false
10141016
mixinCfg.canBeResolved = true
10151017
mixinCfg.transitive = false
@@ -1475,14 +1477,28 @@ tasks.register('faq') {
14751477
"To add new dependencies to your project, place them in 'dependencies.gradle', NOT in 'build.gradle' as they would be replaced when the script updates.\n" +
14761478
"To add new repositories to your project, place them in 'repositories.gradle'.\n" +
14771479
"If you need additional gradle code to run, you can place it in a file named 'addon.gradle' (or either of the above, up to you for organization).\n\n" +
1478-
"If your build fails to recognize the syntax of newer Java versions, enable Jabel in your 'gradle.properties' under the option name 'enableModernJavaSyntax'.\n" +
1480+
"If your build fails to recognize the syntax of newer Java versions, enable Jabel in your 'buildscript.properties' under the option name 'enableModernJavaSyntax'.\n" +
14791481
"To see information on how to configure your IDE properly for Java 17, see https://github.com/GregTechCEu/Buildscripts/blob/master/docs/jabel.md\n\n" +
14801482
"Report any issues or feature requests you have for this build script to https://github.com/GregTechCEu/Buildscripts/issues\n")
14811483
}
14821484
}
14831485

14841486

14851487
// Helpers
1488+
def loadProjectProperties() {
1489+
def configFile = file("buildscript.properties")
1490+
if (configFile.exists()) {
1491+
configFile.withReader {
1492+
def prop = new Properties()
1493+
prop.load(it)
1494+
new ConfigSlurper().parse(prop).forEach { String k, def v ->
1495+
project.ext.setProperty(k, v)
1496+
}
1497+
}
1498+
} else {
1499+
print("Failed to read from buildscript.properties, as it did not exist!")
1500+
}
1501+
}
14861502

14871503
def getDefaultArtifactGroup() {
14881504
def lastIndex = project.modGroup.lastIndexOf('.')
@@ -1495,7 +1511,7 @@ def getFile(String relativePath) {
14951511

14961512
def checkPropertyExists(String propertyName) {
14971513
if (!project.hasProperty(propertyName)) {
1498-
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/GregTechCEu/Buildscripts/blob/main/gradle.properties")
1514+
throw new GradleException("This project requires a property \"" + propertyName + "\"! Please add it your \"buildscript.properties\" or \"gradle.properties\". You can find all properties and their description here: https://github.com/GregTechCEu/Buildscripts/blob/main/buildscript.properties and https://github.com/GregTechCEu/Buildscripts/blob/main/gradle.properties")
14991515
}
15001516
}
15011517

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package dev.redstudio.alfheim.lighting;
2+
3+
// stub class to appease javac
4+
public class LightingEngine {
5+
}

src/main/java/gregtech/api/GregTechAPI.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import gregtech.api.network.INetworkHandler;
1414
import gregtech.api.recipes.properties.RecipePropertyRegistry;
1515
import gregtech.api.sound.ISoundManager;
16+
import gregtech.api.unification.RecyclingManager;
1617
import gregtech.api.unification.material.Material;
1718
import gregtech.api.unification.material.registry.IMaterialRegistryManager;
1819
import gregtech.api.unification.material.registry.MarkerMaterialRegistry;
@@ -58,6 +59,10 @@ public class GregTechAPI {
5859
/** GT's data migrations API */
5960
public static final MigrationAPI MIGRATIONS = new MigrationAPI();
6061
public static final RecipePropertyRegistry RECIPE_PROPERTIES = new RecipePropertyRegistry();
62+
/**
63+
* Manager for Item Recycling Data
64+
*/
65+
public static final RecyclingManager RECYCLING_MANAGER = new RecyclingManager();
6166

6267
/** Will be available at the Pre-Initialization stage */
6368
private static boolean highTier;

src/main/java/gregtech/api/capability/GregtechDataCodes.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ public static int assignId() {
9999
public static final int UPDATE_UPWARDS_FACING = assignId();
100100
public static final int UPDATE_FLIP = assignId();
101101
public static final int LOCK_FILL = assignId();
102+
public static final int MUFFLER_OBSTRUCTED = assignId();
102103

103104
// Item Bus Item Stack Auto Collapsing
104105
public static final int TOGGLE_COLLAPSE_ITEMS = assignId();

src/main/java/gregtech/api/capability/IHPCAComponentHatch.java

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
package gregtech.api.capability;
22

3-
import gregtech.api.gui.resources.TextureArea;
3+
import gregtech.api.metatileentity.MetaTileEntity;
4+
import gregtech.api.mui.GTGuiTextures;
5+
6+
import com.cleanroommc.modularui.drawable.UITexture;
47

58
public interface IHPCAComponentHatch {
69

@@ -46,5 +49,17 @@ default void setDamaged(boolean damaged) {}
4649
/**
4750
* The icon for this component in the HPCA's UI. Should be a 13x13 px sprite.
4851
*/
49-
TextureArea getComponentIcon();
52+
default UITexture getComponentIcon() {
53+
return GTGuiTextures.HPCA_ICON_EMPTY_COMPONENT;
54+
}
55+
56+
/**
57+
* The untranslated name of the tile implementing an HPCA component
58+
*/
59+
default String getTileName() {
60+
if (this instanceof MetaTileEntity mte) {
61+
return mte.getMetaFullName();
62+
}
63+
return "";
64+
}
5065
}

0 commit comments

Comments
 (0)