From ce2cb882ce5cfe84563b18a29231a4da8c090294 Mon Sep 17 00:00:00 2001 From: Adrian Siekierka Date: Fri, 14 Dec 2018 18:24:51 +0100 Subject: [PATCH] move impl-suffixed packages to impl/ --- .../fabricmc/fabric/events/ObjectBuilderEvent.java | 6 +++--- .../fabric/events/PlayerInteractionEvent.java | 14 +++++++------- .../net/fabricmc/fabric/events/ServerEvent.java | 6 ++---- .../java/net/fabricmc/fabric/events/TickEvent.java | 8 ++++---- .../fabric/events/client/ClientTickEvent.java | 4 ++-- .../fabricmc/fabric/events/client/SpriteEvent.java | 4 ++-- .../FabricAPIInitializer.java} | 4 ++-- .../impl => impl/client/texture}/FabricSprite.java | 2 +- .../registry}/BootstrapBiomeRegistryListener.java | 2 +- .../registry}/BootstrapBlockRegistryListener.java | 2 +- .../registry}/BootstrapFluidRegistryListener.java | 2 +- .../registry}/BootstrapItemRegistryListener.java | 2 +- .../listeners => impl/registry}/IdListUpdater.java | 2 +- .../resources}/ModDataPackSupplier.java | 2 +- .../resources}/ModDirectoryResourcePack.java | 2 +- .../resources}/ModResourcePackUtil.java | 2 +- .../resources}/ModZipResourcePack.java | 2 +- .../util/HandlerArray.java} | 8 +++++--- .../client/texture/MixinSpriteAtlasTexture.java | 6 +++--- .../mixin/events/objectbuilder/MixinBlock.java | 4 ++-- .../mixin/events/objectbuilder/MixinItem.java | 4 ++-- .../MixinClientPlayerInteractionManager.java | 14 +++++++------- .../MixinServerPlayNetworkHandler.java | 4 ++-- .../playerinteraction/MixinServerPlayerEntity.java | 4 ++-- .../MixinServerPlayerInteractionManager.java | 8 ++++---- .../mixin/events/server/MixinMinecraftServer.java | 4 ++-- .../mixin/events/tick/MixinMinecraftServer.java | 3 --- .../fabric/mixin/events/tick/MixinWorld.java | 4 ---- .../fabric/mixin/registry/MixinBootstrap.java | 8 ++++---- .../mixin/registry/client/MixinBlockColorMap.java | 2 +- .../mixin/registry/client/MixinItemColorMap.java | 2 +- .../fabric/mixin/resources/MixinMinecraftGame.java | 2 +- .../mixin/resources/MixinMinecraftServer.java | 2 +- src/main/resources/{mod.json => fabric.mod.json} | 2 +- 34 files changed, 70 insertions(+), 77 deletions(-) rename src/main/java/net/fabricmc/fabric/{FabricAPI.java => impl/FabricAPIInitializer.java} (94%) rename src/main/java/net/fabricmc/fabric/{client/texture/impl => impl/client/texture}/FabricSprite.java (95%) rename src/main/java/net/fabricmc/fabric/{registry/impl/listeners => impl/registry}/BootstrapBiomeRegistryListener.java (96%) rename src/main/java/net/fabricmc/fabric/{registry/impl/listeners => impl/registry}/BootstrapBlockRegistryListener.java (96%) rename src/main/java/net/fabricmc/fabric/{registry/impl/listeners => impl/registry}/BootstrapFluidRegistryListener.java (96%) rename src/main/java/net/fabricmc/fabric/{registry/impl/listeners => impl/registry}/BootstrapItemRegistryListener.java (96%) rename src/main/java/net/fabricmc/fabric/{registry/impl/listeners => impl/registry}/IdListUpdater.java (97%) rename src/main/java/net/fabricmc/fabric/{resources/impl => impl/resources}/ModDataPackSupplier.java (97%) rename src/main/java/net/fabricmc/fabric/{resources/impl => impl/resources}/ModDirectoryResourcePack.java (97%) rename src/main/java/net/fabricmc/fabric/{resources/impl => impl/resources}/ModResourcePackUtil.java (98%) rename src/main/java/net/fabricmc/fabric/{resources/impl => impl/resources}/ModZipResourcePack.java (97%) rename src/main/java/net/fabricmc/fabric/{util/HandlerList.java => impl/util/HandlerArray.java} (87%) rename src/main/resources/{mod.json => fabric.mod.json} (87%) diff --git a/src/main/java/net/fabricmc/fabric/events/ObjectBuilderEvent.java b/src/main/java/net/fabricmc/fabric/events/ObjectBuilderEvent.java index c3c8dd2fc..a22a5de67 100644 --- a/src/main/java/net/fabricmc/fabric/events/ObjectBuilderEvent.java +++ b/src/main/java/net/fabricmc/fabric/events/ObjectBuilderEvent.java @@ -16,7 +16,7 @@ package net.fabricmc.fabric.events; -import net.fabricmc.fabric.util.HandlerList; +import net.fabricmc.fabric.impl.util.HandlerArray; import net.fabricmc.fabric.util.HandlerRegistry; import net.minecraft.block.Block; import net.minecraft.item.Item; @@ -29,8 +29,8 @@ import java.util.function.BiConsumer; * your own methods and transparently add the resulting information to a Map. */ public final class ObjectBuilderEvent { - public static final HandlerRegistry> BLOCK = new HandlerList<>(BiConsumer.class); - public static final HandlerRegistry> ITEM = new HandlerList<>(BiConsumer.class); + public static final HandlerRegistry> BLOCK = new HandlerArray<>(BiConsumer.class); + public static final HandlerRegistry> ITEM = new HandlerArray<>(BiConsumer.class); private ObjectBuilderEvent() { diff --git a/src/main/java/net/fabricmc/fabric/events/PlayerInteractionEvent.java b/src/main/java/net/fabricmc/fabric/events/PlayerInteractionEvent.java index 37bc227d5..5fbd5716b 100644 --- a/src/main/java/net/fabricmc/fabric/events/PlayerInteractionEvent.java +++ b/src/main/java/net/fabricmc/fabric/events/PlayerInteractionEvent.java @@ -16,7 +16,7 @@ package net.fabricmc.fabric.events; -import net.fabricmc.fabric.util.HandlerList; +import net.fabricmc.fabric.impl.util.HandlerArray; import net.fabricmc.fabric.util.HandlerRegistry; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.util.ActionResult; @@ -66,20 +66,20 @@ public final class PlayerInteractionEvent { /** * Event emitted when a player "attacks" a block. */ - public static final HandlerRegistry ATTACK_BLOCK = new HandlerList<>(Block.class); + public static final HandlerRegistry ATTACK_BLOCK = new HandlerArray<>(Block.class); /** * Event emitted when a player "attacks" an entity. */ - public static final HandlerRegistry ATTACK_ENTITY = new HandlerList<>(Entity.class); + public static final HandlerRegistry ATTACK_ENTITY = new HandlerArray<>(Entity.class); // TODO: For completeness' sake, but requires us to add a custom packet. Is it worth the complexity? - /* public static final HandlerRegistry ATTACK_ITEM = new HandlerList<>(); */ + /* public static final HandlerRegistry ATTACK_ITEM = new HandlerArray<>(); */ /** * Event emitted when a player interacts with a block. */ - public static final HandlerRegistry INTERACT_BLOCK = new HandlerList<>(BlockPositioned.class); + public static final HandlerRegistry INTERACT_BLOCK = new HandlerArray<>(BlockPositioned.class); /** * Event emitted when a player interacts with an entity. @@ -90,12 +90,12 @@ public final class PlayerInteractionEvent { * only one event is currently provided, but it is accordingly named in * the case of a second event being necessary. */ - public static final HandlerRegistry INTERACT_ENTITY_POSITIONED = new HandlerList<>(EntityPositioned.class); + public static final HandlerRegistry INTERACT_ENTITY_POSITIONED = new HandlerArray<>(EntityPositioned.class); /** * Event emitted when a player interacts with an item. */ - public static final HandlerRegistry INTERACT_ITEM = new HandlerList<>(Item.class); + public static final HandlerRegistry INTERACT_ITEM = new HandlerArray<>(Item.class); /** * @deprecated Use {@link #ATTACK_BLOCK ATTACK_BLOCK} instead. diff --git a/src/main/java/net/fabricmc/fabric/events/ServerEvent.java b/src/main/java/net/fabricmc/fabric/events/ServerEvent.java index 4f8804cf6..3fbbc3d73 100644 --- a/src/main/java/net/fabricmc/fabric/events/ServerEvent.java +++ b/src/main/java/net/fabricmc/fabric/events/ServerEvent.java @@ -16,16 +16,14 @@ package net.fabricmc.fabric.events; -import net.fabricmc.fabric.util.HandlerList; +import net.fabricmc.fabric.impl.util.HandlerArray; import net.fabricmc.fabric.util.HandlerRegistry; import net.minecraft.server.MinecraftServer; -import net.minecraft.util.Profiler; -import net.minecraft.world.World; import java.util.function.Consumer; public final class ServerEvent { - public static final HandlerRegistry> START = new HandlerList<>(Consumer.class); + public static final HandlerRegistry> START = new HandlerArray<>(Consumer.class); private ServerEvent() { diff --git a/src/main/java/net/fabricmc/fabric/events/TickEvent.java b/src/main/java/net/fabricmc/fabric/events/TickEvent.java index 5fab90e06..d590d734e 100644 --- a/src/main/java/net/fabricmc/fabric/events/TickEvent.java +++ b/src/main/java/net/fabricmc/fabric/events/TickEvent.java @@ -16,7 +16,7 @@ package net.fabricmc.fabric.events; -import net.fabricmc.fabric.util.HandlerList; +import net.fabricmc.fabric.impl.util.HandlerArray; import net.fabricmc.fabric.util.HandlerRegistry; import net.minecraft.server.MinecraftServer; import net.minecraft.util.Profiler; @@ -29,15 +29,15 @@ import java.util.function.Consumer; * You can use them as endpoints to tick your own, related logic "globally". */ public final class TickEvent { - public static final HandlerRegistry> SERVER = new HandlerList<>(Consumer.class); - public static final HandlerRegistry> WORLD = new HandlerList<>(Consumer.class); + public static final HandlerRegistry> SERVER = new HandlerArray<>(Consumer.class); + public static final HandlerRegistry> WORLD = new HandlerArray<>(Consumer.class); private TickEvent() { } public static void tick(HandlerRegistry> registry, T object, Profiler profiler) { - Consumer[] handlers = ((HandlerList>) registry).getBackingArray(); + Consumer[] handlers = ((HandlerArray>) registry).getBackingArray(); if (handlers.length > 0) { profiler.begin("fabric"); diff --git a/src/main/java/net/fabricmc/fabric/events/client/ClientTickEvent.java b/src/main/java/net/fabricmc/fabric/events/client/ClientTickEvent.java index 13f978934..81d036bec 100644 --- a/src/main/java/net/fabricmc/fabric/events/client/ClientTickEvent.java +++ b/src/main/java/net/fabricmc/fabric/events/client/ClientTickEvent.java @@ -17,7 +17,7 @@ package net.fabricmc.fabric.events.client; import net.fabricmc.fabric.events.TickEvent; -import net.fabricmc.fabric.util.HandlerList; +import net.fabricmc.fabric.impl.util.HandlerArray; import net.fabricmc.fabric.util.HandlerRegistry; import net.minecraft.client.MinecraftClient; @@ -29,7 +29,7 @@ import java.util.function.Consumer; * @see TickEvent */ public final class ClientTickEvent { - public static final HandlerRegistry> CLIENT = new HandlerList<>(Consumer.class); + public static final HandlerRegistry> CLIENT = new HandlerArray<>(Consumer.class); private ClientTickEvent() { diff --git a/src/main/java/net/fabricmc/fabric/events/client/SpriteEvent.java b/src/main/java/net/fabricmc/fabric/events/client/SpriteEvent.java index 8f8aecefb..5894bd484 100644 --- a/src/main/java/net/fabricmc/fabric/events/client/SpriteEvent.java +++ b/src/main/java/net/fabricmc/fabric/events/client/SpriteEvent.java @@ -17,7 +17,7 @@ package net.fabricmc.fabric.events.client; import net.fabricmc.fabric.client.texture.SpriteRegistry; -import net.fabricmc.fabric.util.HandlerList; +import net.fabricmc.fabric.impl.util.HandlerArray; import net.fabricmc.fabric.util.HandlerRegistry; public class SpriteEvent { @@ -26,5 +26,5 @@ public class SpriteEvent { void registerSprites(SpriteRegistry registry); } - public static final HandlerRegistry PROVIDE = new HandlerList<>(Provider.class); + public static final HandlerRegistry PROVIDE = new HandlerArray<>(Provider.class); } diff --git a/src/main/java/net/fabricmc/fabric/FabricAPI.java b/src/main/java/net/fabricmc/fabric/impl/FabricAPIInitializer.java similarity index 94% rename from src/main/java/net/fabricmc/fabric/FabricAPI.java rename to src/main/java/net/fabricmc/fabric/impl/FabricAPIInitializer.java index 3ce0065fa..b555e303c 100644 --- a/src/main/java/net/fabricmc/fabric/FabricAPI.java +++ b/src/main/java/net/fabricmc/fabric/impl/FabricAPIInitializer.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package net.fabricmc.fabric; +package net.fabricmc.fabric.impl; import net.fabricmc.api.ModInitializer; import net.fabricmc.fabric.block.BreakInteractable; @@ -29,7 +29,7 @@ import net.minecraft.world.World; import java.util.List; -public class FabricAPI implements ModInitializer { +public class FabricAPIInitializer implements ModInitializer { @Override public void onInitialize() { PlayerInteractionEvent.BREAK_BLOCK.register((player, world, hand, pos, direction) -> { diff --git a/src/main/java/net/fabricmc/fabric/client/texture/impl/FabricSprite.java b/src/main/java/net/fabricmc/fabric/impl/client/texture/FabricSprite.java similarity index 95% rename from src/main/java/net/fabricmc/fabric/client/texture/impl/FabricSprite.java rename to src/main/java/net/fabricmc/fabric/impl/client/texture/FabricSprite.java index 27efb58a4..c6930bd3e 100644 --- a/src/main/java/net/fabricmc/fabric/client/texture/impl/FabricSprite.java +++ b/src/main/java/net/fabricmc/fabric/impl/client/texture/FabricSprite.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package net.fabricmc.fabric.client.texture.impl; +package net.fabricmc.fabric.impl.client.texture; import net.minecraft.class_1050; import net.minecraft.client.resource.metadata.AnimationResourceMetadata; diff --git a/src/main/java/net/fabricmc/fabric/registry/impl/listeners/BootstrapBiomeRegistryListener.java b/src/main/java/net/fabricmc/fabric/impl/registry/BootstrapBiomeRegistryListener.java similarity index 96% rename from src/main/java/net/fabricmc/fabric/registry/impl/listeners/BootstrapBiomeRegistryListener.java rename to src/main/java/net/fabricmc/fabric/impl/registry/BootstrapBiomeRegistryListener.java index d136318bd..732c6329c 100644 --- a/src/main/java/net/fabricmc/fabric/registry/impl/listeners/BootstrapBiomeRegistryListener.java +++ b/src/main/java/net/fabricmc/fabric/impl/registry/BootstrapBiomeRegistryListener.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package net.fabricmc.fabric.registry.impl.listeners; +package net.fabricmc.fabric.impl.registry; import net.fabricmc.fabric.registry.ExtendedIdList; import net.fabricmc.fabric.registry.RegistryListener; diff --git a/src/main/java/net/fabricmc/fabric/registry/impl/listeners/BootstrapBlockRegistryListener.java b/src/main/java/net/fabricmc/fabric/impl/registry/BootstrapBlockRegistryListener.java similarity index 96% rename from src/main/java/net/fabricmc/fabric/registry/impl/listeners/BootstrapBlockRegistryListener.java rename to src/main/java/net/fabricmc/fabric/impl/registry/BootstrapBlockRegistryListener.java index 3b32f7f37..3f121498c 100644 --- a/src/main/java/net/fabricmc/fabric/registry/impl/listeners/BootstrapBlockRegistryListener.java +++ b/src/main/java/net/fabricmc/fabric/impl/registry/BootstrapBlockRegistryListener.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package net.fabricmc.fabric.registry.impl.listeners; +package net.fabricmc.fabric.impl.registry; import net.fabricmc.fabric.registry.ExtendedIdList; import net.fabricmc.fabric.registry.RegistryListener; diff --git a/src/main/java/net/fabricmc/fabric/registry/impl/listeners/BootstrapFluidRegistryListener.java b/src/main/java/net/fabricmc/fabric/impl/registry/BootstrapFluidRegistryListener.java similarity index 96% rename from src/main/java/net/fabricmc/fabric/registry/impl/listeners/BootstrapFluidRegistryListener.java rename to src/main/java/net/fabricmc/fabric/impl/registry/BootstrapFluidRegistryListener.java index e2757fadd..67d4d699d 100644 --- a/src/main/java/net/fabricmc/fabric/registry/impl/listeners/BootstrapFluidRegistryListener.java +++ b/src/main/java/net/fabricmc/fabric/impl/registry/BootstrapFluidRegistryListener.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package net.fabricmc.fabric.registry.impl.listeners; +package net.fabricmc.fabric.impl.registry; import net.fabricmc.fabric.registry.ExtendedIdList; import net.fabricmc.fabric.registry.RegistryListener; diff --git a/src/main/java/net/fabricmc/fabric/registry/impl/listeners/BootstrapItemRegistryListener.java b/src/main/java/net/fabricmc/fabric/impl/registry/BootstrapItemRegistryListener.java similarity index 96% rename from src/main/java/net/fabricmc/fabric/registry/impl/listeners/BootstrapItemRegistryListener.java rename to src/main/java/net/fabricmc/fabric/impl/registry/BootstrapItemRegistryListener.java index e543e050c..56620a133 100644 --- a/src/main/java/net/fabricmc/fabric/registry/impl/listeners/BootstrapItemRegistryListener.java +++ b/src/main/java/net/fabricmc/fabric/impl/registry/BootstrapItemRegistryListener.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package net.fabricmc.fabric.registry.impl.listeners; +package net.fabricmc.fabric.impl.registry; import net.fabricmc.fabric.registry.RegistryListener; import net.minecraft.item.Item; diff --git a/src/main/java/net/fabricmc/fabric/registry/impl/listeners/IdListUpdater.java b/src/main/java/net/fabricmc/fabric/impl/registry/IdListUpdater.java similarity index 97% rename from src/main/java/net/fabricmc/fabric/registry/impl/listeners/IdListUpdater.java rename to src/main/java/net/fabricmc/fabric/impl/registry/IdListUpdater.java index ee217f3ea..6dad89a8c 100644 --- a/src/main/java/net/fabricmc/fabric/registry/impl/listeners/IdListUpdater.java +++ b/src/main/java/net/fabricmc/fabric/impl/registry/IdListUpdater.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package net.fabricmc.fabric.registry.impl.listeners; +package net.fabricmc.fabric.impl.registry; import net.fabricmc.fabric.registry.ExtendedIdList; import net.fabricmc.fabric.registry.RegistryListener; diff --git a/src/main/java/net/fabricmc/fabric/resources/impl/ModDataPackSupplier.java b/src/main/java/net/fabricmc/fabric/impl/resources/ModDataPackSupplier.java similarity index 97% rename from src/main/java/net/fabricmc/fabric/resources/impl/ModDataPackSupplier.java rename to src/main/java/net/fabricmc/fabric/impl/resources/ModDataPackSupplier.java index 82c902366..029e952d6 100644 --- a/src/main/java/net/fabricmc/fabric/resources/impl/ModDataPackSupplier.java +++ b/src/main/java/net/fabricmc/fabric/impl/resources/ModDataPackSupplier.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package net.fabricmc.fabric.resources.impl; +package net.fabricmc.fabric.impl.resources; import net.fabricmc.fabric.resources.ModResourcePack; import net.minecraft.resource.ResourcePack; diff --git a/src/main/java/net/fabricmc/fabric/resources/impl/ModDirectoryResourcePack.java b/src/main/java/net/fabricmc/fabric/impl/resources/ModDirectoryResourcePack.java similarity index 97% rename from src/main/java/net/fabricmc/fabric/resources/impl/ModDirectoryResourcePack.java rename to src/main/java/net/fabricmc/fabric/impl/resources/ModDirectoryResourcePack.java index 43ff3c485..5e24f0ff6 100644 --- a/src/main/java/net/fabricmc/fabric/resources/impl/ModDirectoryResourcePack.java +++ b/src/main/java/net/fabricmc/fabric/impl/resources/ModDirectoryResourcePack.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package net.fabricmc.fabric.resources.impl; +package net.fabricmc.fabric.impl.resources; import net.fabricmc.fabric.resources.ModResourcePack; import net.fabricmc.loader.ModInfo; diff --git a/src/main/java/net/fabricmc/fabric/resources/impl/ModResourcePackUtil.java b/src/main/java/net/fabricmc/fabric/impl/resources/ModResourcePackUtil.java similarity index 98% rename from src/main/java/net/fabricmc/fabric/resources/impl/ModResourcePackUtil.java rename to src/main/java/net/fabricmc/fabric/impl/resources/ModResourcePackUtil.java index 4303793e0..eaaa58143 100644 --- a/src/main/java/net/fabricmc/fabric/resources/impl/ModResourcePackUtil.java +++ b/src/main/java/net/fabricmc/fabric/impl/resources/ModResourcePackUtil.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package net.fabricmc.fabric.resources.impl; +package net.fabricmc.fabric.impl.resources; import com.google.common.base.Charsets; import net.fabricmc.loader.FabricLoader; diff --git a/src/main/java/net/fabricmc/fabric/resources/impl/ModZipResourcePack.java b/src/main/java/net/fabricmc/fabric/impl/resources/ModZipResourcePack.java similarity index 97% rename from src/main/java/net/fabricmc/fabric/resources/impl/ModZipResourcePack.java rename to src/main/java/net/fabricmc/fabric/impl/resources/ModZipResourcePack.java index 8bddc4dae..f00fa8e62 100644 --- a/src/main/java/net/fabricmc/fabric/resources/impl/ModZipResourcePack.java +++ b/src/main/java/net/fabricmc/fabric/impl/resources/ModZipResourcePack.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package net.fabricmc.fabric.resources.impl; +package net.fabricmc.fabric.impl.resources; import net.fabricmc.fabric.resources.ModResourcePack; import net.fabricmc.loader.ModInfo; diff --git a/src/main/java/net/fabricmc/fabric/util/HandlerList.java b/src/main/java/net/fabricmc/fabric/impl/util/HandlerArray.java similarity index 87% rename from src/main/java/net/fabricmc/fabric/util/HandlerList.java rename to src/main/java/net/fabricmc/fabric/impl/util/HandlerArray.java index 5be07302d..809b5e5aa 100644 --- a/src/main/java/net/fabricmc/fabric/util/HandlerList.java +++ b/src/main/java/net/fabricmc/fabric/impl/util/HandlerArray.java @@ -14,16 +14,18 @@ * limitations under the License. */ -package net.fabricmc.fabric.util; +package net.fabricmc.fabric.impl.util; + +import net.fabricmc.fabric.util.HandlerRegistry; import java.lang.reflect.Array; -public class HandlerList implements HandlerRegistry { +public class HandlerArray implements HandlerRegistry { private final Class tClass; private T[] array; @SuppressWarnings("unchecked") - public HandlerList(Class theClass) { + public HandlerArray(Class theClass) { this.tClass = theClass; this.array = (T[]) Array.newInstance(tClass, 0); } diff --git a/src/main/java/net/fabricmc/fabric/mixin/client/texture/MixinSpriteAtlasTexture.java b/src/main/java/net/fabricmc/fabric/mixin/client/texture/MixinSpriteAtlasTexture.java index 269c54a4f..b6d63a289 100644 --- a/src/main/java/net/fabricmc/fabric/mixin/client/texture/MixinSpriteAtlasTexture.java +++ b/src/main/java/net/fabricmc/fabric/mixin/client/texture/MixinSpriteAtlasTexture.java @@ -18,9 +18,9 @@ package net.fabricmc.fabric.mixin.client.texture; import com.google.common.base.Joiner; import net.fabricmc.fabric.client.texture.*; -import net.fabricmc.fabric.client.texture.impl.FabricSprite; +import net.fabricmc.fabric.impl.client.texture.FabricSprite; import net.fabricmc.fabric.events.client.SpriteEvent; -import net.fabricmc.fabric.util.HandlerList; +import net.fabricmc.fabric.impl.util.HandlerArray; import net.minecraft.class_1050; import net.minecraft.client.MinecraftClient; import net.minecraft.client.resource.metadata.AnimationResourceMetadata; @@ -85,7 +85,7 @@ public abstract class MixinSpriteAtlasTexture { //noinspection RedundantCast,ConstantConditions if ((SpriteAtlasTexture) (Object) this == MinecraftClient.getInstance().getSpriteAtlas()) { SpriteRegistry registry = new SpriteRegistry(sprites, (id) -> addSpriteToLoad(manager, id)); - for (SpriteEvent.Provider provider : ((HandlerList) SpriteEvent.PROVIDE).getBackingArray()) { + for (SpriteEvent.Provider provider : ((HandlerArray) SpriteEvent.PROVIDE).getBackingArray()) { provider.registerSprites(registry); } } diff --git a/src/main/java/net/fabricmc/fabric/mixin/events/objectbuilder/MixinBlock.java b/src/main/java/net/fabricmc/fabric/mixin/events/objectbuilder/MixinBlock.java index 71d4da445..c0d702c10 100644 --- a/src/main/java/net/fabricmc/fabric/mixin/events/objectbuilder/MixinBlock.java +++ b/src/main/java/net/fabricmc/fabric/mixin/events/objectbuilder/MixinBlock.java @@ -17,7 +17,7 @@ package net.fabricmc.fabric.mixin.events.objectbuilder; import net.fabricmc.fabric.events.ObjectBuilderEvent; -import net.fabricmc.fabric.util.HandlerList; +import net.fabricmc.fabric.impl.util.HandlerArray; import net.minecraft.block.Block; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; @@ -30,7 +30,7 @@ import java.util.function.BiConsumer; public class MixinBlock { @Inject(method = "(Lnet/minecraft/block/Block$Settings;)V", at = @At("RETURN")) public void init(Block.Settings builder, CallbackInfo info) { - for (BiConsumer consumer : ((HandlerList>) ObjectBuilderEvent.BLOCK).getBackingArray()) { + for (BiConsumer consumer : ((HandlerArray>) ObjectBuilderEvent.BLOCK).getBackingArray()) { consumer.accept(builder, (Block) (Object) this); } } diff --git a/src/main/java/net/fabricmc/fabric/mixin/events/objectbuilder/MixinItem.java b/src/main/java/net/fabricmc/fabric/mixin/events/objectbuilder/MixinItem.java index 18b1589da..90f0cb5df 100644 --- a/src/main/java/net/fabricmc/fabric/mixin/events/objectbuilder/MixinItem.java +++ b/src/main/java/net/fabricmc/fabric/mixin/events/objectbuilder/MixinItem.java @@ -17,7 +17,7 @@ package net.fabricmc.fabric.mixin.events.objectbuilder; import net.fabricmc.fabric.events.ObjectBuilderEvent; -import net.fabricmc.fabric.util.HandlerList; +import net.fabricmc.fabric.impl.util.HandlerArray; import net.minecraft.item.Item; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; @@ -30,7 +30,7 @@ import java.util.function.BiConsumer; public class MixinItem { @Inject(method = "(Lnet/minecraft/item/Item$Settings;)V", at = @At("RETURN")) public void init(Item.Settings builder, CallbackInfo info) { - for (BiConsumer consumer : ((HandlerList>) ObjectBuilderEvent.ITEM).getBackingArray()) { + for (BiConsumer consumer : ((HandlerArray>) ObjectBuilderEvent.ITEM).getBackingArray()) { consumer.accept(builder, (Item) (Object) this); } } diff --git a/src/main/java/net/fabricmc/fabric/mixin/events/playerinteraction/MixinClientPlayerInteractionManager.java b/src/main/java/net/fabricmc/fabric/mixin/events/playerinteraction/MixinClientPlayerInteractionManager.java index 928ad351e..30d8fda40 100644 --- a/src/main/java/net/fabricmc/fabric/mixin/events/playerinteraction/MixinClientPlayerInteractionManager.java +++ b/src/main/java/net/fabricmc/fabric/mixin/events/playerinteraction/MixinClientPlayerInteractionManager.java @@ -17,7 +17,7 @@ package net.fabricmc.fabric.mixin.events.playerinteraction; import net.fabricmc.fabric.events.PlayerInteractionEvent; -import net.fabricmc.fabric.util.HandlerList; +import net.fabricmc.fabric.impl.util.HandlerArray; import net.minecraft.client.MinecraftClient; import net.minecraft.client.network.ClientPlayNetworkHandler; import net.minecraft.client.network.ClientPlayerEntity; @@ -52,7 +52,7 @@ public class MixinClientPlayerInteractionManager { @Inject(at = @At(value = "INVOKE", target = "Lnet/minecraft/world/GameMode;isCreative()Z", ordinal = 0), method = "attackBlock", cancellable = true) public void attackBlock(BlockPos pos, Direction direction, CallbackInfoReturnable info) { - for (PlayerInteractionEvent.Block handler : ((HandlerList) PlayerInteractionEvent.ATTACK_BLOCK).getBackingArray()) { + for (PlayerInteractionEvent.Block handler : ((HandlerArray) PlayerInteractionEvent.ATTACK_BLOCK).getBackingArray()) { ActionResult result = handler.interact(client.player, client.world, Hand.MAIN, pos, direction); if (result != ActionResult.PASS) { info.setReturnValue(result == ActionResult.SUCCESS); @@ -68,7 +68,7 @@ public class MixinClientPlayerInteractionManager { return; } - for (PlayerInteractionEvent.Block handler : ((HandlerList) PlayerInteractionEvent.ATTACK_BLOCK).getBackingArray()) { + for (PlayerInteractionEvent.Block handler : ((HandlerArray) PlayerInteractionEvent.ATTACK_BLOCK).getBackingArray()) { ActionResult result = handler.interact(client.player, client.world, Hand.MAIN, pos, direction); if (result != ActionResult.PASS) { info.setReturnValue(result == ActionResult.SUCCESS); @@ -80,7 +80,7 @@ public class MixinClientPlayerInteractionManager { @Inject(at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/ClientPlayerEntity;getStackInHand(Lnet/minecraft/util/Hand;)Lnet/minecraft/item/ItemStack;", ordinal = 0), method = "interactBlock", cancellable = true) public void interactBlock(ClientPlayerEntity player, ClientWorld world, BlockPos pos, Direction direction, Vec3d vec, Hand hand, CallbackInfoReturnable info) { - PlayerInteractionEvent.BlockPositioned[] backingArray = ((HandlerList) PlayerInteractionEvent.INTERACT_BLOCK).getBackingArray(); + PlayerInteractionEvent.BlockPositioned[] backingArray = ((HandlerArray) PlayerInteractionEvent.INTERACT_BLOCK).getBackingArray(); if (backingArray.length > 0) { float hitX = (float) (vec.x - pos.getX()); float hitY = (float) (vec.y - pos.getY()); @@ -102,7 +102,7 @@ public class MixinClientPlayerInteractionManager { @Inject(at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/player/PlayerEntity;getStackInHand(Lnet/minecraft/util/Hand;)Lnet/minecraft/item/ItemStack;", ordinal = 0), method = "interactItem", cancellable = true) public void interactItem(PlayerEntity player, World world, Hand hand, CallbackInfoReturnable info) { - for (PlayerInteractionEvent.Item handler : ((HandlerList) PlayerInteractionEvent.INTERACT_ITEM).getBackingArray()) { + for (PlayerInteractionEvent.Item handler : ((HandlerArray) PlayerInteractionEvent.INTERACT_ITEM).getBackingArray()) { ActionResult result = handler.interact(player, world, hand); if (result != ActionResult.PASS) { info.setReturnValue(result); @@ -114,7 +114,7 @@ public class MixinClientPlayerInteractionManager { @Inject(at = @At("HEAD"), method = "attackEntity", cancellable = true) public void attackEntity(PlayerEntity player, Entity entity, CallbackInfo info) { - for (PlayerInteractionEvent.Entity handler : ((HandlerList) PlayerInteractionEvent.ATTACK_ENTITY).getBackingArray()) { + for (PlayerInteractionEvent.Entity handler : ((HandlerArray) PlayerInteractionEvent.ATTACK_ENTITY).getBackingArray()) { ActionResult result = handler.interact(player, player.getEntityWorld(), Hand.MAIN /* TODO */, entity); if (result != ActionResult.PASS) { info.cancel(); @@ -128,7 +128,7 @@ public class MixinClientPlayerInteractionManager { // TODO: Remove double Vec3d creation? Vec3d hitVec = new Vec3d(hitResult.pos.x - entity.x, hitResult.pos.y - entity.y, hitResult.pos.z - entity.z); - for (PlayerInteractionEvent.EntityPositioned handler : ((HandlerList) PlayerInteractionEvent.INTERACT_ENTITY_POSITIONED).getBackingArray()) { + for (PlayerInteractionEvent.EntityPositioned handler : ((HandlerArray) PlayerInteractionEvent.INTERACT_ENTITY_POSITIONED).getBackingArray()) { ActionResult result = handler.interact(player, player.getEntityWorld(), hand, entity, hitVec); if (result != ActionResult.PASS) { info.setReturnValue(result); diff --git a/src/main/java/net/fabricmc/fabric/mixin/events/playerinteraction/MixinServerPlayNetworkHandler.java b/src/main/java/net/fabricmc/fabric/mixin/events/playerinteraction/MixinServerPlayNetworkHandler.java index 427cd9238..92cfd97cb 100644 --- a/src/main/java/net/fabricmc/fabric/mixin/events/playerinteraction/MixinServerPlayNetworkHandler.java +++ b/src/main/java/net/fabricmc/fabric/mixin/events/playerinteraction/MixinServerPlayNetworkHandler.java @@ -17,7 +17,7 @@ package net.fabricmc.fabric.mixin.events.playerinteraction; import net.fabricmc.fabric.events.PlayerInteractionEvent; -import net.fabricmc.fabric.util.HandlerList; +import net.fabricmc.fabric.impl.util.HandlerArray; import net.minecraft.server.network.ServerPlayNetworkHandler; import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.server.network.packet.PlayerInteractEntityServerPacket; @@ -35,7 +35,7 @@ public class MixinServerPlayNetworkHandler { @Inject(method = "onPlayerInteractEntity", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/Entity;interactAt(Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/Hand;)Lnet/minecraft/util/ActionResult;"), cancellable = true) public void onPlayerInteractEntity(PlayerInteractEntityServerPacket packet, CallbackInfo info) { - for (PlayerInteractionEvent.EntityPositioned handler : ((HandlerList) PlayerInteractionEvent.INTERACT_ENTITY_POSITIONED).getBackingArray()) { + for (PlayerInteractionEvent.EntityPositioned handler : ((HandlerArray) PlayerInteractionEvent.INTERACT_ENTITY_POSITIONED).getBackingArray()) { ActionResult result = handler.interact(player, player.getEntityWorld(), packet.getHand(), packet.getEntity(player.world), packet.getHitPosition()); if (result != ActionResult.PASS) { info.cancel(); diff --git a/src/main/java/net/fabricmc/fabric/mixin/events/playerinteraction/MixinServerPlayerEntity.java b/src/main/java/net/fabricmc/fabric/mixin/events/playerinteraction/MixinServerPlayerEntity.java index f217a2be7..8f89f0a40 100644 --- a/src/main/java/net/fabricmc/fabric/mixin/events/playerinteraction/MixinServerPlayerEntity.java +++ b/src/main/java/net/fabricmc/fabric/mixin/events/playerinteraction/MixinServerPlayerEntity.java @@ -17,7 +17,7 @@ package net.fabricmc.fabric.mixin.events.playerinteraction; import net.fabricmc.fabric.events.PlayerInteractionEvent; -import net.fabricmc.fabric.util.HandlerList; +import net.fabricmc.fabric.impl.util.HandlerArray; import net.minecraft.entity.Entity; import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.util.ActionResult; @@ -33,7 +33,7 @@ public class MixinServerPlayerEntity { public void onPlayerInteractEntity(Entity target, CallbackInfo info) { ServerPlayerEntity player = (ServerPlayerEntity) (Object) this; - for (PlayerInteractionEvent.Entity handler : ((HandlerList) PlayerInteractionEvent.ATTACK_ENTITY).getBackingArray()) { + for (PlayerInteractionEvent.Entity handler : ((HandlerArray) PlayerInteractionEvent.ATTACK_ENTITY).getBackingArray()) { ActionResult result = handler.interact(player, player.getEntityWorld(), Hand.MAIN, target); if (result != ActionResult.PASS) { info.cancel(); diff --git a/src/main/java/net/fabricmc/fabric/mixin/events/playerinteraction/MixinServerPlayerInteractionManager.java b/src/main/java/net/fabricmc/fabric/mixin/events/playerinteraction/MixinServerPlayerInteractionManager.java index 76611a187..26c4c3af6 100644 --- a/src/main/java/net/fabricmc/fabric/mixin/events/playerinteraction/MixinServerPlayerInteractionManager.java +++ b/src/main/java/net/fabricmc/fabric/mixin/events/playerinteraction/MixinServerPlayerInteractionManager.java @@ -17,7 +17,7 @@ package net.fabricmc.fabric.mixin.events.playerinteraction; import net.fabricmc.fabric.events.PlayerInteractionEvent; -import net.fabricmc.fabric.util.HandlerList; +import net.fabricmc.fabric.impl.util.HandlerArray; import net.minecraft.client.network.packet.BlockUpdateClientPacket; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; @@ -44,7 +44,7 @@ public class MixinServerPlayerInteractionManager { @Inject(at = @At("HEAD"), method = "method_14263", cancellable = true) public void startBlockBreak(BlockPos pos, Direction direction, CallbackInfo info) { - for (PlayerInteractionEvent.Block handler : ((HandlerList) PlayerInteractionEvent.ATTACK_BLOCK).getBackingArray()) { + for (PlayerInteractionEvent.Block handler : ((HandlerArray) PlayerInteractionEvent.ATTACK_BLOCK).getBackingArray()) { ActionResult result = handler.interact(player, world, Hand.MAIN, pos, direction); if (result != ActionResult.PASS) { // The client might have broken the block on its side, so make sure to let it know. @@ -57,7 +57,7 @@ public class MixinServerPlayerInteractionManager { @Inject(at = @At("HEAD"), method = "interactBlock", cancellable = true) public void interactBlock(PlayerEntity player, World world, ItemStack stack, Hand hand, BlockPos pos, Direction direction, float hitX, float hitY, float hitZ, CallbackInfoReturnable info) { - for (PlayerInteractionEvent.BlockPositioned handler : ((HandlerList) PlayerInteractionEvent.INTERACT_BLOCK).getBackingArray()) { + for (PlayerInteractionEvent.BlockPositioned handler : ((HandlerArray) PlayerInteractionEvent.INTERACT_BLOCK).getBackingArray()) { ActionResult result = handler.interact(player, world, hand, pos, direction, hitX, hitY, hitZ); if (result != ActionResult.PASS) { info.setReturnValue(result); @@ -69,7 +69,7 @@ public class MixinServerPlayerInteractionManager { @Inject(at = @At("HEAD"), method = "interactItem", cancellable = true) public void interactItem(PlayerEntity player, World world, ItemStack stack, Hand hand, CallbackInfoReturnable info) { - for (PlayerInteractionEvent.Item handler : ((HandlerList) PlayerInteractionEvent.INTERACT_ITEM).getBackingArray()) { + for (PlayerInteractionEvent.Item handler : ((HandlerArray) PlayerInteractionEvent.INTERACT_ITEM).getBackingArray()) { ActionResult result = handler.interact(player, world, hand); if (result != ActionResult.PASS) { info.setReturnValue(result); diff --git a/src/main/java/net/fabricmc/fabric/mixin/events/server/MixinMinecraftServer.java b/src/main/java/net/fabricmc/fabric/mixin/events/server/MixinMinecraftServer.java index 4ab15184a..edd1ef2d1 100644 --- a/src/main/java/net/fabricmc/fabric/mixin/events/server/MixinMinecraftServer.java +++ b/src/main/java/net/fabricmc/fabric/mixin/events/server/MixinMinecraftServer.java @@ -17,7 +17,7 @@ package net.fabricmc.fabric.mixin.events.server; import net.fabricmc.fabric.events.ServerEvent; -import net.fabricmc.fabric.util.HandlerList; +import net.fabricmc.fabric.impl.util.HandlerArray; import net.minecraft.server.MinecraftServer; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; @@ -30,7 +30,7 @@ import java.util.function.Consumer; public class MixinMinecraftServer { @Inject(at = @At(value = "INVOKE", target = "Lnet/minecraft/server/MinecraftServer;method_3791(Lnet/minecraft/server/ServerMetadata;)V", ordinal = 0), method = "run") public void afterSetupServer(CallbackInfo info) { - for (Consumer handler : ((HandlerList>) ServerEvent.START).getBackingArray()) { + for (Consumer handler : ((HandlerArray>) ServerEvent.START).getBackingArray()) { handler.accept((MinecraftServer) (Object) this); } } diff --git a/src/main/java/net/fabricmc/fabric/mixin/events/tick/MixinMinecraftServer.java b/src/main/java/net/fabricmc/fabric/mixin/events/tick/MixinMinecraftServer.java index c937e2fac..b89a9f1c0 100644 --- a/src/main/java/net/fabricmc/fabric/mixin/events/tick/MixinMinecraftServer.java +++ b/src/main/java/net/fabricmc/fabric/mixin/events/tick/MixinMinecraftServer.java @@ -16,9 +16,7 @@ package net.fabricmc.fabric.mixin.events.tick; -import net.fabricmc.fabric.events.ServerEvent; import net.fabricmc.fabric.events.TickEvent; -import net.fabricmc.fabric.util.HandlerList; import net.minecraft.class_3689; import net.minecraft.server.MinecraftServer; import org.spongepowered.asm.mixin.Mixin; @@ -28,7 +26,6 @@ import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import java.util.function.BooleanSupplier; -import java.util.function.Consumer; @Mixin(MinecraftServer.class) public class MixinMinecraftServer { diff --git a/src/main/java/net/fabricmc/fabric/mixin/events/tick/MixinWorld.java b/src/main/java/net/fabricmc/fabric/mixin/events/tick/MixinWorld.java index 71489b35e..f65d05b7c 100644 --- a/src/main/java/net/fabricmc/fabric/mixin/events/tick/MixinWorld.java +++ b/src/main/java/net/fabricmc/fabric/mixin/events/tick/MixinWorld.java @@ -16,9 +16,7 @@ package net.fabricmc.fabric.mixin.events.tick; -import net.fabricmc.fabric.events.PlayerInteractionEvent; import net.fabricmc.fabric.events.TickEvent; -import net.fabricmc.fabric.util.HandlerList; import net.minecraft.util.Profiler; import net.minecraft.world.World; import org.spongepowered.asm.mixin.Mixin; @@ -27,8 +25,6 @@ import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import java.util.function.Consumer; - @Mixin(World.class) public class MixinWorld { @Shadow diff --git a/src/main/java/net/fabricmc/fabric/mixin/registry/MixinBootstrap.java b/src/main/java/net/fabricmc/fabric/mixin/registry/MixinBootstrap.java index 42b69cccc..6e9486f29 100644 --- a/src/main/java/net/fabricmc/fabric/mixin/registry/MixinBootstrap.java +++ b/src/main/java/net/fabricmc/fabric/mixin/registry/MixinBootstrap.java @@ -19,10 +19,10 @@ package net.fabricmc.fabric.mixin.registry; import net.fabricmc.fabric.networking.CustomPayloadPacketRegistry; import net.fabricmc.fabric.registry.ListenableRegistry; import net.fabricmc.fabric.registry.RegistrySyncManager; -import net.fabricmc.fabric.registry.impl.listeners.BootstrapBiomeRegistryListener; -import net.fabricmc.fabric.registry.impl.listeners.BootstrapBlockRegistryListener; -import net.fabricmc.fabric.registry.impl.listeners.BootstrapFluidRegistryListener; -import net.fabricmc.fabric.registry.impl.listeners.BootstrapItemRegistryListener; +import net.fabricmc.fabric.impl.registry.BootstrapBiomeRegistryListener; +import net.fabricmc.fabric.impl.registry.BootstrapBlockRegistryListener; +import net.fabricmc.fabric.impl.registry.BootstrapFluidRegistryListener; +import net.fabricmc.fabric.impl.registry.BootstrapItemRegistryListener; import net.minecraft.Bootstrap; import net.minecraft.block.Block; import net.minecraft.block.Blocks; diff --git a/src/main/java/net/fabricmc/fabric/mixin/registry/client/MixinBlockColorMap.java b/src/main/java/net/fabricmc/fabric/mixin/registry/client/MixinBlockColorMap.java index 056891d30..831ca3d0d 100644 --- a/src/main/java/net/fabricmc/fabric/mixin/registry/client/MixinBlockColorMap.java +++ b/src/main/java/net/fabricmc/fabric/mixin/registry/client/MixinBlockColorMap.java @@ -17,7 +17,7 @@ package net.fabricmc.fabric.mixin.registry.client; import net.fabricmc.fabric.registry.ListenableRegistry; -import net.fabricmc.fabric.registry.impl.listeners.IdListUpdater; +import net.fabricmc.fabric.impl.registry.IdListUpdater; import net.minecraft.block.Block; import net.minecraft.client.render.block.BlockColorMap; import net.minecraft.client.render.block.BlockColorMapper; diff --git a/src/main/java/net/fabricmc/fabric/mixin/registry/client/MixinItemColorMap.java b/src/main/java/net/fabricmc/fabric/mixin/registry/client/MixinItemColorMap.java index 37e5865e2..801d2119a 100644 --- a/src/main/java/net/fabricmc/fabric/mixin/registry/client/MixinItemColorMap.java +++ b/src/main/java/net/fabricmc/fabric/mixin/registry/client/MixinItemColorMap.java @@ -17,7 +17,7 @@ package net.fabricmc.fabric.mixin.registry.client; import net.fabricmc.fabric.registry.ListenableRegistry; -import net.fabricmc.fabric.registry.impl.listeners.IdListUpdater; +import net.fabricmc.fabric.impl.registry.IdListUpdater; import net.minecraft.client.render.block.BlockColorMap; import net.minecraft.client.render.item.ItemColorMap; import net.minecraft.client.render.item.ItemColorMapper; diff --git a/src/main/java/net/fabricmc/fabric/mixin/resources/MixinMinecraftGame.java b/src/main/java/net/fabricmc/fabric/mixin/resources/MixinMinecraftGame.java index 3fb04117b..21791a885 100644 --- a/src/main/java/net/fabricmc/fabric/mixin/resources/MixinMinecraftGame.java +++ b/src/main/java/net/fabricmc/fabric/mixin/resources/MixinMinecraftGame.java @@ -16,7 +16,7 @@ package net.fabricmc.fabric.mixin.resources; -import net.fabricmc.fabric.resources.impl.ModResourcePackUtil; +import net.fabricmc.fabric.impl.resources.ModResourcePackUtil; import net.minecraft.client.MinecraftClient; import net.minecraft.resource.ReloadableResourceManager; import net.minecraft.resource.ResourcePack; diff --git a/src/main/java/net/fabricmc/fabric/mixin/resources/MixinMinecraftServer.java b/src/main/java/net/fabricmc/fabric/mixin/resources/MixinMinecraftServer.java index 811daf2fe..ccad70c30 100644 --- a/src/main/java/net/fabricmc/fabric/mixin/resources/MixinMinecraftServer.java +++ b/src/main/java/net/fabricmc/fabric/mixin/resources/MixinMinecraftServer.java @@ -16,7 +16,7 @@ package net.fabricmc.fabric.mixin.resources; -import net.fabricmc.fabric.resources.impl.ModDataPackSupplier; +import net.fabricmc.fabric.impl.resources.ModDataPackSupplier; import net.minecraft.resource.ResourcePackContainer; import net.minecraft.resource.ResourcePackContainerManager; import net.minecraft.server.MinecraftServer; diff --git a/src/main/resources/mod.json b/src/main/resources/fabric.mod.json similarity index 87% rename from src/main/resources/mod.json rename to src/main/resources/fabric.mod.json index e1cfe9845..eae9dac45 100644 --- a/src/main/resources/mod.json +++ b/src/main/resources/fabric.mod.json @@ -6,7 +6,7 @@ "description": "Core API module providing key hooks and intercompatibility features.", "license": "Apache-2.0", "initializers": [ - "net.fabricmc.fabric.FabricAPI" + "net.fabricmc.fabric.impl.FabricAPIInitializer" ], "mixins": { "client": "net.fabricmc.fabric.mixins.client.json",