Revert "[Change] Build against FAPI 0.86"

This reverts commit 3ede6a4ce0.
This commit is contained in:
Frank 2023-07-23 09:39:56 +02:00
parent 3ede6a4ce0
commit 2370d79006
3 changed files with 12 additions and 17 deletions

View file

@ -100,9 +100,7 @@ dependencies {
modCompileOnly "dev.emi:trinkets:${project.trinkets_version}" modCompileOnly "dev.emi:trinkets:${project.trinkets_version}"
modCompileOnly "dev.emi:emi-fabric:${emi_version}:api" modCompileOnly "dev.emi:emi-fabric:${emi_version}:api"
// modLocalRuntime("dev.emi:emi-fabric:${emi_version}") { modLocalRuntime "dev.emi:emi-fabric:${emi_version}"
// transitive = false
// }
if (local_wunderlib) { if (local_wunderlib) {
println "Using local WunderLib" println "Using local WunderLib"

View file

@ -4,7 +4,7 @@ org.gradle.jvmargs=-Xmx2G
# check these on https://fabricmc.net/versions.html # check these on https://fabricmc.net/versions.html
minecraft_version=1.20.1 minecraft_version=1.20.1
loader_version=0.14.21 loader_version=0.14.21
fabric_version=0.86.0+1.20.1 fabric_version=0.85.0+1.20.1
#Loom #Loom
loom_version=1.0-SNAPSHOT loom_version=1.0-SNAPSHOT
#Modrinth #Modrinth
@ -21,6 +21,6 @@ archives_base_name=better-end
patchouli_version=1.19-73-FABRIC patchouli_version=1.19-73-FABRIC
bclib_version=3.0.12 bclib_version=3.0.12
rei_version=12.0.622 rei_version=12.0.622
emi_version=1.0.12+1.20.1 emi_version=1.0.3+1.20
trinkets_version=3.7.0 trinkets_version=3.7.0
cca_version=5.2.1 cca_version=5.2.1

View file

@ -16,7 +16,7 @@ import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.level.Level; import net.minecraft.world.level.Level;
import net.fabricmc.api.ClientModInitializer; import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.model.loading.v1.ModelLoadingPlugin; import net.fabricmc.fabric.api.client.model.ModelLoadingRegistry;
import net.fabricmc.fabric.api.client.rendering.v1.DimensionRenderingRegistry; import net.fabricmc.fabric.api.client.rendering.v1.DimensionRenderingRegistry;
public class BetterEndClient implements ClientModInitializer { public class BetterEndClient implements ClientModInitializer {
@ -35,18 +35,15 @@ public class BetterEndClient implements ClientModInitializer {
ResourceLocation checkPlantId = new ResourceLocation("item/chorus_plant"); ResourceLocation checkPlantId = new ResourceLocation("item/chorus_plant");
ResourceLocation toLoadFlowerId = new ResourceLocation("betterend", "item/custom_chorus_flower"); ResourceLocation toLoadFlowerId = new ResourceLocation("betterend", "item/custom_chorus_flower");
ResourceLocation toLoadPlantId = new ResourceLocation("betterend", "item/custom_chorus_plant"); ResourceLocation toLoadPlantId = new ResourceLocation("betterend", "item/custom_chorus_plant");
ModelLoadingRegistry.INSTANCE.registerResourceProvider(manager -> (resourceId, context) -> {
ModelLoadingPlugin.register(pluginContext -> { if (GeneratorOptions.changeChorusPlant()) {
pluginContext.resolveModel().register((context) -> { if (resourceId.equals(checkFlowerId)) {
if (GeneratorOptions.changeChorusPlant()) { return context.loadModel(toLoadFlowerId);
if (context.id().equals(checkFlowerId)) { } else if (resourceId.equals(checkPlantId)) {
return context.getOrLoadModel(toLoadFlowerId); return context.loadModel(toLoadPlantId);
} else if (context.id().equals(checkPlantId)) {
return context.getOrLoadModel(toLoadPlantId);
}
} }
return null; }
}); return null;
}); });
if (ClientOptions.isCustomSky()) { if (ClientOptions.isCustomSky()) {