aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build.gradle.kts22
-rw-r--r--buildSrc/build.gradle.kts2
-rw-r--r--gradle/libs.versions.toml27
-rw-r--r--gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--javaplugin/src/main/java/moe/nea/firmament/javaplugin/InitReplacer.java8
-rw-r--r--javaplugin/src/main/java/moe/nea/firmament/javaplugin/IntermediaryMethodReplacer.java7
-rw-r--r--javaplugin/src/main/java/moe/nea/firmament/javaplugin/MappingTree.java69
-rw-r--r--javaplugin/src/main/java/moe/nea/firmament/javaplugin/Utils.java2
-rw-r--r--src/main/java/moe/nea/firmament/init/EarlyRiser.java2
-rw-r--r--src/main/java/moe/nea/firmament/init/HandledScreenRiser.java1
-rw-r--r--src/main/java/moe/nea/firmament/init/ItemColorsSodiumRiser.java64
-rw-r--r--src/main/java/moe/nea/firmament/mixins/CustomModelEventPatch.java36
-rw-r--r--src/main/java/moe/nea/firmament/mixins/IncomingPacketListenerPatches.java3
-rw-r--r--src/main/java/moe/nea/firmament/mixins/custommodels/ApplyHeadModelInItemRenderer.java35
-rw-r--r--src/main/java/moe/nea/firmament/mixins/custommodels/BakedModelDataHolderBasic.java42
-rw-r--r--src/main/java/moe/nea/firmament/mixins/custommodels/BakedModelDataHolderBuiltin.java43
-rw-r--r--src/main/java/moe/nea/firmament/mixins/custommodels/BakedOverrideDataHolder.java28
-rw-r--r--src/main/java/moe/nea/firmament/mixins/custommodels/HeadModelReplacerPatch.java57
-rw-r--r--src/main/java/moe/nea/firmament/mixins/custommodels/ItemColorRemovalPatch.java39
-rw-r--r--src/main/java/moe/nea/firmament/mixins/custommodels/ItemModelGeneratorJsonUnbakedModelCopy.java22
-rw-r--r--src/main/java/moe/nea/firmament/mixins/custommodels/ItemRendererTintContextPatch.java35
-rw-r--r--src/main/java/moe/nea/firmament/mixins/custommodels/JsonUnbakedModelDataHolder.java130
-rw-r--r--src/main/java/moe/nea/firmament/mixins/custommodels/ModelOverrideDataHolder.java28
-rw-r--r--src/main/java/moe/nea/firmament/mixins/custommodels/PatchJsonUnbakedModelDeserializer.java31
-rw-r--r--src/main/java/moe/nea/firmament/mixins/custommodels/PatchLegacyArmorLayerSupport.java22
-rw-r--r--src/main/java/moe/nea/firmament/mixins/custommodels/PatchOverrideDeserializer.java50
-rw-r--r--src/main/java/moe/nea/firmament/mixins/custommodels/ProvideBakerToJsonUnbakedModelPatch.java27
-rw-r--r--src/main/java/moe/nea/firmament/mixins/custommodels/TestForFirmamentOverridePredicatesPatch.java68
-rw-r--r--src/main/kotlin/events/BakeExtraModelsEvent.kt13
-rw-r--r--src/main/kotlin/events/CustomItemModelEvent.kt31
-rw-r--r--src/main/kotlin/features/FeatureManager.kt2
-rw-r--r--src/main/kotlin/features/chat/ChatLinks.kt239
-rw-r--r--src/main/kotlin/features/debug/PowerUserTools.kt11
-rw-r--r--src/main/kotlin/features/texturepack/BakedModelExtra.kt30
-rw-r--r--src/main/kotlin/features/texturepack/BakedOverrideData.kt14
-rw-r--r--src/main/kotlin/features/texturepack/CustomModelOverrideParser.kt82
-rw-r--r--src/main/kotlin/features/texturepack/CustomSkyBlockTextures.kt135
-rw-r--r--src/main/kotlin/features/texturepack/JsonUnbakedModelFirmExtra.kt16
-rw-r--r--src/main/kotlin/features/texturepack/ModelOverrideData.kt15
-rw-r--r--src/main/kotlin/gui/entity/FakeWorld.kt5
-rw-r--r--src/main/kotlin/repo/RepoModResourcePack.kt156
-rw-r--r--src/main/resources/firmament.accesswidener19
-rw-r--r--src/texturePacks/java/moe/nea/firmament/features/texturepack/CustomBlockTextures.kt (renamed from src/main/kotlin/features/texturepack/CustomBlockTextures.kt)10
-rw-r--r--src/texturePacks/java/moe/nea/firmament/features/texturepack/CustomGlobalArmorOverrides.kt (renamed from src/main/kotlin/features/texturepack/CustomGlobalArmorOverrides.kt)46
-rw-r--r--src/texturePacks/java/moe/nea/firmament/features/texturepack/CustomGlobalTextures.kt (renamed from src/main/kotlin/features/texturepack/CustomGlobalTextures.kt)48
-rw-r--r--src/texturePacks/java/moe/nea/firmament/features/texturepack/CustomModelOverrideParser.kt103
-rw-r--r--src/texturePacks/java/moe/nea/firmament/features/texturepack/CustomSkyBlockTextures.kt117
-rw-r--r--src/texturePacks/java/moe/nea/firmament/features/texturepack/CustomTextColors.kt (renamed from src/main/kotlin/features/texturepack/CustomTextColors.kt)0
-rw-r--r--src/texturePacks/java/moe/nea/firmament/features/texturepack/FirmamentModelPredicate.kt (renamed from src/main/kotlin/features/texturepack/FirmamentModelPredicate.kt)0
-rw-r--r--src/texturePacks/java/moe/nea/firmament/features/texturepack/FirmamentModelPredicateParser.kt (renamed from src/main/kotlin/features/texturepack/FirmamentModelPredicateParser.kt)0
-rw-r--r--src/texturePacks/java/moe/nea/firmament/features/texturepack/FirmamentRootPredicateSerializer.kt23
-rw-r--r--src/texturePacks/java/moe/nea/firmament/features/texturepack/PredicateModel.kt85
-rw-r--r--src/texturePacks/java/moe/nea/firmament/features/texturepack/RarityMatcher.kt (renamed from src/main/kotlin/features/texturepack/RarityMatcher.kt)0
-rw-r--r--src/texturePacks/java/moe/nea/firmament/features/texturepack/StringMatcher.kt (renamed from src/main/kotlin/features/texturepack/StringMatcher.kt)2
-rw-r--r--src/texturePacks/java/moe/nea/firmament/features/texturepack/TintOverrides.kt (renamed from src/main/kotlin/features/texturepack/TintOverrides.kt)2
-rw-r--r--src/texturePacks/java/moe/nea/firmament/features/texturepack/predicates/AlwaysPredicate.kt (renamed from src/main/kotlin/features/texturepack/predicates/AlwaysPredicate.kt)0
-rw-r--r--src/texturePacks/java/moe/nea/firmament/features/texturepack/predicates/AndPredicate.kt (renamed from src/main/kotlin/features/texturepack/predicates/AndPredicate.kt)0
-rw-r--r--src/texturePacks/java/moe/nea/firmament/features/texturepack/predicates/DisplayNamePredicate.kt (renamed from src/main/kotlin/features/texturepack/predicates/DisplayNamePredicate.kt)0
-rw-r--r--src/texturePacks/java/moe/nea/firmament/features/texturepack/predicates/ExtraAttributesPredicate.kt (renamed from src/main/kotlin/features/texturepack/predicates/ExtraAttributesPredicate.kt)0
-rw-r--r--src/texturePacks/java/moe/nea/firmament/features/texturepack/predicates/ItemPredicate.kt (renamed from src/main/kotlin/features/texturepack/predicates/ItemPredicate.kt)0
-rw-r--r--src/texturePacks/java/moe/nea/firmament/features/texturepack/predicates/LorePredicate.kt (renamed from src/main/kotlin/features/texturepack/predicates/LorePredicate.kt)0
-rw-r--r--src/texturePacks/java/moe/nea/firmament/features/texturepack/predicates/NotPredicate.kt (renamed from src/main/kotlin/features/texturepack/predicates/NotPredicate.kt)0
-rw-r--r--src/texturePacks/java/moe/nea/firmament/features/texturepack/predicates/NumberMatcher.kt (renamed from src/main/kotlin/features/texturepack/predicates/NumberMatcher.kt)0
-rw-r--r--src/texturePacks/java/moe/nea/firmament/features/texturepack/predicates/OrPredicate.kt (renamed from src/main/kotlin/features/texturepack/predicates/OrPredicate.kt)0
-rw-r--r--src/texturePacks/java/moe/nea/firmament/features/texturepack/predicates/PetPredicate.kt (renamed from src/main/kotlin/features/texturepack/predicates/PetPredicate.kt)0
-rw-r--r--src/texturePacks/java/moe/nea/firmament/mixins/custommodels/ApplyHeadModelInItemRenderer.java11
-rw-r--r--src/texturePacks/java/moe/nea/firmament/mixins/custommodels/CustomSkullTexturePatch.java (renamed from src/main/java/moe/nea/firmament/mixins/CustomSkullTexturePatch.java)11
-rw-r--r--src/texturePacks/java/moe/nea/firmament/mixins/custommodels/PatchArmorTexture.java (renamed from src/main/java/moe/nea/firmament/mixins/custommodels/PatchArmorTexture.java)21
-rw-r--r--src/texturePacks/java/moe/nea/firmament/mixins/custommodels/PatchLegacyArmorLayerSupport.java23
-rw-r--r--src/texturePacks/java/moe/nea/firmament/mixins/custommodels/ReferenceCustomModelsPatch.java (renamed from src/main/java/moe/nea/firmament/mixins/custommodels/ReferenceCustomModelsPatch.java)25
-rw-r--r--src/texturePacks/java/moe/nea/firmament/mixins/custommodels/ReplaceBlockBreakSoundPatch.java (renamed from src/main/java/moe/nea/firmament/mixins/custommodels/ReplaceBlockBreakSoundPatch.java)0
-rw-r--r--src/texturePacks/java/moe/nea/firmament/mixins/custommodels/ReplaceBlockHitSoundPatch.java (renamed from src/main/java/moe/nea/firmament/mixins/custommodels/ReplaceBlockHitSoundPatch.java)0
-rw-r--r--src/texturePacks/java/moe/nea/firmament/mixins/custommodels/ReplaceBlockRenderManagerBlockModel.java (renamed from src/main/java/moe/nea/firmament/mixins/custommodels/ReplaceBlockRenderManagerBlockModel.java)0
-rw-r--r--src/texturePacks/java/moe/nea/firmament/mixins/custommodels/ReplaceFallbackBlockModel.java (renamed from src/main/java/moe/nea/firmament/mixins/custommodels/ReplaceFallbackBlockModel.java)0
-rw-r--r--src/texturePacks/java/moe/nea/firmament/mixins/custommodels/ReplaceItemModelPatch.java24
-rw-r--r--src/texturePacks/java/moe/nea/firmament/mixins/custommodels/ReplaceTextColorInHandledScreen.java (renamed from src/main/java/moe/nea/firmament/mixins/ReplaceTextColorInHandledScreen.java)2
-rw-r--r--symbols/src/main/kotlin/process/SubscribeAnnotationProcessor.kt1
77 files changed, 779 insertions, 1445 deletions
diff --git a/build.gradle.kts b/build.gradle.kts
index 1d5478f..c74a424 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -25,7 +25,7 @@ plugins {
alias(libs.plugins.kotlin.plugin.ksp)
// alias(libs.plugins.loom)
// TODO: use arch loom once they update to 1.8
- id("fabric-loom") version "1.8.9"
+ id("fabric-loom") version "1.9.2"
alias(libs.plugins.shadow)
id("moe.nea.licenseextractificator")
id("moe.nea.mc-auto-translations") version "0.1.0"
@@ -129,13 +129,8 @@ val collectTranslations by tasks.registering(CollectTranslations::class) {
val compatSourceSets: MutableSet<SourceSet> = mutableSetOf()
fun createIsolatedSourceSet(name: String, path: String = "compat/$name", isEnabled: Boolean = true): SourceSet {
val ss = sourceSets.create(name) {
- if (isEnabled) {
- this.java.setSrcDirs(listOf(layout.projectDirectory.dir("src/$path/java")))
- this.kotlin.setSrcDirs(listOf(layout.projectDirectory.dir("src/$path/java")))
- } else {
- this.java.setSrcDirs(listOf<File>())
- this.kotlin.setSrcDirs(listOf<File>())
- }
+ this.java.setSrcDirs(listOf(layout.projectDirectory.dir("src/$path/java")))
+ this.kotlin.setSrcDirs(listOf(layout.projectDirectory.dir("src/$path/java")))
}
val mainSS = sourceSets.main.get()
val upperName = ss.name.capitalizeN()
@@ -221,15 +216,16 @@ val testAgent by configurations.creating {
val configuredSourceSet = createIsolatedSourceSet("configured",
isEnabled = false) // Wait for update (also low prio, because configured sucks)
-val sodiumSourceSet = createIsolatedSourceSet("sodium")
+val sodiumSourceSet = createIsolatedSourceSet("sodium", isEnabled = false)
val citResewnSourceSet = createIsolatedSourceSet("citresewn", isEnabled = false) // TODO: Wait for update
-val yaclSourceSet = createIsolatedSourceSet("yacl")
+val yaclSourceSet = createIsolatedSourceSet("yacl", isEnabled = false)
val explosiveEnhancementSourceSet =
createIsolatedSourceSet("explosiveEnhancement", isEnabled = false) // TODO: wait for their port
val wildfireGenderSourceSet = createIsolatedSourceSet("wildfireGender", isEnabled = false) // TODO: wait on their port
-val modmenuSourceSet = createIsolatedSourceSet("modmenu")
-val reiSourceSet = createIsolatedSourceSet("rei")
-val moulconfigSourceSet = createIsolatedSourceSet("moulconfig")
+val modmenuSourceSet = createIsolatedSourceSet("modmenu", isEnabled = false)
+val reiSourceSet = createIsolatedSourceSet("rei", isEnabled = false)
+val moulconfigSourceSet = createIsolatedSourceSet("moulconfig", isEnabled = false)
+val customTexturesSourceSet = createIsolatedSourceSet("texturePacks", "texturePacks")
dependencies {
// Minecraft dependencies
diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts
index d89c20e..54719bc 100644
--- a/buildSrc/build.gradle.kts
+++ b/buildSrc/build.gradle.kts
@@ -3,7 +3,7 @@
// SPDX-License-Identifier: CC0-1.0
plugins {
- kotlin("jvm") version "1.8.10"
+ kotlin("jvm") version "2.1.0"
`kotlin-dsl`
}
repositories {
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 74de8e8..b8ed2f1 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -3,21 +3,23 @@
# SPDX-License-Identifier: CC0-1.0
[versions]
-minecraft = "1.21.3"
+minecraft = "1.21.4"
# Update from https://kotlinlang.org/
-kotlin = "2.0.21"
+kotlin = "2.1.0"
# Update from https://github.com/google/ksp/releases
-kotlin_ksp = "2.0.21-1.0.26"
+kotlin_ksp = "2.1.0-1.0.29"
# Update from https://linkie.shedaniel.me/dependencies?loader=fabric
fabric_loader = "0.16.9"
-fabric_api = "0.107.0+1.21.3"
-fabric_kotlin = "1.12.3+kotlin.2.0.21"
-yarn = "1.21.3+build.2"
+fabric_api = "0.110.5+1.21.4"
+yarn = "1.21.4+build.1"
+modmenu = "13.0.0-beta.1"
+architectury = "15.0.1"
rei = "17.0.789"
-modmenu = "12.0.0-beta.1"
-architectury = "14.0.4"
+
+# Update from https://maven.fabricmc.net/net/fabricmc/fabric-language-kotlin/
+fabric_kotlin = "1.13.0+kotlin.2.1.0"
# Update from https://maven.architectury.dev/dev/architectury/loom/dev.architectury.loom.gradle.plugin/
loom = "1.7.414"
@@ -26,16 +28,16 @@ loom = "1.7.414"
qolify = "1.6.0-1.21.1"
# Update from https://modrinth.com/mod/sodium/versions?l=fabric
-sodium = "mc1.21.3-0.6.0-beta.4-fabric"
+sodium = "mc1.21.4-0.6.2-fabric"
# Update from https://modrinth.com/mod/freecam/versions?l=fabric
-freecammod = "vomskVK3"
+freecammod = "1.3.1+mc1.21.3"
# Update from https://modrinth.com/mod/no-chat-reports/versions?l=fabric
ncr = "Fabric-1.21.3-v2.10.0"
# Update from https://modrinth.com/mod/female-gender/versions?l=fabric
-femalegender = "kJmjQvAS"
+femalegender = "4.3+1.21.4"
# Update from https://modrinth.com/mod/explosive-enhancement/versions?l=fabric
explosiveenhancement = "1.2.3-1.21.0"
@@ -49,12 +51,13 @@ citresewn = "1.2.0+1.21"
devauth = "1.2.0"
# Update from https://ktor.io/
-ktor = "3.0.1"
+ktor = "3.0.2"
# Update from https://repo.nea.moe/#/releases/moe/nea/neurepoparser
neurepoparser = "1.6.0"
# Update from https://github.com/HotswapProjects/HotswapAgent/releases
+# TODO: bump to 2.0.1
hotswap_agent = "1.4.2-SNAPSHOT"
# Update from https://github.com/LlamaLad7/MixinExtras/tags
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index f861d18..6e2ced2 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -4,6 +4,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/javaplugin/src/main/java/moe/nea/firmament/javaplugin/InitReplacer.java b/javaplugin/src/main/java/moe/nea/firmament/javaplugin/InitReplacer.java
index a0d28ab..7ba3b44 100644
--- a/javaplugin/src/main/java/moe/nea/firmament/javaplugin/InitReplacer.java
+++ b/javaplugin/src/main/java/moe/nea/firmament/javaplugin/InitReplacer.java
@@ -59,6 +59,14 @@ public class InitReplacer extends TreeScanner<Void, Void> {
var target = plugin.utils.getAnnotationValue(jcAnnotation, "value");
var targetClass = plugin.utils.resolveClassLiteralExpression(target).tsym.flatName().toString();
var intermediaryClass = mappingTree.resolveClassToIntermediary(targetClass);
+ if (intermediaryClass == null){
+ plugin.utils.reportError(
+ compilationUnitTree.getSourceFile(),
+ jcNode.init,
+ "Unknown class name " + targetClass
+ );
+ return super.visitVariable(node, unused);
+ }
var remapper = treeMaker.Select(treeMaker.This(classTree.type), names.fromString("remapper"));
var remappingCall = treeMaker.Apply(
List.nil(),
diff --git a/javaplugin/src/main/java/moe/nea/firmament/javaplugin/IntermediaryMethodReplacer.java b/javaplugin/src/main/java/moe/nea/firmament/javaplugin/IntermediaryMethodReplacer.java
index d3040b7..cb87b20 100644
--- a/javaplugin/src/main/java/moe/nea/firmament/javaplugin/IntermediaryMethodReplacer.java
+++ b/javaplugin/src/main/java/moe/nea/firmament/javaplugin/IntermediaryMethodReplacer.java
@@ -57,7 +57,12 @@ public class IntermediaryMethodReplacer extends TreeScanner<Void, Void> {
}
var head = node.typeargs.head;
var resolved = plugin.utils.resolveClassName(head, compilationUnit);
- var mappedName = mappings.resolveClassToIntermediary(resolved.tsym.flatName().toString());
+ var sourceName = resolved.tsym.flatName().toString();
+ var mappedName = mappings.resolveClassToIntermediary(sourceName);
+ if (mappedName == null) {
+ plugin.utils.reportError(sourceFile, node, "Unknown class name " + sourceName);
+ return;
+ }
fieldAccess.name = plugin.names.fromString("id");
node.typeargs = List.nil();
node.args = List.of(plugin.treeMaker.Literal(mappedName));
diff --git a/javaplugin/src/main/java/moe/nea/firmament/javaplugin/MappingTree.java b/javaplugin/src/main/java/moe/nea/firmament/javaplugin/MappingTree.java
index 7a270b7..eef5f9a 100644
--- a/javaplugin/src/main/java/moe/nea/firmament/javaplugin/MappingTree.java
+++ b/javaplugin/src/main/java/moe/nea/firmament/javaplugin/MappingTree.java
@@ -9,40 +9,43 @@ import java.util.stream.Collectors;
public class MappingTree {
- private final Map<String, TinyClass> classLookup;
- private final int targetIndex;
- private final int sourceIndex;
+ private final Map<String, TinyClass> classLookup;
+ private final int targetIndex;
+ private final int sourceIndex;
- public MappingTree(TinyFile tinyV2File, String sourceNamespace, String targetNamespace) {
- sourceIndex = tinyV2File.getHeader().getNamespaces().indexOf(sourceNamespace);
- if (sourceIndex < 0)
- throw new RuntimeException("Could not find source namespace " + sourceNamespace + " in mappings file.");
- this.classLookup = tinyV2File
- .getClassEntries()
- .stream()
- .collect(Collectors.toMap(it -> it.getClassNames().get(sourceIndex), it -> it));
- targetIndex = tinyV2File.getHeader().getNamespaces().indexOf(targetNamespace);
- if (targetIndex < 0)
- throw new RuntimeException("Could not find target namespace " + targetNamespace + " in mappings file.");
- }
+ public MappingTree(TinyFile tinyV2File, String sourceNamespace, String targetNamespace) {
+ sourceIndex = tinyV2File.getHeader().getNamespaces().indexOf(sourceNamespace);
+ if (sourceIndex < 0)
+ throw new RuntimeException("Could not find source namespace " + sourceNamespace + " in mappings file.");
+ this.classLookup = tinyV2File
+ .getClassEntries()
+ .stream()
+ .collect(Collectors.toMap(it -> it.getClassNames().get(sourceIndex), it -> it));
+ targetIndex = tinyV2File.getHeader().getNamespaces().indexOf(targetNamespace);
+ if (targetIndex < 0)
+ throw new RuntimeException("Could not find target namespace " + targetNamespace + " in mappings file.");
+ }
- public String resolveMethodToInterme