diff --git a/src/main/java/com/tterrag/registrate/builders/BlockBuilder.java b/src/main/java/com/tterrag/registrate/builders/BlockBuilder.java index e847170..f2fdb69 100644 --- a/src/main/java/com/tterrag/registrate/builders/BlockBuilder.java +++ b/src/main/java/com/tterrag/registrate/builders/BlockBuilder.java @@ -8,7 +8,6 @@ import com.tterrag.registrate.providers.*; import com.tterrag.registrate.providers.loot.RegistrateBlockLootTables; import com.tterrag.registrate.providers.loot.RegistrateLootTableProvider.LootType; -import com.tterrag.registrate.util.RegistrateDistExecutor; import com.tterrag.registrate.util.entry.BlockEntry; import com.tterrag.registrate.util.entry.RegistryEntry; import com.tterrag.registrate.util.nullness.*; diff --git a/src/main/java/com/tterrag/registrate/builders/FluidBuilder.java b/src/main/java/com/tterrag/registrate/builders/FluidBuilder.java index 53adf95..5976316 100644 --- a/src/main/java/com/tterrag/registrate/builders/FluidBuilder.java +++ b/src/main/java/com/tterrag/registrate/builders/FluidBuilder.java @@ -3,9 +3,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import java.util.Optional; import java.util.function.Supplier; -import java.util.function.ToIntFunction; import javax.annotation.Nullable; @@ -19,16 +17,13 @@ import com.tterrag.registrate.providers.ProviderType; import com.tterrag.registrate.providers.RegistrateLangProvider; import com.tterrag.registrate.providers.RegistrateTagsProvider; -import com.tterrag.registrate.util.RegistrateDistExecutor; import com.tterrag.registrate.util.entry.FluidEntry; import com.tterrag.registrate.util.entry.RegistryEntry; -import com.tterrag.registrate.util.nullness.NonNullBiConsumer; import com.tterrag.registrate.util.nullness.NonNullBiFunction; import com.tterrag.registrate.util.nullness.NonNullConsumer; import com.tterrag.registrate.util.nullness.NonNullFunction; import com.tterrag.registrate.util.nullness.NonNullSupplier; -import io.github.fabricators_of_create.porting_lib.common.util.Lazy; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap; @@ -36,12 +31,10 @@ import net.fabricmc.fabric.api.client.render.fluid.v1.SimpleFluidRenderHandler; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariantAttributeHandler; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariantAttributes; -import net.minecraft.Util; import net.minecraft.client.renderer.RenderType; import net.minecraft.core.registries.Registries; import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.TagKey; -import net.minecraft.world.inventory.InventoryMenu; import net.minecraft.world.item.BucketItem; import net.minecraft.world.item.Item; import net.minecraft.world.item.Items; @@ -49,15 +42,8 @@ import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.LiquidBlock; import net.minecraft.world.level.block.state.BlockBehaviour; -import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; -import javax.annotation.Nullable; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.function.Supplier; - public class FluidBuilder extends AbstractBuilder> { /** diff --git a/src/main/java/com/tterrag/registrate/builders/ItemBuilder.java b/src/main/java/com/tterrag/registrate/builders/ItemBuilder.java index f22c2e2..2a5d88c 100644 --- a/src/main/java/com/tterrag/registrate/builders/ItemBuilder.java +++ b/src/main/java/com/tterrag/registrate/builders/ItemBuilder.java @@ -10,7 +10,6 @@ import com.tterrag.registrate.fabric.EnvExecutor; import com.tterrag.registrate.providers.*; import com.tterrag.registrate.util.CreativeModeTabModifier; -import com.tterrag.registrate.util.RegistrateDistExecutor; import com.tterrag.registrate.util.entry.ItemEntry; import com.tterrag.registrate.util.entry.RegistryEntry; import com.tterrag.registrate.util.nullness.NonNullBiConsumer; diff --git a/src/main/java/com/tterrag/registrate/providers/RegistrateDatapackProvider.java b/src/main/java/com/tterrag/registrate/providers/RegistrateDatapackProvider.java deleted file mode 100644 index c21cef7..0000000 --- a/src/main/java/com/tterrag/registrate/providers/RegistrateDatapackProvider.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.tterrag.registrate.providers; - -import com.tterrag.registrate.AbstractRegistrate; -import net.minecraft.core.HolderLookup; -import net.minecraft.data.PackOutput; -import net.minecraft.data.registries.RegistryPatchGenerator; -import net.neoforged.fml.LogicalSide; -import net.neoforged.neoforge.common.data.DatapackBuiltinEntriesProvider; - -import java.util.Set; -import java.util.concurrent.CompletableFuture; - -public class RegistrateDatapackProvider extends DatapackBuiltinEntriesProvider implements RegistrateLookupFillerProvider { - - public RegistrateDatapackProvider(AbstractRegistrate parent, PackOutput output, CompletableFuture provider) { - super(output, RegistryPatchGenerator.createLookup(provider, parent.getDataGenInitializer().getDatapackRegistryProviders()), Set.of(parent.getModid())); - } - - @Override - public CompletableFuture getFilledProvider() { - return getRegistryProvider(); - } - - @Override - public LogicalSide getSide() { - return LogicalSide.SERVER; - } - -} diff --git a/src/main/java/com/tterrag/registrate/providers/loot/RegistrateBlockLootTables.java b/src/main/java/com/tterrag/registrate/providers/loot/RegistrateBlockLootTables.java index 0878426..319ba62 100644 --- a/src/main/java/com/tterrag/registrate/providers/loot/RegistrateBlockLootTables.java +++ b/src/main/java/com/tterrag/registrate/providers/loot/RegistrateBlockLootTables.java @@ -85,16 +85,6 @@ public HolderLookup.Provider getRegistries() { @Generated(value = "com.tterrag.registrate.test.meta.UpdateBlockLootTables", date = "Tue, 18 Jun 2024 17:52:52 GMT") public LootTable.Builder createSingleItemTableWithSilkTouch(Block p_251449_, ItemLike p_248558_, NumberProvider p_250047_) { return super.createSingleItemTableWithSilkTouch(p_251449_, p_248558_, p_250047_); } - /** Generated override to expose protected method: {@link BlockLootSubProvider#createSilkTouchOnlyTable} */ - @Override - @Generated(value = "com.tterrag.registrate.test.meta.UpdateBlockLootTables", date = "Tue, 18 Jun 2024 17:52:52 GMT") - public LootTable.Builder createSilkTouchOnlyTable(ItemLike p_252216_) { return super.createSilkTouchOnlyTable(p_252216_); } - - /** Generated override to expose protected method: {@link BlockLootSubProvider#createPotFlowerItemTable} */ - @Override - @Generated(value = "com.tterrag.registrate.test.meta.UpdateBlockLootTables", date = "Tue, 18 Jun 2024 17:52:52 GMT") - public LootTable.Builder createPotFlowerItemTable(ItemLike p_249395_) { return super.createPotFlowerItemTable(p_249395_); } - /** Generated override to expose protected method: {@link BlockLootSubProvider#createSlabItemTable} */ @Override @Generated(value = "com.tterrag.registrate.test.meta.UpdateBlockLootTables", date = "Tue, 18 Jun 2024 17:52:52 GMT") diff --git a/src/main/java/com/tterrag/registrate/util/RegistrateDistExecutor.java b/src/main/java/com/tterrag/registrate/util/RegistrateDistExecutor.java deleted file mode 100644 index 167a0d1..0000000 --- a/src/main/java/com/tterrag/registrate/util/RegistrateDistExecutor.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.tterrag.registrate.util; - -import net.neoforged.api.distmarker.Dist; -import net.neoforged.fml.loading.FMLEnvironment; - -import java.util.function.Supplier; - -public class RegistrateDistExecutor { - public static void unsafeRunWhenOn(Dist dist, Supplier toRun) { - if (dist == FMLEnvironment.dist) { - toRun.get().run(); - } - } -}