diff --git a/src/main/java/org/violetmoon/zeta/advancement/AdvancementModifierRegistry.java b/src/main/java/org/violetmoon/zeta/advancement/AdvancementModifierRegistry.java index c0e680d..559b296 100644 --- a/src/main/java/org/violetmoon/zeta/advancement/AdvancementModifierRegistry.java +++ b/src/main/java/org/violetmoon/zeta/advancement/AdvancementModifierRegistry.java @@ -26,7 +26,6 @@ import com.google.common.collect.HashMultimap; import com.google.common.collect.Multimap; -import net.minecraft.advancements.Advancement; import net.minecraft.advancements.CriteriaTriggers; import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; diff --git a/src/main/java/org/violetmoon/zeta/advancement/ManualTrigger.java b/src/main/java/org/violetmoon/zeta/advancement/ManualTrigger.java index f6c9d80..207eb9a 100644 --- a/src/main/java/org/violetmoon/zeta/advancement/ManualTrigger.java +++ b/src/main/java/org/violetmoon/zeta/advancement/ManualTrigger.java @@ -1,9 +1,6 @@ package org.violetmoon.zeta.advancement; import com.mojang.serialization.Codec; -import org.jetbrains.annotations.NotNull; - -import com.google.gson.JsonObject; import net.minecraft.advancements.critereon.ContextAwarePredicate; import net.minecraft.advancements.critereon.SimpleCriterionTrigger; diff --git a/src/main/java/org/violetmoon/zeta/advancement/MutableAdvancement.java b/src/main/java/org/violetmoon/zeta/advancement/MutableAdvancement.java index db5a592..49f0f8f 100644 --- a/src/main/java/org/violetmoon/zeta/advancement/MutableAdvancement.java +++ b/src/main/java/org/violetmoon/zeta/advancement/MutableAdvancement.java @@ -49,7 +49,6 @@ private void mutabilize() { } public void commit() { - // advancement.criteria = ImmutableMap.copyOf(criteria); Replace entirely? advancement.criteria().clear(); advancement.criteria().putAll(ImmutableMap.copyOf(criteria)); diff --git a/src/main/java/org/violetmoon/zeta/advancement/modifier/AdventuringTimeModifier.java b/src/main/java/org/violetmoon/zeta/advancement/modifier/AdventuringTimeModifier.java index a6593fe..2c5bf48 100644 --- a/src/main/java/org/violetmoon/zeta/advancement/modifier/AdventuringTimeModifier.java +++ b/src/main/java/org/violetmoon/zeta/advancement/modifier/AdventuringTimeModifier.java @@ -2,18 +2,12 @@ import java.util.Set; -import net.minecraft.core.HolderLookup; -import net.minecraft.core.RegistryAccess; -import net.minecraft.core.registries.Registries; import org.violetmoon.zeta.advancement.AdvancementModifier; import org.violetmoon.zeta.api.IMutableAdvancement; import org.violetmoon.zeta.module.ZetaModule; import com.google.common.collect.ImmutableSet; -import net.minecraft.advancements.Criterion; -import net.minecraft.advancements.critereon.LocationPredicate; -import net.minecraft.advancements.critereon.PlayerTrigger; import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.biome.Biome; diff --git a/src/main/java/org/violetmoon/zeta/advancement/modifier/FishyBusinessModifier.java b/src/main/java/org/violetmoon/zeta/advancement/modifier/FishyBusinessModifier.java index 1170bfd..cbee096 100644 --- a/src/main/java/org/violetmoon/zeta/advancement/modifier/FishyBusinessModifier.java +++ b/src/main/java/org/violetmoon/zeta/advancement/modifier/FishyBusinessModifier.java @@ -11,7 +11,6 @@ import com.google.common.collect.ImmutableSet; import net.minecraft.advancements.Criterion; -import net.minecraft.advancements.critereon.EntityPredicate; import net.minecraft.advancements.critereon.FishingRodHookedTrigger; import net.minecraft.advancements.critereon.ItemPredicate; import net.minecraft.core.registries.BuiltInRegistries; diff --git a/src/main/java/org/violetmoon/zeta/block/ext/IZetaBlockExtensions.java b/src/main/java/org/violetmoon/zeta/block/ext/IZetaBlockExtensions.java index a13c46f..b95591a 100644 --- a/src/main/java/org/violetmoon/zeta/block/ext/IZetaBlockExtensions.java +++ b/src/main/java/org/violetmoon/zeta/block/ext/IZetaBlockExtensions.java @@ -59,9 +59,7 @@ default SoundType getSoundTypeZeta(BlockState state, LevelReader level, BlockPos } default Integer getBeaconColorMultiplierZeta(BlockState state, LevelReader level, BlockPos pos, BlockPos beaconPos) { - if(state.getBlock() instanceof BeaconBeamBlock bbeam) - return bbeam.getColor().getTextureDiffuseColor(); - return null; + return state.getBlock() instanceof BeaconBeamBlock bbeam ? bbeam.getColor().getTextureDiffuseColor() : null; } default boolean isStickyBlockZeta(BlockState state) { diff --git a/src/main/java/org/violetmoon/zeta/capability/ZetaCapabilityManager.java b/src/main/java/org/violetmoon/zeta/capability/ZetaCapabilityManager.java index b6bc5ee..5a6ede6 100644 --- a/src/main/java/org/violetmoon/zeta/capability/ZetaCapabilityManager.java +++ b/src/main/java/org/violetmoon/zeta/capability/ZetaCapabilityManager.java @@ -1,12 +1,5 @@ package org.violetmoon.zeta.capability; -import org.jetbrains.annotations.Nullable; - -import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.level.Level; -import net.minecraft.world.level.block.entity.BlockEntity; - @Deprecated(forRemoval = true) public interface ZetaCapabilityManager { /** diff --git a/src/main/java/org/violetmoon/zeta/event/play/ZRecipeCrawl.java b/src/main/java/org/violetmoon/zeta/event/play/ZRecipeCrawl.java index a5d0abe..2913d32 100644 --- a/src/main/java/org/violetmoon/zeta/event/play/ZRecipeCrawl.java +++ b/src/main/java/org/violetmoon/zeta/event/play/ZRecipeCrawl.java @@ -10,7 +10,6 @@ import com.google.common.collect.Streams; import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.world.item.crafting.*; -import org.jetbrains.annotations.ApiStatus; import org.jetbrains.annotations.Nullable; import org.violetmoon.zeta.event.bus.IZetaPlayEvent; diff --git a/src/main/java/org/violetmoon/zeta/event/play/entity/ZEntityMobGriefing.java b/src/main/java/org/violetmoon/zeta/event/play/entity/ZEntityMobGriefing.java index 68bf70b..c6ac52b 100644 --- a/src/main/java/org/violetmoon/zeta/event/play/entity/ZEntityMobGriefing.java +++ b/src/main/java/org/violetmoon/zeta/event/play/entity/ZEntityMobGriefing.java @@ -1,7 +1,6 @@ package org.violetmoon.zeta.event.play.entity; import org.violetmoon.zeta.event.bus.IZetaPlayEvent; -import org.violetmoon.zeta.event.bus.Resultable; import net.minecraft.world.entity.Entity; diff --git a/src/main/java/org/violetmoon/zeta/event/play/entity/living/ZMobSpawnEvent.java b/src/main/java/org/violetmoon/zeta/event/play/entity/living/ZMobSpawnEvent.java index 0991066..b4f8732 100644 --- a/src/main/java/org/violetmoon/zeta/event/play/entity/living/ZMobSpawnEvent.java +++ b/src/main/java/org/violetmoon/zeta/event/play/entity/living/ZMobSpawnEvent.java @@ -1,7 +1,6 @@ package org.violetmoon.zeta.event.play.entity.living; import org.violetmoon.zeta.event.bus.IZetaPlayEvent; -import org.violetmoon.zeta.event.bus.Resultable; import net.minecraft.world.entity.Mob; import net.minecraft.world.entity.MobSpawnType; diff --git a/src/main/java/org/violetmoon/zeta/event/play/entity/living/ZSleepingLocationCheck.java b/src/main/java/org/violetmoon/zeta/event/play/entity/living/ZSleepingLocationCheck.java index 56c79dd..2137623 100644 --- a/src/main/java/org/violetmoon/zeta/event/play/entity/living/ZSleepingLocationCheck.java +++ b/src/main/java/org/violetmoon/zeta/event/play/entity/living/ZSleepingLocationCheck.java @@ -1,6 +1,5 @@ package org.violetmoon.zeta.event.play.entity.living; -import net.minecraft.world.entity.ai.behavior.SleepInBed; import org.violetmoon.zeta.event.bus.IZetaPlayEvent; import org.violetmoon.zeta.event.bus.Resultable; import org.violetmoon.zeta.event.bus.helpers.LivingGetter; diff --git a/src/main/java/org/violetmoon/zeta/event/play/entity/player/ZRightClickBlock.java b/src/main/java/org/violetmoon/zeta/event/play/entity/player/ZRightClickBlock.java index 948ea0c..6f171d9 100644 --- a/src/main/java/org/violetmoon/zeta/event/play/entity/player/ZRightClickBlock.java +++ b/src/main/java/org/violetmoon/zeta/event/play/entity/player/ZRightClickBlock.java @@ -3,8 +3,6 @@ import net.neoforged.neoforge.common.util.TriState; import org.violetmoon.zeta.event.bus.Cancellable; import org.violetmoon.zeta.event.bus.IZetaPlayEvent; -import org.violetmoon.zeta.event.bus.Resultable; -import org.violetmoon.zeta.event.bus.ZResult; import org.violetmoon.zeta.event.bus.helpers.PlayerGetter; import net.minecraft.core.BlockPos; diff --git a/src/main/java/org/violetmoon/zeta/event/play/loading/ZAttachCapabilities.java b/src/main/java/org/violetmoon/zeta/event/play/loading/ZAttachCapabilities.java index 50de962..534645b 100644 --- a/src/main/java/org/violetmoon/zeta/event/play/loading/ZAttachCapabilities.java +++ b/src/main/java/org/violetmoon/zeta/event/play/loading/ZAttachCapabilities.java @@ -1,11 +1,5 @@ package org.violetmoon.zeta.event.play.loading; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.level.Level; -import net.minecraft.world.level.block.entity.BlockEntity; -import net.neoforged.neoforge.capabilities.ICapabilityProvider; -import org.violetmoon.zeta.capability.ZetaCapability; import org.violetmoon.zeta.event.bus.IZetaPlayEvent; //todo: Capabilities are no more, only reason why this is deprecated vs removed is to double check if we need a replacement diff --git a/src/main/java/org/violetmoon/zeta/item/ZetaArmorItem.java b/src/main/java/org/violetmoon/zeta/item/ZetaArmorItem.java index 6d04107..f36c7bb 100644 --- a/src/main/java/org/violetmoon/zeta/item/ZetaArmorItem.java +++ b/src/main/java/org/violetmoon/zeta/item/ZetaArmorItem.java @@ -1,7 +1,6 @@ package org.violetmoon.zeta.item; import net.minecraft.core.Holder; -import org.checkerframework.checker.units.qual.A; import org.violetmoon.zeta.item.ext.IZetaItemExtensions; import net.minecraft.world.item.ArmorItem; diff --git a/src/main/java/org/violetmoon/zeta/item/ZetaMobBucketItem.java b/src/main/java/org/violetmoon/zeta/item/ZetaMobBucketItem.java index 82f1673..c69bd59 100644 --- a/src/main/java/org/violetmoon/zeta/item/ZetaMobBucketItem.java +++ b/src/main/java/org/violetmoon/zeta/item/ZetaMobBucketItem.java @@ -1,7 +1,6 @@ package org.violetmoon.zeta.item; import java.util.function.BooleanSupplier; -import java.util.function.Supplier; import org.jetbrains.annotations.Nullable; import org.violetmoon.zeta.module.ZetaModule; diff --git a/src/main/java/org/violetmoon/zeta/recipe/FlagIngredient.java b/src/main/java/org/violetmoon/zeta/recipe/FlagIngredient.java index 171a6a2..5723cbc 100644 --- a/src/main/java/org/violetmoon/zeta/recipe/FlagIngredient.java +++ b/src/main/java/org/violetmoon/zeta/recipe/FlagIngredient.java @@ -11,8 +11,6 @@ import com.google.gson.JsonObject; -import it.unimi.dsi.fastutil.ints.IntList; -import it.unimi.dsi.fastutil.ints.IntLists; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.crafting.Ingredient; diff --git a/src/main/java/org/violetmoon/zeta/recipe/IZetaIngredientSerializer.java b/src/main/java/org/violetmoon/zeta/recipe/IZetaIngredientSerializer.java index 3409480..fc29d9f 100644 --- a/src/main/java/org/violetmoon/zeta/recipe/IZetaIngredientSerializer.java +++ b/src/main/java/org/violetmoon/zeta/recipe/IZetaIngredientSerializer.java @@ -7,7 +7,6 @@ import net.minecraft.network.FriendlyByteBuf; import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.item.crafting.Ingredient; // Copy of Forge IIngredientSerializer public interface IZetaIngredientSerializer { diff --git a/src/main/java/org/violetmoon/zeta/recipe/ZetaDyeRecipe.java b/src/main/java/org/violetmoon/zeta/recipe/ZetaDyeRecipe.java index 1c39b64..3141b7d 100644 --- a/src/main/java/org/violetmoon/zeta/recipe/ZetaDyeRecipe.java +++ b/src/main/java/org/violetmoon/zeta/recipe/ZetaDyeRecipe.java @@ -9,9 +9,6 @@ import com.google.common.collect.Lists; -import net.minecraft.core.RegistryAccess; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.inventory.CraftingContainer; import net.minecraft.world.item.DyeItem; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; diff --git a/src/main/java/org/violetmoon/zeta/registry/BrewingRegistry.java b/src/main/java/org/violetmoon/zeta/registry/BrewingRegistry.java index 3ccd74c..a0c4562 100644 --- a/src/main/java/org/violetmoon/zeta/registry/BrewingRegistry.java +++ b/src/main/java/org/violetmoon/zeta/registry/BrewingRegistry.java @@ -1,13 +1,11 @@ package org.violetmoon.zeta.registry; import java.util.Map; -import java.util.function.Supplier; import net.minecraft.core.Holder; import net.minecraft.world.item.Item; import org.jetbrains.annotations.Nullable; import org.violetmoon.zeta.Zeta; -import org.violetmoon.zeta.recipe.FlagIngredient; import com.google.common.collect.Maps; @@ -19,7 +17,6 @@ import net.minecraft.world.item.Items; import net.minecraft.world.item.alchemy.Potion; import net.minecraft.world.item.alchemy.Potions; -import net.minecraft.world.item.crafting.Ingredient; /** * @author WireSegal diff --git a/src/main/java/org/violetmoon/zeta/util/MiscUtil.java b/src/main/java/org/violetmoon/zeta/util/MiscUtil.java index 44b8dea..41bce3e 100644 --- a/src/main/java/org/violetmoon/zeta/util/MiscUtil.java +++ b/src/main/java/org/violetmoon/zeta/util/MiscUtil.java @@ -13,7 +13,6 @@ import net.minecraft.server.level.ServerLevel; import net.minecraft.util.RandomSource; import net.minecraft.world.Container; -import net.minecraft.world.InteractionHand; import net.minecraft.world.WorldlyContainer; import net.minecraft.world.WorldlyContainerHolder; import net.minecraft.world.entity.EntityType; @@ -39,7 +38,6 @@ import net.minecraft.world.phys.Vec3; import net.neoforged.neoforge.items.IItemHandler; import net.neoforged.neoforge.items.ItemHandlerHelper; -import net.neoforged.neoforge.items.ItemStackHandler; import net.neoforged.neoforge.items.wrapper.InvWrapper; import net.neoforged.neoforge.items.wrapper.SidedInvWrapper; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/org/violetmoon/zeta/world/PassthroughTreeGrower.java b/src/main/java/org/violetmoon/zeta/world/PassthroughTreeGrower.java deleted file mode 100644 index 595e2be..0000000 --- a/src/main/java/org/violetmoon/zeta/world/PassthroughTreeGrower.java +++ /dev/null @@ -1,46 +0,0 @@ -package org.violetmoon.zeta.world; - -import org.jetbrains.annotations.Nullable; - -import net.minecraft.resources.ResourceKey; -import net.minecraft.util.RandomSource; -import net.minecraft.world.level.block.grower.AbstractMegaTreeGrower; -import net.minecraft.world.level.block.grower.AbstractTreeGrower; -import net.minecraft.world.level.levelgen.feature.ConfiguredFeature; - -// All the vanilla TreeGrowers just hardcode ResourceKeys anyway. -public class PassthroughTreeGrower extends AbstractTreeGrower { - protected final ResourceKey> key; - - public PassthroughTreeGrower(ResourceKey> key) { - this.key = key; - } - - @Nullable - @Override - protected ResourceKey> getConfiguredFeature(RandomSource random, boolean flowers) { - return key; - } - - public static class Mega extends AbstractMegaTreeGrower { - protected final ResourceKey> key; - protected final ResourceKey> megaKey; // 2x2 - - public Mega(ResourceKey> key, ResourceKey> megaKey) { - this.key = key; - this.megaKey = megaKey; - } - - @Nullable - @Override - protected ResourceKey> getConfiguredFeature(RandomSource p_222910_, boolean p_222911_) { - return key; - } - - @Nullable - @Override - protected ResourceKey> getConfiguredMegaFeature(RandomSource p_222904_) { - return megaKey; - } - } -} diff --git a/src/main/java/org/violetmoon/zetaimplforge/ForgeZeta.java b/src/main/java/org/violetmoon/zetaimplforge/ForgeZeta.java index 1c4e678..119a7df 100644 --- a/src/main/java/org/violetmoon/zetaimplforge/ForgeZeta.java +++ b/src/main/java/org/violetmoon/zetaimplforge/ForgeZeta.java @@ -74,8 +74,12 @@ * ideally do not touch quark from this package, it will later be split off */ public class ForgeZeta extends Zeta { - public ForgeZeta(String modid, Logger log) { + + public final IEventBus bus; // Temporary; move ForgeZetaRegistry#onRegisterEvent() into start? + + public ForgeZeta(String modid, Logger log, IEventBus bus) { super(modid, log, ZetaSide.fromClient(FMLEnvironment.dist.isClient())); + this.bus = bus; } @Override @@ -103,7 +107,7 @@ public IZetaConfigInternals makeConfigInternals(SectionDefinition rootSection) { @Override public ZetaRegistry createRegistry() { - return new ForgeZetaRegistry(this); + return new ForgeZetaRegistry(this, bus); } @Override diff --git a/src/main/java/org/violetmoon/zetaimplforge/client/ForgeZetaClient.java b/src/main/java/org/violetmoon/zetaimplforge/client/ForgeZetaClient.java index e7cf971..d06cfe5 100644 --- a/src/main/java/org/violetmoon/zetaimplforge/client/ForgeZetaClient.java +++ b/src/main/java/org/violetmoon/zetaimplforge/client/ForgeZetaClient.java @@ -8,7 +8,6 @@ import net.minecraft.client.multiplayer.ClientPacketListener; import net.minecraft.client.renderer.BlockEntityWithoutLevelRenderer; import net.minecraft.core.RegistryAccess; -import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.world.item.Item; import net.minecraft.world.level.ItemLike; import net.minecraft.world.level.block.Block; @@ -19,7 +18,6 @@ import net.neoforged.neoforge.client.event.*; import net.neoforged.neoforge.client.gui.VanillaGuiLayers; import net.neoforged.neoforge.common.NeoForge; -import net.neoforged.neoforge.registries.NeoForgeRegistries; import net.neoforged.neoforge.server.ServerLifecycleHooks; import org.jetbrains.annotations.Nullable; import org.violetmoon.zeta.Zeta; diff --git a/src/main/java/org/violetmoon/zetaimplforge/event/play/entity/ForgeZEntityMobGriefing.java b/src/main/java/org/violetmoon/zetaimplforge/event/play/entity/ForgeZEntityMobGriefing.java index 70d5722..5d6c21e 100644 --- a/src/main/java/org/violetmoon/zetaimplforge/event/play/entity/ForgeZEntityMobGriefing.java +++ b/src/main/java/org/violetmoon/zetaimplforge/event/play/entity/ForgeZEntityMobGriefing.java @@ -2,9 +2,7 @@ import net.minecraft.world.entity.Entity; import net.neoforged.neoforge.event.entity.EntityMobGriefingEvent; -import org.violetmoon.zeta.event.bus.ZResult; import org.violetmoon.zeta.event.play.entity.ZEntityMobGriefing; -import org.violetmoon.zetaimplforge.ForgeZeta; public class ForgeZEntityMobGriefing implements ZEntityMobGriefing { private final EntityMobGriefingEvent e; diff --git a/src/main/java/org/violetmoon/zetaimplforge/event/play/entity/living/ForgeZMobSpawnEvent.java b/src/main/java/org/violetmoon/zetaimplforge/event/play/entity/living/ForgeZMobSpawnEvent.java index 6e1f3c2..e653c34 100644 --- a/src/main/java/org/violetmoon/zetaimplforge/event/play/entity/living/ForgeZMobSpawnEvent.java +++ b/src/main/java/org/violetmoon/zetaimplforge/event/play/entity/living/ForgeZMobSpawnEvent.java @@ -1,13 +1,9 @@ package org.violetmoon.zetaimplforge.event.play.entity.living; import net.minecraft.world.entity.Mob; -import net.minecraft.world.entity.MobSpawnType; -import net.minecraft.world.level.BaseSpawner; import net.minecraft.world.level.ServerLevelAccessor; import net.neoforged.neoforge.event.entity.living.MobSpawnEvent; -import org.violetmoon.zeta.event.bus.ZResult; import org.violetmoon.zeta.event.play.entity.living.ZMobSpawnEvent; -import org.violetmoon.zetaimplforge.ForgeZeta; public class ForgeZMobSpawnEvent implements ZMobSpawnEvent { private final MobSpawnEvent e; diff --git a/src/main/java/org/violetmoon/zetaimplforge/event/play/entity/player/ForgeZRightClickBlock.java b/src/main/java/org/violetmoon/zetaimplforge/event/play/entity/player/ForgeZRightClickBlock.java index 509a2fd..f301db1 100644 --- a/src/main/java/org/violetmoon/zetaimplforge/event/play/entity/player/ForgeZRightClickBlock.java +++ b/src/main/java/org/violetmoon/zetaimplforge/event/play/entity/player/ForgeZRightClickBlock.java @@ -10,9 +10,7 @@ import net.minecraft.world.phys.BlockHitResult; import net.neoforged.neoforge.common.util.TriState; import net.neoforged.neoforge.event.entity.player.PlayerInteractEvent; -import org.violetmoon.zeta.event.bus.ZResult; import org.violetmoon.zeta.event.play.entity.player.ZRightClickBlock; -import org.violetmoon.zetaimplforge.ForgeZeta; public class ForgeZRightClickBlock implements ZRightClickBlock { diff --git a/src/main/java/org/violetmoon/zetaimplforge/mixin/mixins/client/AccessorBlockColors.java b/src/main/java/org/violetmoon/zetaimplforge/mixin/mixins/client/AccessorBlockColors.java index bf54945..9892450 100644 --- a/src/main/java/org/violetmoon/zetaimplforge/mixin/mixins/client/AccessorBlockColors.java +++ b/src/main/java/org/violetmoon/zetaimplforge/mixin/mixins/client/AccessorBlockColors.java @@ -7,7 +7,6 @@ import net.minecraft.client.color.block.BlockColor; import net.minecraft.client.color.block.BlockColors; -import net.minecraft.core.Holder.Reference; import net.minecraft.world.level.block.Block; @Mixin(BlockColors.class) diff --git a/src/main/java/org/violetmoon/zetaimplforge/mixin/mixins/client/AccessorItemColors.java b/src/main/java/org/violetmoon/zetaimplforge/mixin/mixins/client/AccessorItemColors.java index 51fa0e9..d9504a9 100644 --- a/src/main/java/org/violetmoon/zetaimplforge/mixin/mixins/client/AccessorItemColors.java +++ b/src/main/java/org/violetmoon/zetaimplforge/mixin/mixins/client/AccessorItemColors.java @@ -7,7 +7,6 @@ import net.minecraft.client.color.item.ItemColor; import net.minecraft.client.color.item.ItemColors; -import net.minecraft.core.Holder.Reference; import net.minecraft.world.item.Item; @Mixin(ItemColors.class) diff --git a/src/main/java/org/violetmoon/zetaimplforge/mixin/mixins/self/IZetaBlockMixin_FAKE.java b/src/main/java/org/violetmoon/zetaimplforge/mixin/mixins/self/IZetaBlockMixin_FAKE.java index 2c00af1..32dfc05 100644 --- a/src/main/java/org/violetmoon/zetaimplforge/mixin/mixins/self/IZetaBlockMixin_FAKE.java +++ b/src/main/java/org/violetmoon/zetaimplforge/mixin/mixins/self/IZetaBlockMixin_FAKE.java @@ -19,8 +19,6 @@ import org.violetmoon.zeta.block.*; import org.violetmoon.zeta.block.ext.IZetaBlockExtensions; -import java.util.Locale; - // Forge can't actually mixin to interfaces, so we fake it by just... mixing in to everyone inheriting the interface. @Mixin({ ZetaBlock.class, diff --git a/src/main/java/org/violetmoon/zetaimplforge/mod/ZetaForgeMod.java b/src/main/java/org/violetmoon/zetaimplforge/mod/ZetaForgeMod.java index 08a0342..d7e3f25 100644 --- a/src/main/java/org/violetmoon/zetaimplforge/mod/ZetaForgeMod.java +++ b/src/main/java/org/violetmoon/zetaimplforge/mod/ZetaForgeMod.java @@ -20,7 +20,7 @@ public class ZetaForgeMod { public ZetaForgeMod(IEventBus bus) { - ForgeZeta zeta = new ForgeZeta(Zeta.ZETA_ID, LogManager.getLogger(Zeta.ZETA_ID + "-internal")); + ForgeZeta zeta = new ForgeZeta(Zeta.ZETA_ID, LogManager.getLogger(Zeta.ZETA_ID + "-internal"), bus); ZetaModProxy proxy = Env.unsafeRunForDist(() -> ZetaClientProxy::new, () -> ZetaModProxy::new); Object zetaClient = Env.unsafeRunForDist(() -> () -> new ForgeZetaClient(zeta), () -> Object::new); @@ -37,5 +37,4 @@ public ZetaForgeMod(IEventBus bus) { public void setup(FMLCommonSetupEvent event) { event.enqueueWork(ConfigEventDispatcher::dispatchAllInitialLoads); } - } diff --git a/src/main/java/org/violetmoon/zetaimplforge/registry/ForgeBrewingRegistry.java b/src/main/java/org/violetmoon/zetaimplforge/registry/ForgeBrewingRegistry.java index f6db9c8..6a0cd08 100644 --- a/src/main/java/org/violetmoon/zetaimplforge/registry/ForgeBrewingRegistry.java +++ b/src/main/java/org/violetmoon/zetaimplforge/registry/ForgeBrewingRegistry.java @@ -5,16 +5,13 @@ import net.minecraft.world.item.Item; import net.minecraft.world.item.alchemy.Potion; import net.minecraft.world.item.alchemy.PotionBrewing; -import net.minecraft.world.item.crafting.Ingredient; import org.violetmoon.zeta.event.bus.LoadEvent; import org.violetmoon.zeta.event.load.ZCommonSetup; import org.violetmoon.zeta.registry.BrewingRegistry; import org.violetmoon.zetaimplforge.ForgeZeta; -import org.violetmoon.zetaimplforge.mixin.mixins.AccessorPotionBrewing; import java.util.ArrayList; import java.util.List; -import java.util.function.Supplier; public class ForgeBrewingRegistry extends BrewingRegistry { public ForgeBrewingRegistry(ForgeZeta zeta) { diff --git a/src/main/java/org/violetmoon/zetaimplforge/registry/ForgeZetaRegistry.java b/src/main/java/org/violetmoon/zetaimplforge/registry/ForgeZetaRegistry.java index f91dcd2..6848c52 100644 --- a/src/main/java/org/violetmoon/zetaimplforge/registry/ForgeZetaRegistry.java +++ b/src/main/java/org/violetmoon/zetaimplforge/registry/ForgeZetaRegistry.java @@ -3,6 +3,7 @@ import net.minecraft.core.Registry; import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; +import net.neoforged.bus.api.IEventBus; import net.neoforged.neoforge.registries.RegisterEvent; import org.violetmoon.zeta.registry.ZetaRegistry; import org.violetmoon.zetaimplforge.ForgeZeta; @@ -11,9 +12,10 @@ import java.util.function.Supplier; public class ForgeZetaRegistry extends ZetaRegistry { - public ForgeZetaRegistry(ForgeZeta z) { + + public ForgeZetaRegistry(ForgeZeta z, IEventBus bus) { super(z); - FMLJavaModLoadingContext.get().getModEventBus().addListener(this::onRegisterEvent); // TODO: Is there a reason we can't do this in ForgeZeta#start? + bus.addListener(this::onRegisterEvent); // Temporary; move ForgeZetaRegistry#onRegisterEvent() into start? } private void onRegisterEvent(RegisterEvent event) {