Skip to content

Commit

Permalink
switch to porting lib deferred holder
Browse files Browse the repository at this point in the history
  • Loading branch information
IThundxr committed Sep 29, 2024
1 parent e38a60a commit 266b26f
Show file tree
Hide file tree
Showing 25 changed files with 34 additions and 379 deletions.
11 changes: 6 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//file:noinspection GroovyAssignabilityCheck
//file:noinspection GroovyAccessibility
plugins {
id "fabric-loom" version "1.6.+"
id "fabric-loom" version "1.7.+"
id "io.freefair.lombok" version "8.10"
id "maven-publish"
}
Expand Down Expand Up @@ -34,11 +34,12 @@ dependencies {

modImplementation("net.fabricmc.fabric-api:fabric-api:${project.fabric_version}")
modApi(include(fabricApi.module("fabric-data-generation-api-v1", project.fabric_version))) // include datagen api
modApi(include("io.github.fabricators_of_create.Porting-Lib:tags:${project.porting_lib_version}")) { exclude(group: "io.vram") }
modApi(include("io.github.fabricators_of_create.Porting-Lib:models:${project.porting_lib_version}")) { exclude(group: "io.vram") }
modApi(include("io.github.fabricators_of_create.Porting-Lib:data:${project.porting_lib_version}")) { exclude(group: "io.vram") }

compileOnly("org.projectlombok:lombok:1.18.34")
for (String module in porting_lib_modules.split(",")) {
modApi(include("io.github.fabricators_of_create.Porting-Lib:$module:$porting_lib_version")) { exclude(group: "io.vram") }
}

compileOnly(annotationProcessor("org.projectlombok:lombok:1.18.34"))

implementation(include("com.google.code.findbugs:jsr305:3.0.2"))
implementation("javax.annotation:javax.annotation-api:1.3.2")
Expand Down
4 changes: 3 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ mod_version = 1.3.<patch>
minecraft_version = 1.21.1
loader_version = 0.16.5
fabric_version = 0.104.0+1.21.1
porting_lib_version = 3.1.0-beta-beta.35+1.21

porting_lib_version = 3.1.0-beta.39+1.21.1
porting_lib_modules = tags,models,data,lazy_registration

# Mappings
# https://parchmentmc.org/docs/getting-started
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import com.tterrag.registrate.builders.MenuBuilder.ForgeMenuFactory;
import com.tterrag.registrate.builders.MenuBuilder.MenuFactory;
import com.tterrag.registrate.builders.MenuBuilder.ScreenFactory;
import com.tterrag.registrate.fabric.DeferredHolder;
import com.tterrag.registrate.fabric.RegistryUtil;
import com.tterrag.registrate.fabric.SimpleFlowableFluid;
import com.tterrag.registrate.providers.ProviderType;
Expand All @@ -33,6 +32,7 @@
import com.google.common.collect.Multimap;
import com.google.common.collect.Table;
import com.tterrag.registrate.providers.*;
import io.github.fabricators_of_create.porting_lib.util.DeferredHolder;
import net.minecraft.Util;
import net.minecraft.client.gui.screens.Screen;
import net.minecraft.client.gui.screens.inventory.MenuAccess;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import com.google.common.collect.HashMultimap;
import com.google.common.collect.Multimap;
import com.tterrag.registrate.AbstractRegistrate;
import com.tterrag.registrate.fabric.DeferredHolder;
import com.tterrag.registrate.providers.ProviderType;
import com.tterrag.registrate.providers.RegistrateLangProvider;
import com.tterrag.registrate.providers.RegistrateTagsProvider;
Expand All @@ -13,6 +12,7 @@
import com.tterrag.registrate.util.nullness.NonNullFunction;
import com.tterrag.registrate.util.nullness.NonNullSupplier;
import com.tterrag.registrate.util.nullness.NonnullType;
import io.github.fabricators_of_create.porting_lib.util.DeferredHolder;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import com.google.gson.JsonElement;
import com.tterrag.registrate.AbstractRegistrate;
import com.tterrag.registrate.builders.BlockEntityBuilder.BlockEntityFactory;
import com.tterrag.registrate.fabric.DeferredHolder;
import com.tterrag.registrate.fabric.EnvExecutor;
import com.tterrag.registrate.providers.*;
import com.tterrag.registrate.providers.loot.RegistrateBlockLootTables;
Expand All @@ -12,6 +11,7 @@
import com.tterrag.registrate.util.entry.RegistryEntry;
import com.tterrag.registrate.util.nullness.*;
import io.github.fabricators_of_create.porting_lib.models.generators.BlockStateProvider;
import io.github.fabricators_of_create.porting_lib.util.DeferredHolder;
import net.fabricmc.api.EnvType;
import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap;
import net.fabricmc.fabric.api.client.rendering.v1.ColorProviderRegistry;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
import java.util.function.Function;

import com.tterrag.registrate.AbstractRegistrate;
import com.tterrag.registrate.fabric.DeferredHolder;
import com.tterrag.registrate.fabric.EnvExecutor;
import com.tterrag.registrate.mixin.accessor.BlockEntityRenderersAccessor;
import com.tterrag.registrate.util.entry.BlockEntityEntry;
import com.tterrag.registrate.util.entry.RegistryEntry;
import com.tterrag.registrate.util.nullness.NonNullFunction;
import com.tterrag.registrate.util.nullness.NonNullSupplier;
import io.github.fabricators_of_create.porting_lib.util.DeferredHolder;
import net.fabricmc.api.EnvType;
import org.jetbrains.annotations.Nullable;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/tterrag/registrate/builders/Builder.java
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ default <R2, T2 extends R2, P2, S2 extends Builder<R2, T2, P2, S2>> S2 transform
}

