Merge remote-tracking branch 'origin/1.16' into 1.18
This commit is contained in:
commit
313981f30e
|
|
@ -6,7 +6,7 @@ Some fixes are based on prior work in various Forge PRs (check commit history an
|
||||||
is directly derived from Sodium and used under the terms of the LGPL-3.0 license.
|
is directly derived from Sodium and used under the terms of the LGPL-3.0 license.
|
||||||
|
|
||||||
## Development builds (generally stable, but may occasionally have bugs)
|
## Development builds (generally stable, but may occasionally have bugs)
|
||||||
- 1.16.5, both modloaders: https://nightly.link/embeddedt/ModernFix/workflows/gradle/main/Package.zip
|
- 1.16.5, both modloaders: https://nightly.link/embeddedt/ModernFix/workflows/gradle/1.16/Package.zip
|
||||||
- 1.18.2, both modloaders: https://nightly.link/embeddedt/ModernFix/workflows/gradle/1.18/Package.zip
|
- 1.18.2, both modloaders: https://nightly.link/embeddedt/ModernFix/workflows/gradle/1.18/Package.zip
|
||||||
- 1.19.2, both modloaders: https://nightly.link/embeddedt/ModernFix/workflows/gradle/1.19.2/Package.zip
|
- 1.19.2, both modloaders: https://nightly.link/embeddedt/ModernFix/workflows/gradle/1.19.2/Package.zip
|
||||||
- 1.19.4, both modloaders: https://nightly.link/embeddedt/ModernFix/workflows/gradle/1.19.4/Package.zip
|
- 1.19.4, both modloaders: https://nightly.link/embeddedt/ModernFix/workflows/gradle/1.19.4/Package.zip
|
||||||
|
|
|
||||||
15
build.gradle
15
build.gradle
|
|
@ -13,7 +13,7 @@ architectury {
|
||||||
minecraft = rootProject.minecraft_version
|
minecraft = rootProject.minecraft_version
|
||||||
}
|
}
|
||||||
|
|
||||||
ext.archives_base_name = 'modernfix-mc' + minecraft_version
|
ext.archives_base_name = 'modernfix'
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
apply plugin: "java"
|
apply plugin: "java"
|
||||||
|
|
@ -28,7 +28,18 @@ allprojects {
|
||||||
}
|
}
|
||||||
|
|
||||||
group = 'org.embeddedt'
|
group = 'org.embeddedt'
|
||||||
version = gitVersion()
|
// extract base version from tag, generate other metadata ourselves
|
||||||
|
def details = versionDetails()
|
||||||
|
def plusIndex = details.lastTag.indexOf("+")
|
||||||
|
if(plusIndex == -1) {
|
||||||
|
plusIndex = details.lastTag.length()
|
||||||
|
}
|
||||||
|
def baseVersion = details.lastTag.substring(0, plusIndex)
|
||||||
|
def dirtyMarker = details.isCleanTag ? "" : ".dirty"
|
||||||
|
def commitHashMarker = details.commitDistance > 0 ? ("." + details.gitHash) : ""
|
||||||
|
def preMarker = (details.commitDistance > 0 || !details.isCleanTag) ? ("-beta." + details.commitDistance) : ""
|
||||||
|
def versionString = "${baseVersion}${preMarker}+mc${minecraft_version}${commitHashMarker}${dirtyMarker}"
|
||||||
|
version = versionString
|
||||||
archivesBaseName = rootProject.archives_base_name + '-' + project.name
|
archivesBaseName = rootProject.archives_base_name + '-' + project.name
|
||||||
|
|
||||||
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_17
|
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_17
|
||||||
|
|
|
||||||
|
|
@ -307,7 +307,7 @@ public abstract class ModelBakeryMixin implements IExtendedModelBakery {
|
||||||
};
|
};
|
||||||
// bake indigo models
|
// bake indigo models
|
||||||
Stopwatch watch = Stopwatch.createStarted();
|
Stopwatch watch = Stopwatch.createStarted();
|
||||||
this.topLevelModels.forEach((key, value) -> {
|
new ArrayList<>(this.topLevelModels.keySet()).forEach(key -> {
|
||||||
try {
|
try {
|
||||||
this.bake(key, BlockModelRotation.X0_Y0);
|
this.bake(key, BlockModelRotation.X0_Y0);
|
||||||
} catch(RuntimeException e) {
|
} catch(RuntimeException e) {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
package org.embeddedt.modernfix.forge.mixin.bugfix.ctm_resourceutil_cme;
|
||||||
|
|
||||||
|
import org.embeddedt.modernfix.annotation.ClientOnlyMixin;
|
||||||
|
import org.embeddedt.modernfix.annotation.RequiresMod;
|
||||||
|
import org.spongepowered.asm.mixin.Final;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.Mutable;
|
||||||
|
import org.spongepowered.asm.mixin.Shadow;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
import team.chisel.ctm.client.util.ResourceUtil;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.concurrent.ConcurrentMap;
|
||||||
|
|
||||||
|
@Mixin(ResourceUtil.class)
|
||||||
|
@RequiresMod("ctm")
|
||||||
|
@ClientOnlyMixin
|
||||||
|
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||||
|
public class ResourceUtilMixin {
|
||||||
|
@Shadow @Final @Mutable
|
||||||
|
private static Map metadataCache;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author embeddedt
|
||||||
|
* @reason quick fix to prevent rare CMEs
|
||||||
|
*/
|
||||||
|
@Inject(method = "<clinit>", at = @At("RETURN"))
|
||||||
|
private static void synchronizeMetadataCache(CallbackInfo ci) {
|
||||||
|
if(!(metadataCache instanceof ConcurrentMap))
|
||||||
|
metadataCache = Collections.synchronizedMap(metadataCache);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user