[Change] Allow to run with FAPI 0.86.1 (and up), which fixes the forced registry Paths
This commit is contained in:
parent
e86ea25b60
commit
81a5d630c4
4 changed files with 14 additions and 16 deletions
|
@ -59,6 +59,8 @@ dependencies {
|
|||
mappings loom.officialMojangMappings()
|
||||
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
|
||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
||||
//make sure we are compatible to the old model API
|
||||
modImplementation "net.fabricmc.fabric-api:fabric-api-deprecated:${project.fabric_version}"
|
||||
modCompileOnly "com.terraformersmc:modmenu:${project.modmenu_version}"
|
||||
|
||||
modCompileOnly "dev.emi:emi-fabric:${emi_version}:api"
|
||||
|
|
|
@ -10,9 +10,9 @@ loom_version=1.0-SNAPSHOT
|
|||
# check these on https://fabricmc.net/versions.html
|
||||
minecraft_version=1.20.1
|
||||
loader_version=0.14.21
|
||||
fabric_version=0.85.0+1.20.1
|
||||
fabric_version=0.86.1+1.20.1
|
||||
# Mod Properties
|
||||
mod_version=3.0.12
|
||||
mod_version=3.0.13
|
||||
maven_group=org.betterx.bclib
|
||||
archives_base_name=bclib
|
||||
# Dependencies
|
||||
|
|
|
@ -1,12 +1,9 @@
|
|||
package org.betterx.bclib.mixin.common;
|
||||
|
||||
import org.betterx.bclib.BCLib;
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeRegistry;
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BiomeData;
|
||||
import org.betterx.worlds.together.WorldsTogether;
|
||||
|
||||
import net.minecraft.resources.RegistryDataLoader;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Mutable;
|
||||
|
@ -14,7 +11,6 @@ import org.spongepowered.asm.mixin.gen.Accessor;
|
|||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -38,12 +34,12 @@ public class RegistryDataLoaderMixin {
|
|||
wt_set_WORLDGEN_REGISTRIES(enhanced);
|
||||
}
|
||||
|
||||
// Fabric force changes the directory path for all modded registries to be prefixed with the mod id.
|
||||
// We do not want this for our BCL-Biome/Surface Rule Registry, so we remove the prefix here.
|
||||
@Inject(method = "registryDirPath", at = @At("RETURN"), cancellable = true)
|
||||
private static void prependDirectoryWithNamespace(ResourceLocation id, CallbackInfoReturnable<String> info) {
|
||||
if (id.getNamespace().equals(WorldsTogether.MOD_ID) || id.getNamespace().equals(BCLib.MOD_ID)) {
|
||||
info.setReturnValue(info.getReturnValue());
|
||||
}
|
||||
}
|
||||
// // Fabric force changes the directory path for all modded registries to be prefixed with the mod id.
|
||||
// // We do not want this for our BCL-Biome/Surface Rule Registry, so we remove the prefix here.
|
||||
// @Inject(method = "registryDirPath", at = @At("RETURN"), cancellable = true)
|
||||
// private static void bcl_prependDirectoryWithNamespace(ResourceLocation id, CallbackInfoReturnable<String> info) {
|
||||
// if (id.getNamespace().equals(WorldsTogether.MOD_ID) || id.getNamespace().equals(BCLib.MOD_ID)) {
|
||||
// info.setReturnValue(info.getReturnValue());
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"schemaVersion": 1,
|
||||
"id": "bclib",
|
||||
"version": "3.0.12",
|
||||
"version": "3.0.13",
|
||||
"name": "BCLib",
|
||||
"description": "A library for BetterX team mods",
|
||||
"authors": [
|
||||
|
@ -57,7 +57,7 @@
|
|||
"breaks": {
|
||||
"wunderlib": "<1.1.2",
|
||||
"emi": "<1.0.0",
|
||||
"fabric": ">=0.86"
|
||||
"fabric-api": "0.86.0"
|
||||
},
|
||||
"custom": {
|
||||
"bclib": {
|
||||
|
|
Loading…
Reference in a new issue