/**
* Register the entry and return the parent object. The {@link com.tterrag.registrate.fabric.DeferredHolder} will be created but not returned. It can be retrieved later with {@link AbstractRegistrate#get(ResourceKey)} or
* Register the entry and return the parent object. The {@link io.github.fabricators_of_create.porting_lib.util.DeferredHolder} will be created but not returned. It can be retrieved later with {@link AbstractRegistrate#get(ResourceKey)} or
* {@link AbstractRegistrate#get(String, ResourceKey)}.
*
* @return the parent object
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.tterrag.registrate.builders;

import com.tterrag.registrate.AbstractRegistrate;
import com.tterrag.registrate.fabric.DeferredHolder;
import com.tterrag.registrate.util.entry.RegistryEntry;
import com.tterrag.registrate.util.nullness.NonNullFunction;
import com.tterrag.registrate.util.nullness.NonNullSupplier;

import io.github.fabricators_of_create.porting_lib.util.DeferredHolder;
import net.minecraft.core.Registry;
import net.minecraft.resources.ResourceKey;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import java.util.function.Supplier;

import com.tterrag.registrate.AbstractRegistrate;
import com.tterrag.registrate.fabric.DeferredHolder;
import com.tterrag.registrate.fabric.EnvExecutor;
import com.tterrag.registrate.mixin.accessor.SpawnPlacementsAccessor;
import com.tterrag.registrate.providers.DataGenContext;
Expand All @@ -18,6 +17,7 @@
import com.tterrag.registrate.util.nullness.NonNullFunction;
import com.tterrag.registrate.util.nullness.NonNullSupplier;

import io.github.fabricators_of_create.porting_lib.util.DeferredHolder;
import net.minecraft.client.renderer.entity.EntityRenderer;
import net.minecraft.client.renderer.entity.EntityRendererProvider;
import net.minecraft.core.registries.Registries;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import com.google.common.annotations.Beta;
import com.google.common.base.Preconditions;
import com.tterrag.registrate.AbstractRegistrate;
import com.tterrag.registrate.fabric.DeferredHolder;
import com.tterrag.registrate.fabric.EnvExecutor;
import com.tterrag.registrate.fabric.FluidHelper;
import com.tterrag.registrate.fabric.SimpleFlowableFluid;
Expand All @@ -24,6 +23,7 @@
import com.tterrag.registrate.util.nullness.NonNullFunction;
import com.tterrag.registrate.util.nullness.NonNullSupplier;

import io.github.fabricators_of_create.porting_lib.util.DeferredHolder;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

import com.google.common.collect.Maps;
import com.tterrag.registrate.AbstractRegistrate;
import com.tterrag.registrate.fabric.DeferredHolder;
import com.tterrag.registrate.fabric.EnvExecutor;
import com.tterrag.registrate.providers.*;
import com.tterrag.registrate.util.CreativeModeTabModifier;
Expand All @@ -16,6 +15,7 @@
import com.tterrag.registrate.util.nullness.NonNullFunction;
import com.tterrag.registrate.util.nullness.NonNullSupplier;
import com.tterrag.registrate.util.nullness.NonNullUnaryOperator;
import io.github.fabricators_of_create.porting_lib.util.DeferredHolder;
import net.fabricmc.api.EnvType;
import net.fabricmc.fabric.api.client.rendering.v1.ColorProviderRegistry;
import net.fabricmc.fabric.api.registry.CompostingChanceRegistry;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.tterrag.registrate.builders;

import com.tterrag.registrate.AbstractRegistrate;
import com.tterrag.registrate.fabric.DeferredHolder;
import com.tterrag.registrate.fabric.EnvExecutor;
import com.tterrag.registrate.util.entry.MenuEntry;
import com.tterrag.registrate.util.entry.RegistryEntry;
import com.tterrag.registrate.util.nullness.NonNullSupplier;
import com.tterrag.registrate.util.nullness.NonnullType;

import io.github.fabricators_of_create.porting_lib.util.DeferredHolder;
import net.fabricmc.fabric.api.screenhandler.v1.ExtendedScreenHandlerType;
import net.minecraft.client.gui.screens.MenuScreens;
import net.minecraft.client.gui.screens.Screen;
Expand Down
Loading

0 comments on commit 266b26f

Please sign in to comment.