diff --git a/src/main/java/net/fabricmc/fabric/block/BreakInteractable.java b/src/main/java/net/fabricmc/fabric/api/block/BreakInteractable.java similarity index 96% rename from src/main/java/net/fabricmc/fabric/block/BreakInteractable.java rename to src/main/java/net/fabricmc/fabric/api/block/BreakInteractable.java index bba73fca2..d7e024467 100644 --- a/src/main/java/net/fabricmc/fabric/block/BreakInteractable.java +++ b/src/main/java/net/fabricmc/fabric/api/block/BreakInteractable.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package net.fabricmc.fabric.block; +package net.fabricmc.fabric.api.block; import net.minecraft.block.BlockState; import net.minecraft.entity.player.PlayerEntity; diff --git a/src/main/java/net/fabricmc/fabric/block/FabricBlockSettings.java b/src/main/java/net/fabricmc/fabric/api/block/FabricBlockSettings.java similarity index 98% rename from src/main/java/net/fabricmc/fabric/block/FabricBlockSettings.java rename to src/main/java/net/fabricmc/fabric/api/block/FabricBlockSettings.java index 112b1e22d..b5ced4869 100644 --- a/src/main/java/net/fabricmc/fabric/block/FabricBlockSettings.java +++ b/src/main/java/net/fabricmc/fabric/api/block/FabricBlockSettings.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package net.fabricmc.fabric.block; +package net.fabricmc.fabric.api.block; -import net.fabricmc.fabric.tools.ToolManager; +import net.fabricmc.fabric.impl.tools.ToolManager; import net.minecraft.block.Block; import net.minecraft.block.Material; import net.minecraft.block.MaterialColor; diff --git a/src/main/java/net/fabricmc/fabric/block/entity/ClientSerializable.java b/src/main/java/net/fabricmc/fabric/api/block/entity/ClientSerializable.java similarity index 91% rename from src/main/java/net/fabricmc/fabric/block/entity/ClientSerializable.java rename to src/main/java/net/fabricmc/fabric/api/block/entity/ClientSerializable.java index 6cf29ae2d..9e74c4db8 100644 --- a/src/main/java/net/fabricmc/fabric/block/entity/ClientSerializable.java +++ b/src/main/java/net/fabricmc/fabric/api/block/entity/ClientSerializable.java @@ -14,9 +14,8 @@ * limitations under the License. */ -package net.fabricmc.fabric.block.entity; +package net.fabricmc.fabric.api.block.entity; -import net.minecraft.block.entity.BlockEntity; import net.minecraft.nbt.CompoundTag; /** diff --git a/src/main/java/net/fabricmc/fabric/api/client/itemgroup/FabricItemGroupBuilder.java b/src/main/java/net/fabricmc/fabric/api/client/itemgroup/FabricItemGroupBuilder.java index 7504649ec..6b48c9e29 100644 --- a/src/main/java/net/fabricmc/fabric/api/client/itemgroup/FabricItemGroupBuilder.java +++ b/src/main/java/net/fabricmc/fabric/api/client/itemgroup/FabricItemGroupBuilder.java @@ -16,7 +16,7 @@ package net.fabricmc.fabric.api.client.itemgroup; -import net.fabricmc.fabric.client.itemgroup.ItemGroupExtensions; +import net.fabricmc.fabric.impl.itemgroup.ItemGroupExtensions; import net.minecraft.item.ItemGroup; import net.minecraft.item.ItemStack; import net.minecraft.util.DefaultedList; diff --git a/src/main/java/net/fabricmc/fabric/client/render/BlockEntityRendererRegistry.java b/src/main/java/net/fabricmc/fabric/api/client/render/BlockEntityRendererRegistry.java similarity index 97% rename from src/main/java/net/fabricmc/fabric/client/render/BlockEntityRendererRegistry.java rename to src/main/java/net/fabricmc/fabric/api/client/render/BlockEntityRendererRegistry.java index 7e1be4f02..b37fac0b8 100644 --- a/src/main/java/net/fabricmc/fabric/client/render/BlockEntityRendererRegistry.java +++ b/src/main/java/net/fabricmc/fabric/api/client/render/BlockEntityRendererRegistry.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package net.fabricmc.fabric.client.render; +package net.fabricmc.fabric.api.client.render; import net.minecraft.block.entity.BlockEntity; import net.minecraft.client.render.block.entity.BlockEntityRenderDispatcher; diff --git a/src/main/java/net/fabricmc/fabric/client/render/EntityRendererRegistry.java b/src/main/java/net/fabricmc/fabric/api/client/render/EntityRendererRegistry.java similarity index 97% rename from src/main/java/net/fabricmc/fabric/client/render/EntityRendererRegistry.java rename to src/main/java/net/fabricmc/fabric/api/client/render/EntityRendererRegistry.java index 499ba33ed..d60d525f1 100644 --- a/src/main/java/net/fabricmc/fabric/client/render/EntityRendererRegistry.java +++ b/src/main/java/net/fabricmc/fabric/api/client/render/EntityRendererRegistry.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package net.fabricmc.fabric.client.render; +package net.fabricmc.fabric.api.client.render; import net.minecraft.client.render.entity.EntityRenderDispatcher; import net.minecraft.client.render.entity.EntityRenderer; @@ -26,7 +26,6 @@ import net.minecraft.resource.ReloadableResourceManager; import java.util.HashMap; import java.util.Map; import java.util.WeakHashMap; -import java.util.function.Function; /** * Helper class for registering EntityRenderers. diff --git a/src/main/java/net/fabricmc/fabric/client/texture/CustomSpriteLoader.java b/src/main/java/net/fabricmc/fabric/api/client/texture/CustomSpriteLoader.java similarity index 96% rename from src/main/java/net/fabricmc/fabric/client/texture/CustomSpriteLoader.java rename to src/main/java/net/fabricmc/fabric/api/client/texture/CustomSpriteLoader.java index c4ac06950..a2826b785 100644 --- a/src/main/java/net/fabricmc/fabric/client/texture/CustomSpriteLoader.java +++ b/src/main/java/net/fabricmc/fabric/api/client/texture/CustomSpriteLoader.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package net.fabricmc.fabric.client.texture; +package net.fabricmc.fabric.api.client.texture; import net.minecraft.resource.ResourceManager; diff --git a/src/main/java/net/fabricmc/fabric/client/texture/DependentSprite.java b/src/main/java/net/fabricmc/fabric/api/client/texture/DependentSprite.java similarity index 95% rename from src/main/java/net/fabricmc/fabric/client/texture/DependentSprite.java rename to src/main/java/net/fabricmc/fabric/api/client/texture/DependentSprite.java index bef0861a4..6ef7ffefa 100644 --- a/src/main/java/net/fabricmc/fabric/client/texture/DependentSprite.java +++ b/src/main/java/net/fabricmc/fabric/api/client/texture/DependentSprite.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package net.fabricmc.fabric.client.texture; +package net.fabricmc.fabric.api.client.texture; import net.minecraft.util.Identifier; diff --git a/src/main/java/net/fabricmc/fabric/entity/EntityTrackingRegistry.java b/src/main/java/net/fabricmc/fabric/api/entity/EntityTrackingRegistry.java similarity index 98% rename from src/main/java/net/fabricmc/fabric/entity/EntityTrackingRegistry.java rename to src/main/java/net/fabricmc/fabric/api/entity/EntityTrackingRegistry.java index 26d299e74..0e36cf2cc 100644 --- a/src/main/java/net/fabricmc/fabric/entity/EntityTrackingRegistry.java +++ b/src/main/java/net/fabricmc/fabric/api/entity/EntityTrackingRegistry.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package net.fabricmc.fabric.entity; +package net.fabricmc.fabric.api.entity; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityType; diff --git a/src/main/java/net/fabricmc/fabric/entity/FabricEntityTypeBuilder.java b/src/main/java/net/fabricmc/fabric/api/entity/FabricEntityTypeBuilder.java similarity index 97% rename from src/main/java/net/fabricmc/fabric/entity/FabricEntityTypeBuilder.java rename to src/main/java/net/fabricmc/fabric/api/entity/FabricEntityTypeBuilder.java index 1dbc4615e..baa9c504d 100644 --- a/src/main/java/net/fabricmc/fabric/entity/FabricEntityTypeBuilder.java +++ b/src/main/java/net/fabricmc/fabric/api/entity/FabricEntityTypeBuilder.java @@ -14,12 +14,11 @@ * limitations under the License. */ -package net.fabricmc.fabric.entity; +package net.fabricmc.fabric.api.entity; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityCategory; import net.minecraft.entity.EntityType; -import net.minecraft.entity.EntityType.Builder; import net.minecraft.world.World; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/src/main/java/net/fabricmc/fabric/api/event/player/AttackBlockCallback.java b/src/main/java/net/fabricmc/fabric/api/event/player/AttackBlockCallback.java index b17a9c2fb..6a7a5331d 100644 --- a/src/main/java/net/fabricmc/fabric/api/event/player/AttackBlockCallback.java +++ b/src/main/java/net/fabricmc/fabric/api/event/player/AttackBlockCallback.java @@ -25,6 +25,16 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Direction; import net.minecraft.world.World; +/** + * Callback for left-clicking ("attacking") a block. + * + * Upon return: + * - SUCCESS cancels further processing and, on the client, sends a packet to the server. + * - PASS falls back to further processing. + * - FAIL cancels further processing and does not send a packet to the server. + * + * ATTACK_BLOCK does not let you control the packet sending process yet. + */ public interface AttackBlockCallback { public static final Event EVENT = EventFactory.arrayBacked(AttackBlockCallback.class, (listeners) -> (player, world, hand, pos, direction) -> { diff --git a/src/main/java/net/fabricmc/fabric/api/event/player/AttackEntityCallback.java b/src/main/java/net/fabricmc/fabric/api/event/player/AttackEntityCallback.java index d7b6cc3a5..9605d80d0 100644 --- a/src/main/java/net/fabricmc/fabric/api/event/player/AttackEntityCallback.java +++ b/src/main/java/net/fabricmc/fabric/api/event/player/AttackEntityCallback.java @@ -25,6 +25,14 @@ import net.minecraft.util.Hand; import net.minecraft.util.hit.EntityHitResult; import net.minecraft.world.World; +/** + * Callback for left-clicking ("attacking") an entity. + * + * Upon return: + * - SUCCESS cancels further processing and, on the client, sends a packet to the server. + * - PASS falls back to further processing. + * - FAIL cancels further processing and does not send a packet to the server. + */ public interface AttackEntityCallback { public static final Event EVENT = EventFactory.arrayBacked(AttackEntityCallback.class, (listeners) -> (player, world, hand, entity, hitResult) -> { diff --git a/src/main/java/net/fabricmc/fabric/api/event/player/UseBlockCallback.java b/src/main/java/net/fabricmc/fabric/api/event/player/UseBlockCallback.java index 6f0f3861b..316822a3e 100644 --- a/src/main/java/net/fabricmc/fabric/api/event/player/UseBlockCallback.java +++ b/src/main/java/net/fabricmc/fabric/api/event/player/UseBlockCallback.java @@ -26,6 +26,14 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Direction; import net.minecraft.world.World; +/** + * Callback for right-clicking ("using") a block. + * + * Upon return: + * - SUCCESS cancels further processing and, on the client, sends a packet to the server. + * - PASS falls back to further processing. + * - FAIL cancels further processing and does not send a packet to the server. + */ public interface UseBlockCallback { public static final Event EVENT = EventFactory.arrayBacked(UseBlockCallback.class, (listeners) -> (player, world, hand, hitResult) -> { diff --git a/src/main/java/net/fabricmc/fabric/api/event/player/UseEntityCallback.java b/src/main/java/net/fabricmc/fabric/api/event/player/UseEntityCallback.java index 96a589658..be7bab648 100644 --- a/src/main/java/net/fabricmc/fabric/api/event/player/UseEntityCallback.java +++ b/src/main/java/net/fabricmc/fabric/api/event/player/UseEntityCallback.java @@ -25,6 +25,14 @@ import net.minecraft.util.Hand; import net.minecraft.util.hit.EntityHitResult; import net.minecraft.world.World; +/** + * Callback for right-clicking ("using") an entity. + * + * Upon return: + * - SUCCESS cancels further processing and, on the client, sends a packet to the server. + * - PASS falls back to further processing. + * - FAIL cancels further processing and does not send a packet to the server. + */ public interface UseEntityCallback { public static final Event EVENT = EventFactory.arrayBacked(UseEntityCallback.class, (listeners) -> (player, world, hand, entity, hitResult) -> { diff --git a/src/main/java/net/fabricmc/fabric/api/event/player/UseItemCallback.java b/src/main/java/net/fabricmc/fabric/api/event/player/UseItemCallback.java index cf5d9e6ff..0820f44db 100644 --- a/src/main/java/net/fabricmc/fabric/api/event/player/UseItemCallback.java +++ b/src/main/java/net/fabricmc/fabric/api/event/player/UseItemCallback.java @@ -23,6 +23,14 @@ import net.minecraft.util.ActionResult; import net.minecraft.util.Hand; import net.minecraft.world.World; +/** + * Callback for right-clicking ("using") an item. + * + * Upon return: + * - SUCCESS cancels further processing and, on the client, sends a packet to the server. + * - PASS falls back to further processing. + * - FAIL cancels further processing and does not send a packet to the server. + */ public interface UseItemCallback { public static final Event EVENT = EventFactory.arrayBacked(UseItemCallback.class, (listeners) -> (player, world, hand) -> { diff --git a/src/main/java/net/fabricmc/fabric/networking/CustomPayloadPacketRegistry.java b/src/main/java/net/fabricmc/fabric/api/network/CustomPayloadPacketRegistry.java similarity index 98% rename from src/main/java/net/fabricmc/fabric/networking/CustomPayloadPacketRegistry.java rename to src/main/java/net/fabricmc/fabric/api/network/CustomPayloadPacketRegistry.java index 172c42f69..cbca32b25 100644 --- a/src/main/java/net/fabricmc/fabric/networking/CustomPayloadPacketRegistry.java +++ b/src/main/java/net/fabricmc/fabric/api/network/CustomPayloadPacketRegistry.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package net.fabricmc.fabric.networking; +package net.fabricmc.fabric.api.network; import net.minecraft.util.Identifier; import net.minecraft.util.PacketByteBuf; diff --git a/src/main/java/net/fabricmc/fabric/networking/PacketContext.java b/src/main/java/net/fabricmc/fabric/api/network/PacketContext.java similarity index 98% rename from src/main/java/net/fabricmc/fabric/networking/PacketContext.java rename to src/main/java/net/fabricmc/fabric/api/network/PacketContext.java index e19ad3553..51258e457 100644 --- a/src/main/java/net/fabricmc/fabric/networking/PacketContext.java +++ b/src/main/java/net/fabricmc/fabric/api/network/PacketContext.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package net.fabricmc.fabric.networking; +package net.fabricmc.fabric.api.network; import net.fabricmc.api.EnvType; import net.minecraft.entity.player.PlayerEntity; diff --git a/src/main/java/net/fabricmc/fabric/commands/CommandRegistry.java b/src/main/java/net/fabricmc/fabric/api/registry/CommandRegistry.java similarity index 97% rename from src/main/java/net/fabricmc/fabric/commands/CommandRegistry.java rename to src/main/java/net/fabricmc/fabric/api/registry/CommandRegistry.java index 4101237df..8c01806af 100644 --- a/src/main/java/net/fabricmc/fabric/commands/CommandRegistry.java +++ b/src/main/java/net/fabricmc/fabric/api/registry/CommandRegistry.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package net.fabricmc.fabric.commands; +package net.fabricmc.fabric.api.registry; import com.mojang.brigadier.CommandDispatcher; import net.minecraft.server.command.ServerCommandSource; diff --git a/src/main/java/net/fabricmc/fabric/resources/ModResourcePack.java b/src/main/java/net/fabricmc/fabric/api/resource/ModResourcePack.java similarity index 95% rename from src/main/java/net/fabricmc/fabric/resources/ModResourcePack.java rename to src/main/java/net/fabricmc/fabric/api/resource/ModResourcePack.java index 3c7f06356..466b55e6f 100644 --- a/src/main/java/net/fabricmc/fabric/resources/ModResourcePack.java +++ b/src/main/java/net/fabricmc/fabric/api/resource/ModResourcePack.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package net.fabricmc.fabric.resources; +package net.fabricmc.fabric.api.resource; import net.fabricmc.loader.ModInfo; import net.minecraft.resource.ResourcePack; diff --git a/src/main/java/net/fabricmc/fabric/tags/FabricBlockTags.java b/src/main/java/net/fabricmc/fabric/api/tags/FabricBlockTags.java similarity index 87% rename from src/main/java/net/fabricmc/fabric/tags/FabricBlockTags.java rename to src/main/java/net/fabricmc/fabric/api/tags/FabricBlockTags.java index 4a674cb7c..7183bee4c 100644 --- a/src/main/java/net/fabricmc/fabric/tags/FabricBlockTags.java +++ b/src/main/java/net/fabricmc/fabric/api/tags/FabricBlockTags.java @@ -14,12 +14,9 @@ * limitations under the License. */ -package net.fabricmc.fabric.tags; +package net.fabricmc.fabric.api.tags; import net.minecraft.block.Block; -import net.minecraft.item.Item; -import net.minecraft.tag.BlockTags; -import net.minecraft.tag.ItemTags; import net.minecraft.tag.Tag; import net.minecraft.util.Identifier; diff --git a/src/main/java/net/fabricmc/fabric/tags/FabricItemTags.java b/src/main/java/net/fabricmc/fabric/api/tags/FabricItemTags.java similarity index 94% rename from src/main/java/net/fabricmc/fabric/tags/FabricItemTags.java rename to src/main/java/net/fabricmc/fabric/api/tags/FabricItemTags.java index 95ba3e2e1..a75f2e08f 100644 --- a/src/main/java/net/fabricmc/fabric/tags/FabricItemTags.java +++ b/src/main/java/net/fabricmc/fabric/api/tags/FabricItemTags.java @@ -14,10 +14,9 @@ * limitations under the License. */ -package net.fabricmc.fabric.tags; +package net.fabricmc.fabric.api.tags; import net.minecraft.item.Item; -import net.minecraft.tag.ItemTags; import net.minecraft.tag.Tag; import net.minecraft.util.Identifier; diff --git a/src/main/java/net/fabricmc/fabric/tags/TagDelegate.java b/src/main/java/net/fabricmc/fabric/api/tags/TagDelegate.java similarity index 92% rename from src/main/java/net/fabricmc/fabric/tags/TagDelegate.java rename to src/main/java/net/fabricmc/fabric/api/tags/TagDelegate.java index b16386c56..d333fc851 100644 --- a/src/main/java/net/fabricmc/fabric/tags/TagDelegate.java +++ b/src/main/java/net/fabricmc/fabric/api/tags/TagDelegate.java @@ -14,10 +14,8 @@ * limitations under the License. */ -package net.fabricmc.fabric.tags; +package net.fabricmc.fabric.api.tags; -import net.minecraft.item.Item; -import net.minecraft.tag.ItemTags; import net.minecraft.tag.Tag; import net.minecraft.util.Identifier; diff --git a/src/main/java/net/fabricmc/fabric/tags/TagRegistry.java b/src/main/java/net/fabricmc/fabric/api/tags/TagRegistry.java similarity index 97% rename from src/main/java/net/fabricmc/fabric/tags/TagRegistry.java rename to src/main/java/net/fabricmc/fabric/api/tags/TagRegistry.java index 126384fe6..b989bc164 100644 --- a/src/main/java/net/fabricmc/fabric/tags/TagRegistry.java +++ b/src/main/java/net/fabricmc/fabric/api/tags/TagRegistry.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package net.fabricmc.fabric.tags; +package net.fabricmc.fabric.api.tags; import net.minecraft.block.Block; import net.minecraft.item.Item; diff --git a/src/main/java/net/fabricmc/fabric/util/TriState.java b/src/main/java/net/fabricmc/fabric/api/util/TriState.java similarity index 95% rename from src/main/java/net/fabricmc/fabric/util/TriState.java rename to src/main/java/net/fabricmc/fabric/api/util/TriState.java index 5b7bb481c..5ed698368 100644 --- a/src/main/java/net/fabricmc/fabric/util/TriState.java +++ b/src/main/java/net/fabricmc/fabric/api/util/TriState.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package net.fabricmc.fabric.util; +package net.fabricmc.fabric.api.util; public enum TriState { FALSE, diff --git a/src/main/java/net/fabricmc/fabric/impl/FabricAPIClientInitializer.java b/src/main/java/net/fabricmc/fabric/impl/FabricAPIClientInitializer.java index a94fdd55e..aa05eb138 100644 --- a/src/main/java/net/fabricmc/fabric/impl/FabricAPIClientInitializer.java +++ b/src/main/java/net/fabricmc/fabric/impl/FabricAPIClientInitializer.java @@ -18,10 +18,9 @@ package net.fabricmc.fabric.impl; import net.fabricmc.api.ClientModInitializer; import net.fabricmc.fabric.impl.client.gui.GuiProviderImpl; -import net.fabricmc.fabric.networking.CustomPayloadPacketRegistry; -import net.fabricmc.fabric.registry.RegistrySyncManager; +import net.fabricmc.fabric.api.network.CustomPayloadPacketRegistry; +import net.fabricmc.fabric.impl.registry.RegistrySyncManager; import net.minecraft.client.MinecraftClient; -import net.minecraft.server.integrated.IntegratedServer; public class FabricAPIClientInitializer implements ClientModInitializer { @Override diff --git a/src/main/java/net/fabricmc/fabric/impl/FabricAPIInitializer.java b/src/main/java/net/fabricmc/fabric/impl/FabricAPIInitializer.java index ce90fe4f6..692ae4a62 100644 --- a/src/main/java/net/fabricmc/fabric/impl/FabricAPIInitializer.java +++ b/src/main/java/net/fabricmc/fabric/impl/FabricAPIInitializer.java @@ -18,7 +18,7 @@ package net.fabricmc.fabric.impl; import net.fabricmc.api.ModInitializer; import net.fabricmc.fabric.api.event.player.AttackBlockCallback; -import net.fabricmc.fabric.block.BreakInteractable; +import net.fabricmc.fabric.api.block.BreakInteractable; import net.minecraft.block.BlockState; import net.minecraft.util.ActionResult; @@ -26,8 +26,6 @@ public class FabricAPIInitializer implements ModInitializer { @Override public void onInitialize() { AttackBlockCallback.EVENT.register((player, world, hand, pos, direction) -> { - System.out.println("--- DEMO --- PlayerInteractCallback called!"); - BlockState state = world.getBlockState(pos); if (state instanceof BreakInteractable) { if (((BreakInteractable) state).onBreakInteract(state, world, pos, player, hand, direction)) { diff --git a/src/main/java/net/fabricmc/fabric/impl/client/gui/GuiProviderImpl.java b/src/main/java/net/fabricmc/fabric/impl/client/gui/GuiProviderImpl.java index b1fd8cbac..82695aaa6 100644 --- a/src/main/java/net/fabricmc/fabric/impl/client/gui/GuiProviderImpl.java +++ b/src/main/java/net/fabricmc/fabric/impl/client/gui/GuiProviderImpl.java @@ -18,10 +18,9 @@ package net.fabricmc.fabric.impl.client.gui; import net.fabricmc.fabric.api.client.gui.GuiProviderRegistry; import net.fabricmc.fabric.api.container.ContainerFactory; -import net.fabricmc.fabric.api.container.ContainerProviderRegistry; import net.fabricmc.fabric.api.client.gui.GuiFactory; import net.fabricmc.fabric.impl.container.ContainerProviderImpl; -import net.fabricmc.fabric.networking.CustomPayloadPacketRegistry; +import net.fabricmc.fabric.api.network.CustomPayloadPacketRegistry; import net.minecraft.client.MinecraftClient; import net.minecraft.client.gui.ContainerScreen; import net.minecraft.container.Container; diff --git a/src/main/java/net/fabricmc/fabric/impl/client/keybinding/KeyBindingRegistryImpl.java b/src/main/java/net/fabricmc/fabric/impl/client/keybinding/KeyBindingRegistryImpl.java index af4ef855f..65db6ed4f 100644 --- a/src/main/java/net/fabricmc/fabric/impl/client/keybinding/KeyBindingRegistryImpl.java +++ b/src/main/java/net/fabricmc/fabric/impl/client/keybinding/KeyBindingRegistryImpl.java @@ -18,7 +18,6 @@ package net.fabricmc.fabric.impl.client.keybinding; import net.fabricmc.fabric.api.client.keybinding.FabricKeyBinding; import net.fabricmc.fabric.api.client.keybinding.KeyBindingRegistry; -import net.minecraft.client.MinecraftClient; import net.minecraft.client.options.KeyBinding; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/src/main/java/net/fabricmc/fabric/client/itemgroup/CreativeGuiExtensions.java b/src/main/java/net/fabricmc/fabric/impl/itemgroup/CreativeGuiExtensions.java similarity index 95% rename from src/main/java/net/fabricmc/fabric/client/itemgroup/CreativeGuiExtensions.java rename to src/main/java/net/fabricmc/fabric/impl/itemgroup/CreativeGuiExtensions.java index 32786b6d7..09921b567 100644 --- a/src/main/java/net/fabricmc/fabric/client/itemgroup/CreativeGuiExtensions.java +++ b/src/main/java/net/fabricmc/fabric/impl/itemgroup/CreativeGuiExtensions.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package net.fabricmc.fabric.client.itemgroup; +package net.fabricmc.fabric.impl.itemgroup; public interface CreativeGuiExtensions { diff --git a/src/main/java/net/fabricmc/fabric/client/itemgroup/FabricCreativeGuiComponents.java b/src/main/java/net/fabricmc/fabric/impl/itemgroup/FabricCreativeGuiComponents.java similarity index 98% rename from src/main/java/net/fabricmc/fabric/client/itemgroup/FabricCreativeGuiComponents.java rename to src/main/java/net/fabricmc/fabric/impl/itemgroup/FabricCreativeGuiComponents.java index af5eaef24..dedb3d429 100644 --- a/src/main/java/net/fabricmc/fabric/client/itemgroup/FabricCreativeGuiComponents.java +++ b/src/main/java/net/fabricmc/fabric/impl/itemgroup/FabricCreativeGuiComponents.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package net.fabricmc.fabric.client.itemgroup; +package net.fabricmc.fabric.impl.itemgroup; import com.mojang.blaze3d.platform.GlStateManager; import net.minecraft.client.MinecraftClient; diff --git a/src/main/java/net/fabricmc/fabric/client/itemgroup/ItemGroupExtensions.java b/src/main/java/net/fabricmc/fabric/impl/itemgroup/ItemGroupExtensions.java similarity index 93% rename from src/main/java/net/fabricmc/fabric/client/itemgroup/ItemGroupExtensions.java rename to src/main/java/net/fabricmc/fabric/impl/itemgroup/ItemGroupExtensions.java index f25dbff0f..9ea5aa9ba 100644 --- a/src/main/java/net/fabricmc/fabric/client/itemgroup/ItemGroupExtensions.java +++ b/src/main/java/net/fabricmc/fabric/impl/itemgroup/ItemGroupExtensions.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package net.fabricmc.fabric.client.itemgroup; +package net.fabricmc.fabric.impl.itemgroup; public interface ItemGroupExtensions { diff --git a/src/main/java/net/fabricmc/fabric/networking/SPacketCustomPayloadAccessor.java b/src/main/java/net/fabricmc/fabric/impl/network/SPacketCustomPayloadAccessor.java similarity index 95% rename from src/main/java/net/fabricmc/fabric/networking/SPacketCustomPayloadAccessor.java rename to src/main/java/net/fabricmc/fabric/impl/network/SPacketCustomPayloadAccessor.java index b23635d02..6e14a35e3 100644 --- a/src/main/java/net/fabricmc/fabric/networking/SPacketCustomPayloadAccessor.java +++ b/src/main/java/net/fabricmc/fabric/impl/network/SPacketCustomPayloadAccessor.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package net.fabricmc.fabric.networking; +package net.fabricmc.fabric.impl.network; import net.minecraft.util.Identifier; import net.minecraft.util.PacketByteBuf; diff --git a/src/main/java/net/fabricmc/fabric/impl/registry/BootstrapBiomeRegistryListener.java b/src/main/java/net/fabricmc/fabric/impl/registry/BootstrapBiomeRegistryListener.java index 732c6329c..14bd8a4f5 100644 --- a/src/main/java/net/fabricmc/fabric/impl/registry/BootstrapBiomeRegistryListener.java +++ b/src/main/java/net/fabricmc/fabric/impl/registry/BootstrapBiomeRegistryListener.java @@ -16,8 +16,6 @@ package net.fabricmc.fabric.impl.registry; -import net.fabricmc.fabric.registry.ExtendedIdList; -import net.fabricmc.fabric.registry.RegistryListener; import net.minecraft.util.Identifier; import net.minecraft.util.registry.Registry; import net.minecraft.world.biome.Biome; diff --git a/src/main/java/net/fabricmc/fabric/impl/registry/BootstrapBlockRegistryListener.java b/src/main/java/net/fabricmc/fabric/impl/registry/BootstrapBlockRegistryListener.java index 3f121498c..21e1527b1 100644 --- a/src/main/java/net/fabricmc/fabric/impl/registry/BootstrapBlockRegistryListener.java +++ b/src/main/java/net/fabricmc/fabric/impl/registry/BootstrapBlockRegistryListener.java @@ -16,8 +16,6 @@ package net.fabricmc.fabric.impl.registry; -import net.fabricmc.fabric.registry.ExtendedIdList; -import net.fabricmc.fabric.registry.RegistryListener; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.util.Identifier; diff --git a/src/main/java/net/fabricmc/fabric/impl/registry/BootstrapFluidRegistryListener.java b/src/main/java/net/fabricmc/fabric/impl/registry/BootstrapFluidRegistryListener.java index 67d4d699d..a08366253 100644 --- a/src/main/java/net/fabricmc/fabric/impl/registry/BootstrapFluidRegistryListener.java +++ b/src/main/java/net/fabricmc/fabric/impl/registry/BootstrapFluidRegistryListener.java @@ -16,8 +16,6 @@ package net.fabricmc.fabric.impl.registry; -import net.fabricmc.fabric.registry.ExtendedIdList; -import net.fabricmc.fabric.registry.RegistryListener; import net.minecraft.fluid.Fluid; import net.minecraft.fluid.FluidState; import net.minecraft.util.Identifier; diff --git a/src/main/java/net/fabricmc/fabric/impl/registry/BootstrapItemRegistryListener.java b/src/main/java/net/fabricmc/fabric/impl/registry/BootstrapItemRegistryListener.java index 56620a133..11ed448a9 100644 --- a/src/main/java/net/fabricmc/fabric/impl/registry/BootstrapItemRegistryListener.java +++ b/src/main/java/net/fabricmc/fabric/impl/registry/BootstrapItemRegistryListener.java @@ -16,7 +16,6 @@ package net.fabricmc.fabric.impl.registry; -import net.fabricmc.fabric.registry.RegistryListener; import net.minecraft.item.Item; import net.minecraft.item.block.BlockItem; import net.minecraft.util.Identifier; diff --git a/src/main/java/net/fabricmc/fabric/registry/ExtendedIdList.java b/src/main/java/net/fabricmc/fabric/impl/registry/ExtendedIdList.java similarity index 93% rename from src/main/java/net/fabricmc/fabric/registry/ExtendedIdList.java rename to src/main/java/net/fabricmc/fabric/impl/registry/ExtendedIdList.java index 5155438f1..2fc66062e 100644 --- a/src/main/java/net/fabricmc/fabric/registry/ExtendedIdList.java +++ b/src/main/java/net/fabricmc/fabric/impl/registry/ExtendedIdList.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package net.fabricmc.fabric.registry; +package net.fabricmc.fabric.impl.registry; public interface ExtendedIdList { void clear(); diff --git a/src/main/java/net/fabricmc/fabric/impl/registry/IdListUpdater.java b/src/main/java/net/fabricmc/fabric/impl/registry/IdListUpdater.java index 6dad89a8c..5727212b5 100644 --- a/src/main/java/net/fabricmc/fabric/impl/registry/IdListUpdater.java +++ b/src/main/java/net/fabricmc/fabric/impl/registry/IdListUpdater.java @@ -16,8 +16,6 @@ package net.fabricmc.fabric.impl.registry; -import net.fabricmc.fabric.registry.ExtendedIdList; -import net.fabricmc.fabric.registry.RegistryListener; import net.minecraft.util.IdList; import net.minecraft.util.Identifier; import net.minecraft.util.registry.Registry; diff --git a/src/main/java/net/fabricmc/fabric/registry/ListenableRegistry.java b/src/main/java/net/fabricmc/fabric/impl/registry/ListenableRegistry.java similarity index 94% rename from src/main/java/net/fabricmc/fabric/registry/ListenableRegistry.java rename to src/main/java/net/fabricmc/fabric/impl/registry/ListenableRegistry.java index 32e1f5f9f..40ed214f8 100644 --- a/src/main/java/net/fabricmc/fabric/registry/ListenableRegistry.java +++ b/src/main/java/net/fabricmc/fabric/impl/registry/ListenableRegistry.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package net.fabricmc.fabric.registry; +package net.fabricmc.fabric.impl.registry; public interface ListenableRegistry { void registerListener(RegistryListener listener); diff --git a/src/main/java/net/fabricmc/fabric/registry/RegistryListener.java b/src/main/java/net/fabricmc/fabric/impl/registry/RegistryListener.java similarity index 95% rename from src/main/java/net/fabricmc/fabric/registry/RegistryListener.java rename to src/main/java/net/fabricmc/fabric/impl/registry/RegistryListener.java index 976429efb..e996b9a98 100644 --- a/src/main/java/net/fabricmc/fabric/registry/RegistryListener.java +++ b/src/main/java/net/fabricmc/fabric/impl/registry/RegistryListener.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package net.fabricmc.fabric.registry; +package net.fabricmc.fabric.impl.registry; import net.minecraft.util.Identifier; import net.minecraft.util.registry.Registry; diff --git a/src/main/java/net/fabricmc/fabric/registry/RegistrySyncManager.java b/src/main/java/net/fabricmc/fabric/impl/registry/RegistrySyncManager.java similarity index 97% rename from src/main/java/net/fabricmc/fabric/registry/RegistrySyncManager.java rename to src/main/java/net/fabricmc/fabric/impl/registry/RegistrySyncManager.java index f6889b979..8120280e1 100644 --- a/src/main/java/net/fabricmc/fabric/registry/RegistrySyncManager.java +++ b/src/main/java/net/fabricmc/fabric/impl/registry/RegistrySyncManager.java @@ -14,13 +14,13 @@ * limitations under the License. */ -package net.fabricmc.fabric.registry; +package net.fabricmc.fabric.impl.registry; import com.google.common.collect.ImmutableSet; import io.netty.buffer.Unpooled; import it.unimi.dsi.fastutil.objects.Object2IntMap; import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap; -import net.fabricmc.fabric.networking.PacketContext; +import net.fabricmc.fabric.api.network.PacketContext; import net.minecraft.client.network.packet.CustomPayloadClientPacket; import net.minecraft.nbt.CompoundTag; import net.minecraft.util.Identifier; diff --git a/src/main/java/net/fabricmc/fabric/registry/RemapException.java b/src/main/java/net/fabricmc/fabric/impl/registry/RemapException.java similarity index 94% rename from src/main/java/net/fabricmc/fabric/registry/RemapException.java rename to src/main/java/net/fabricmc/fabric/impl/registry/RemapException.java index 5e8328375..a0ac3305a 100644 --- a/src/main/java/net/fabricmc/fabric/registry/RemapException.java +++ b/src/main/java/net/fabricmc/fabric/impl/registry/RemapException.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package net.fabricmc.fabric.registry; +package net.fabricmc.fabric.impl.registry; public class RemapException extends Exception { public RemapException(String message) { diff --git a/src/main/java/net/fabricmc/fabric/registry/RemappableRegistry.java b/src/main/java/net/fabricmc/fabric/impl/registry/RemappableRegistry.java similarity index 95% rename from src/main/java/net/fabricmc/fabric/registry/RemappableRegistry.java rename to src/main/java/net/fabricmc/fabric/impl/registry/RemappableRegistry.java index 758d45a04..bfb1e8371 100644 --- a/src/main/java/net/fabricmc/fabric/registry/RemappableRegistry.java +++ b/src/main/java/net/fabricmc/fabric/impl/registry/RemappableRegistry.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package net.fabricmc.fabric.registry; +package net.fabricmc.fabric.impl.registry; import it.unimi.dsi.fastutil.objects.Object2IntMap; import net.minecraft.util.Identifier; diff --git a/src/main/java/net/fabricmc/fabric/impl/resources/ModDataPackSupplier.java b/src/main/java/net/fabricmc/fabric/impl/resources/ModDataPackSupplier.java index 029e952d6..624ade4c4 100644 --- a/src/main/java/net/fabricmc/fabric/impl/resources/ModDataPackSupplier.java +++ b/src/main/java/net/fabricmc/fabric/impl/resources/ModDataPackSupplier.java @@ -16,7 +16,7 @@ package net.fabricmc.fabric.impl.resources; -import net.fabricmc.fabric.resources.ModResourcePack; +import net.fabricmc.fabric.api.resource.ModResourcePack; import net.minecraft.resource.ResourcePack; import net.minecraft.resource.ResourcePackContainer; import net.minecraft.resource.ResourcePackCreator; diff --git a/src/main/java/net/fabricmc/fabric/impl/resources/ModDirectoryResourcePack.java b/src/main/java/net/fabricmc/fabric/impl/resources/ModDirectoryResourcePack.java index 5e24f0ff6..6c4457e07 100644 --- a/src/main/java/net/fabricmc/fabric/impl/resources/ModDirectoryResourcePack.java +++ b/src/main/java/net/fabricmc/fabric/impl/resources/ModDirectoryResourcePack.java @@ -16,7 +16,7 @@ package net.fabricmc.fabric.impl.resources; -import net.fabricmc.fabric.resources.ModResourcePack; +import net.fabricmc.fabric.api.resource.ModResourcePack; import net.fabricmc.loader.ModInfo; import net.minecraft.resource.DirectoryResourcePack; import net.minecraft.resource.ResourceNotFoundException; diff --git a/src/main/java/net/fabricmc/fabric/impl/resources/ModZipResourcePack.java b/src/main/java/net/fabricmc/fabric/impl/resources/ModZipResourcePack.java index f00fa8e62..a440830ca 100644 --- a/src/main/java/net/fabricmc/fabric/impl/resources/ModZipResourcePack.java +++ b/src/main/java/net/fabricmc/fabric/impl/resources/ModZipResourcePack.java @@ -16,7 +16,7 @@ package net.fabricmc.fabric.impl.resources; -import net.fabricmc.fabric.resources.ModResourcePack; +import net.fabricmc.fabric.api.resource.ModResourcePack; import net.fabricmc.loader.ModInfo; import net.minecraft.resource.ResourceNotFoundException; import net.minecraft.resource.ZipResourcePack; diff --git a/src/main/java/net/fabricmc/fabric/tools/MiningToolDelegate.java b/src/main/java/net/fabricmc/fabric/impl/tools/MiningToolDelegate.java similarity index 94% rename from src/main/java/net/fabricmc/fabric/tools/MiningToolDelegate.java rename to src/main/java/net/fabricmc/fabric/impl/tools/MiningToolDelegate.java index 845a55878..3055c2f34 100644 --- a/src/main/java/net/fabricmc/fabric/tools/MiningToolDelegate.java +++ b/src/main/java/net/fabricmc/fabric/impl/tools/MiningToolDelegate.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package net.fabricmc.fabric.tools; +package net.fabricmc.fabric.impl.tools; public interface MiningToolDelegate { float getBlockBreakingSpeed(); diff --git a/src/main/java/net/fabricmc/fabric/tools/ToolManager.java b/src/main/java/net/fabricmc/fabric/impl/tools/ToolManager.java similarity index 96% rename from src/main/java/net/fabricmc/fabric/tools/ToolManager.java rename to src/main/java/net/fabricmc/fabric/impl/tools/ToolManager.java index 53f168cd7..d0ab16b1e 100644 --- a/src/main/java/net/fabricmc/fabric/tools/ToolManager.java +++ b/src/main/java/net/fabricmc/fabric/impl/tools/ToolManager.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package net.fabricmc.fabric.tools; +package net.fabricmc.fabric.impl.tools; import net.fabricmc.fabric.api.event.registry.BlockBuildingCallback; -import net.fabricmc.fabric.block.FabricBlockSettings; -import net.fabricmc.fabric.util.TriState; +import net.fabricmc.fabric.api.block.FabricBlockSettings; +import net.fabricmc.fabric.api.util.TriState; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.item.Item; diff --git a/src/main/java/net/fabricmc/fabric/mixin/block/MixinBlockBuilder.java b/src/main/java/net/fabricmc/fabric/mixin/block/MixinBlockBuilder.java index e37e72e60..affb26469 100644 --- a/src/main/java/net/fabricmc/fabric/mixin/block/MixinBlockBuilder.java +++ b/src/main/java/net/fabricmc/fabric/mixin/block/MixinBlockBuilder.java @@ -16,7 +16,7 @@ package net.fabricmc.fabric.mixin.block; -import net.fabricmc.fabric.block.FabricBlockSettings; +import net.fabricmc.fabric.api.block.FabricBlockSettings; import net.minecraft.block.Block; import net.minecraft.block.Material; import net.minecraft.block.MaterialColor; diff --git a/src/main/java/net/fabricmc/fabric/mixin/block/entity/MixinBlockEntity.java b/src/main/java/net/fabricmc/fabric/mixin/block/entity/MixinBlockEntity.java index be26e164b..858221c3c 100644 --- a/src/main/java/net/fabricmc/fabric/mixin/block/entity/MixinBlockEntity.java +++ b/src/main/java/net/fabricmc/fabric/mixin/block/entity/MixinBlockEntity.java @@ -16,10 +16,9 @@ package net.fabricmc.fabric.mixin.block.entity; -import net.fabricmc.fabric.block.entity.ClientSerializable; +import net.fabricmc.fabric.api.block.entity.ClientSerializable; import net.minecraft.block.entity.BlockEntity; import net.minecraft.block.entity.BlockEntityType; -import net.minecraft.client.network.ClientPlayNetworkHandler; import net.minecraft.client.network.packet.BlockEntityUpdateClientPacket; import net.minecraft.nbt.CompoundTag; import net.minecraft.util.Identifier; @@ -28,9 +27,7 @@ import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; -import org.spongepowered.asm.mixin.injection.callback.LocalCapture; @Mixin(BlockEntity.class) public abstract class MixinBlockEntity { diff --git a/src/main/java/net/fabricmc/fabric/mixin/block/entity/MixinClientPlayNetworkHandler.java b/src/main/java/net/fabricmc/fabric/mixin/block/entity/MixinClientPlayNetworkHandler.java index 46d834cac..ce88c3ae4 100644 --- a/src/main/java/net/fabricmc/fabric/mixin/block/entity/MixinClientPlayNetworkHandler.java +++ b/src/main/java/net/fabricmc/fabric/mixin/block/entity/MixinClientPlayNetworkHandler.java @@ -16,14 +16,13 @@ package net.fabricmc.fabric.mixin.block.entity; -import net.fabricmc.fabric.block.entity.ClientSerializable; +import net.fabricmc.fabric.api.block.entity.ClientSerializable; import net.minecraft.block.entity.BlockEntity; import net.minecraft.block.entity.BlockEntityType; import net.minecraft.client.network.ClientPlayNetworkHandler; import net.minecraft.client.network.packet.BlockEntityUpdateClientPacket; import net.minecraft.nbt.CompoundTag; import net.minecraft.util.Identifier; -import net.minecraft.util.registry.Registry; import org.apache.logging.log4j.Logger; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; diff --git a/src/main/java/net/fabricmc/fabric/mixin/client/itemgroup/MixinCreativePlayerInventoryGui.java b/src/main/java/net/fabricmc/fabric/mixin/client/itemgroup/MixinCreativePlayerInventoryGui.java index 92db143f4..422778c6d 100644 --- a/src/main/java/net/fabricmc/fabric/mixin/client/itemgroup/MixinCreativePlayerInventoryGui.java +++ b/src/main/java/net/fabricmc/fabric/mixin/client/itemgroup/MixinCreativePlayerInventoryGui.java @@ -16,8 +16,8 @@ package net.fabricmc.fabric.mixin.client.itemgroup; -import net.fabricmc.fabric.client.itemgroup.CreativeGuiExtensions; -import net.fabricmc.fabric.client.itemgroup.FabricCreativeGuiComponents; +import net.fabricmc.fabric.impl.itemgroup.CreativeGuiExtensions; +import net.fabricmc.fabric.impl.itemgroup.FabricCreativeGuiComponents; import net.minecraft.client.gui.ingame.AbstractPlayerInventoryScreen; import net.minecraft.client.gui.ingame.CreativePlayerInventoryScreen; import net.minecraft.container.Container; diff --git a/src/main/java/net/fabricmc/fabric/mixin/client/itemgroup/MixinItemGroup.java b/src/main/java/net/fabricmc/fabric/mixin/client/itemgroup/MixinItemGroup.java index b874599f6..f3d074c89 100644 --- a/src/main/java/net/fabricmc/fabric/mixin/client/itemgroup/MixinItemGroup.java +++ b/src/main/java/net/fabricmc/fabric/mixin/client/itemgroup/MixinItemGroup.java @@ -16,7 +16,7 @@ package net.fabricmc.fabric.mixin.client.itemgroup; -import net.fabricmc.fabric.client.itemgroup.FabricCreativeGuiComponents; +import net.fabricmc.fabric.impl.itemgroup.FabricCreativeGuiComponents; import net.minecraft.item.ItemGroup; import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Mixin; diff --git a/src/main/java/net/fabricmc/fabric/mixin/client/render/MixinBlockEntityRenderManager.java b/src/main/java/net/fabricmc/fabric/mixin/client/render/MixinBlockEntityRenderManager.java index 65f0b84de..ebf96867e 100644 --- a/src/main/java/net/fabricmc/fabric/mixin/client/render/MixinBlockEntityRenderManager.java +++ b/src/main/java/net/fabricmc/fabric/mixin/client/render/MixinBlockEntityRenderManager.java @@ -16,7 +16,7 @@ package net.fabricmc.fabric.mixin.client.render; -import net.fabricmc.fabric.client.render.BlockEntityRendererRegistry; +import net.fabricmc.fabric.api.client.render.BlockEntityRendererRegistry; import net.minecraft.block.entity.BlockEntity; import net.minecraft.client.render.block.entity.BlockEntityRenderDispatcher; import net.minecraft.client.render.block.entity.BlockEntityRenderer; diff --git a/src/main/java/net/fabricmc/fabric/mixin/client/render/MixinEntityRenderManager.java b/src/main/java/net/fabricmc/fabric/mixin/client/render/MixinEntityRenderManager.java index 302bea71a..b0dfa912e 100644 --- a/src/main/java/net/fabricmc/fabric/mixin/client/render/MixinEntityRenderManager.java +++ b/src/main/java/net/fabricmc/fabric/mixin/client/render/MixinEntityRenderManager.java @@ -16,7 +16,7 @@ package net.fabricmc.fabric.mixin.client.render; -import net.fabricmc.fabric.client.render.EntityRendererRegistry; +import net.fabricmc.fabric.api.client.render.EntityRendererRegistry; import net.minecraft.client.render.entity.EntityRenderDispatcher; import net.minecraft.client.render.entity.EntityRenderer; import net.minecraft.client.render.item.ItemRenderer; 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 58c49615e..b3550c4db 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 @@ -16,20 +16,11 @@ package net.fabricmc.fabric.mixin.client.texture; -import com.google.common.base.Joiner; -import net.fabricmc.fabric.api.event.client.SpriteRegistrationCallback; -import net.fabricmc.fabric.client.texture.*; -import net.fabricmc.fabric.impl.client.texture.FabricSprite; -import net.minecraft.class_1050; -import net.minecraft.client.MinecraftClient; -import net.minecraft.client.resource.metadata.AnimationResourceMetadata; +import net.fabricmc.fabric.api.client.texture.*; import net.minecraft.client.texture.Sprite; import net.minecraft.client.texture.SpriteAtlasTexture; import net.minecraft.resource.ResourceManager; import net.minecraft.util.Identifier; -import net.minecraft.util.crash.CrashException; -import net.minecraft.util.crash.CrashReport; -import net.minecraft.util.crash.CrashReportSection; import org.apache.logging.log4j.Logger; import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Mixin; @@ -37,10 +28,7 @@ import org.spongepowered.asm.mixin.Mutable; import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.Redirect; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; -import org.spongepowered.asm.mixin.transformer.meta.MixinInner; import java.io.IOException; import java.util.*; diff --git a/src/main/java/net/fabricmc/fabric/mixin/commands/MixinServerCommandManager.java b/src/main/java/net/fabricmc/fabric/mixin/commands/MixinServerCommandManager.java index c07e7f93d..51c756913 100644 --- a/src/main/java/net/fabricmc/fabric/mixin/commands/MixinServerCommandManager.java +++ b/src/main/java/net/fabricmc/fabric/mixin/commands/MixinServerCommandManager.java @@ -17,7 +17,7 @@ package net.fabricmc.fabric.mixin.commands; import com.mojang.brigadier.CommandDispatcher; -import net.fabricmc.fabric.commands.CommandRegistry; +import net.fabricmc.fabric.api.registry.CommandRegistry; import net.minecraft.server.command.ServerCommandManager; import net.minecraft.server.command.ServerCommandSource; import org.apache.logging.log4j.Logger; diff --git a/src/main/java/net/fabricmc/fabric/mixin/entity/MixinEntityTracker.java b/src/main/java/net/fabricmc/fabric/mixin/entity/MixinEntityTracker.java index 45cf20425..8a40c45dd 100644 --- a/src/main/java/net/fabricmc/fabric/mixin/entity/MixinEntityTracker.java +++ b/src/main/java/net/fabricmc/fabric/mixin/entity/MixinEntityTracker.java @@ -16,7 +16,7 @@ package net.fabricmc.fabric.mixin.entity; -import net.fabricmc.fabric.entity.EntityTrackingRegistry; +import net.fabricmc.fabric.api.entity.EntityTrackingRegistry; import net.minecraft.entity.Entity; import net.minecraft.server.network.EntityTracker; import org.spongepowered.asm.mixin.Mixin; diff --git a/src/main/java/net/fabricmc/fabric/mixin/itemgroup/MixinItemGroup.java b/src/main/java/net/fabricmc/fabric/mixin/itemgroup/MixinItemGroup.java index 23e5a2164..ea9bcf6d4 100644 --- a/src/main/java/net/fabricmc/fabric/mixin/itemgroup/MixinItemGroup.java +++ b/src/main/java/net/fabricmc/fabric/mixin/itemgroup/MixinItemGroup.java @@ -16,7 +16,7 @@ package net.fabricmc.fabric.mixin.itemgroup; -import net.fabricmc.fabric.client.itemgroup.ItemGroupExtensions; +import net.fabricmc.fabric.impl.itemgroup.ItemGroupExtensions; import net.minecraft.item.ItemGroup; import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Mixin; diff --git a/src/main/java/net/fabricmc/fabric/mixin/networking/MixinClientPlayNetworkHandler.java b/src/main/java/net/fabricmc/fabric/mixin/networking/MixinClientPlayNetworkHandler.java index 6d8ba0de0..1e14ae653 100644 --- a/src/main/java/net/fabricmc/fabric/mixin/networking/MixinClientPlayNetworkHandler.java +++ b/src/main/java/net/fabricmc/fabric/mixin/networking/MixinClientPlayNetworkHandler.java @@ -17,8 +17,8 @@ package net.fabricmc.fabric.mixin.networking; import net.fabricmc.api.EnvType; -import net.fabricmc.fabric.networking.CustomPayloadPacketRegistry; -import net.fabricmc.fabric.networking.PacketContext; +import net.fabricmc.fabric.api.network.CustomPayloadPacketRegistry; +import net.fabricmc.fabric.api.network.PacketContext; import net.minecraft.client.MinecraftClient; import net.minecraft.client.network.ClientPlayNetworkHandler; import net.minecraft.client.network.packet.CustomPayloadClientPacket; diff --git a/src/main/java/net/fabricmc/fabric/mixin/networking/MixinSPacketCustomPayload.java b/src/main/java/net/fabricmc/fabric/mixin/networking/MixinSPacketCustomPayload.java index 9f51a9839..a44f0aad2 100644 --- a/src/main/java/net/fabricmc/fabric/mixin/networking/MixinSPacketCustomPayload.java +++ b/src/main/java/net/fabricmc/fabric/mixin/networking/MixinSPacketCustomPayload.java @@ -16,7 +16,7 @@ package net.fabricmc.fabric.mixin.networking; -import net.fabricmc.fabric.networking.SPacketCustomPayloadAccessor; +import net.fabricmc.fabric.impl.network.SPacketCustomPayloadAccessor; import net.minecraft.server.network.packet.CustomPayloadServerPacket; import net.minecraft.util.Identifier; import net.minecraft.util.PacketByteBuf; diff --git a/src/main/java/net/fabricmc/fabric/mixin/networking/MixinServerPlayNetworkHandler.java b/src/main/java/net/fabricmc/fabric/mixin/networking/MixinServerPlayNetworkHandler.java index fa10bc625..2877a2db4 100644 --- a/src/main/java/net/fabricmc/fabric/mixin/networking/MixinServerPlayNetworkHandler.java +++ b/src/main/java/net/fabricmc/fabric/mixin/networking/MixinServerPlayNetworkHandler.java @@ -17,9 +17,9 @@ package net.fabricmc.fabric.mixin.networking; import net.fabricmc.api.EnvType; -import net.fabricmc.fabric.networking.CustomPayloadPacketRegistry; -import net.fabricmc.fabric.networking.PacketContext; -import net.fabricmc.fabric.networking.SPacketCustomPayloadAccessor; +import net.fabricmc.fabric.api.network.CustomPayloadPacketRegistry; +import net.fabricmc.fabric.api.network.PacketContext; +import net.fabricmc.fabric.impl.network.SPacketCustomPayloadAccessor; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.server.MinecraftServer; import net.minecraft.server.network.ServerPlayNetworkHandler; 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 618e03821..6e45bda6d 100644 --- a/src/main/java/net/fabricmc/fabric/mixin/registry/MixinBootstrap.java +++ b/src/main/java/net/fabricmc/fabric/mixin/registry/MixinBootstrap.java @@ -16,9 +16,7 @@ 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.impl.registry.ListenableRegistry; import net.fabricmc.fabric.impl.registry.BootstrapBiomeRegistryListener; import net.fabricmc.fabric.impl.registry.BootstrapBlockRegistryListener; import net.fabricmc.fabric.impl.registry.BootstrapFluidRegistryListener; diff --git a/src/main/java/net/fabricmc/fabric/mixin/registry/MixinIdList.java b/src/main/java/net/fabricmc/fabric/mixin/registry/MixinIdList.java index 6de2144f8..944b3299a 100644 --- a/src/main/java/net/fabricmc/fabric/mixin/registry/MixinIdList.java +++ b/src/main/java/net/fabricmc/fabric/mixin/registry/MixinIdList.java @@ -16,7 +16,7 @@ package net.fabricmc.fabric.mixin.registry; -import net.fabricmc.fabric.registry.ExtendedIdList; +import net.fabricmc.fabric.impl.registry.ExtendedIdList; import net.minecraft.util.IdList; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; diff --git a/src/main/java/net/fabricmc/fabric/mixin/registry/MixinIdRegistry.java b/src/main/java/net/fabricmc/fabric/mixin/registry/MixinIdRegistry.java index e51786bab..63c61052b 100644 --- a/src/main/java/net/fabricmc/fabric/mixin/registry/MixinIdRegistry.java +++ b/src/main/java/net/fabricmc/fabric/mixin/registry/MixinIdRegistry.java @@ -19,16 +19,14 @@ package net.fabricmc.fabric.mixin.registry; import com.google.common.collect.BiMap; import it.unimi.dsi.fastutil.objects.Object2IntMap; import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap; -import net.fabricmc.fabric.registry.ListenableRegistry; -import net.fabricmc.fabric.registry.RegistryListener; -import net.fabricmc.fabric.registry.RemapException; -import net.fabricmc.fabric.registry.RemappableRegistry; -import net.minecraft.particle.ParticleTypes; +import net.fabricmc.fabric.impl.registry.ListenableRegistry; +import net.fabricmc.fabric.impl.registry.RegistryListener; +import net.fabricmc.fabric.impl.registry.RemapException; +import net.fabricmc.fabric.impl.registry.RemappableRegistry; import net.minecraft.util.Identifier; import net.minecraft.util.Int2ObjectBiMap; import net.minecraft.util.registry.DefaultMappedRegistry; import net.minecraft.util.registry.IdRegistry; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; diff --git a/src/main/java/net/fabricmc/fabric/mixin/registry/MixinServerPlayNetworkHandler.java b/src/main/java/net/fabricmc/fabric/mixin/registry/MixinServerPlayNetworkHandler.java index c62fd76d6..4546c9bb7 100644 --- a/src/main/java/net/fabricmc/fabric/mixin/registry/MixinServerPlayNetworkHandler.java +++ b/src/main/java/net/fabricmc/fabric/mixin/registry/MixinServerPlayNetworkHandler.java @@ -16,7 +16,7 @@ package net.fabricmc.fabric.mixin.registry; -import net.fabricmc.fabric.registry.RegistrySyncManager; +import net.fabricmc.fabric.impl.registry.RegistrySyncManager; import net.minecraft.network.ClientConnection; import net.minecraft.network.Packet; import net.minecraft.server.MinecraftServer; diff --git a/src/main/java/net/fabricmc/fabric/mixin/registry/MixinWorldSaveHandler.java b/src/main/java/net/fabricmc/fabric/mixin/registry/MixinWorldSaveHandler.java index 1d7105341..f8ccbaebc 100644 --- a/src/main/java/net/fabricmc/fabric/mixin/registry/MixinWorldSaveHandler.java +++ b/src/main/java/net/fabricmc/fabric/mixin/registry/MixinWorldSaveHandler.java @@ -16,8 +16,8 @@ package net.fabricmc.fabric.mixin.registry; -import net.fabricmc.fabric.registry.RegistrySyncManager; -import net.fabricmc.fabric.registry.RemapException; +import net.fabricmc.fabric.impl.registry.RegistrySyncManager; +import net.fabricmc.fabric.impl.registry.RemapException; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.NbtIo; import net.minecraft.world.OldWorldSaveHandler; 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 831ca3d0d..59e27fc4b 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 @@ -16,7 +16,7 @@ package net.fabricmc.fabric.mixin.registry.client; -import net.fabricmc.fabric.registry.ListenableRegistry; +import net.fabricmc.fabric.impl.registry.ListenableRegistry; import net.fabricmc.fabric.impl.registry.IdListUpdater; import net.minecraft.block.Block; import net.minecraft.client.render.block.BlockColorMap; 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 11263090d..060a078eb 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 @@ -16,7 +16,7 @@ package net.fabricmc.fabric.mixin.registry.client; -import net.fabricmc.fabric.registry.ListenableRegistry; +import net.fabricmc.fabric.impl.registry.ListenableRegistry; import net.fabricmc.fabric.impl.registry.IdListUpdater; import net.minecraft.client.render.block.BlockColorMap; import net.minecraft.client.render.item.ItemColorMap; diff --git a/src/main/java/net/fabricmc/fabric/mixin/registry/client/MixinItemModelMap.java b/src/main/java/net/fabricmc/fabric/mixin/registry/client/MixinItemModelMap.java index 87233c00e..e40fd76a1 100644 --- a/src/main/java/net/fabricmc/fabric/mixin/registry/client/MixinItemModelMap.java +++ b/src/main/java/net/fabricmc/fabric/mixin/registry/client/MixinItemModelMap.java @@ -17,8 +17,8 @@ package net.fabricmc.fabric.mixin.registry.client; import it.unimi.dsi.fastutil.ints.Int2ObjectMap; -import net.fabricmc.fabric.registry.ListenableRegistry; -import net.fabricmc.fabric.registry.RegistryListener; +import net.fabricmc.fabric.impl.registry.ListenableRegistry; +import net.fabricmc.fabric.impl.registry.RegistryListener; import net.minecraft.client.render.item.ItemModels; import net.minecraft.client.render.model.BakedModel; import net.minecraft.client.render.model.BakedModelManager; diff --git a/src/main/java/net/fabricmc/fabric/mixin/registry/client/MixinParticleManager.java b/src/main/java/net/fabricmc/fabric/mixin/registry/client/MixinParticleManager.java index 9a44c0c26..464eaa69c 100644 --- a/src/main/java/net/fabricmc/fabric/mixin/registry/client/MixinParticleManager.java +++ b/src/main/java/net/fabricmc/fabric/mixin/registry/client/MixinParticleManager.java @@ -17,13 +17,11 @@ package net.fabricmc.fabric.mixin.registry.client; import it.unimi.dsi.fastutil.ints.Int2ObjectMap; -import net.fabricmc.fabric.registry.ListenableRegistry; -import net.fabricmc.fabric.registry.RegistryListener; +import net.fabricmc.fabric.impl.registry.ListenableRegistry; +import net.fabricmc.fabric.impl.registry.RegistryListener; import net.minecraft.client.particle.ParticleFactory; import net.minecraft.client.particle.ParticleManager; -import net.minecraft.client.render.model.BakedModelManager; import net.minecraft.client.texture.TextureManager; -import net.minecraft.item.Item; import net.minecraft.particle.ParticleType; import net.minecraft.util.Identifier; import net.minecraft.util.registry.Registry; diff --git a/src/main/java/net/fabricmc/fabric/mixin/tools/MixinItemStack.java b/src/main/java/net/fabricmc/fabric/mixin/tools/MixinItemStack.java index 25a7a58fb..fa324327c 100644 --- a/src/main/java/net/fabricmc/fabric/mixin/tools/MixinItemStack.java +++ b/src/main/java/net/fabricmc/fabric/mixin/tools/MixinItemStack.java @@ -16,9 +16,9 @@ package net.fabricmc.fabric.mixin.tools; -import net.fabricmc.fabric.tools.MiningToolDelegate; -import net.fabricmc.fabric.tools.ToolManager; -import net.fabricmc.fabric.util.TriState; +import net.fabricmc.fabric.impl.tools.MiningToolDelegate; +import net.fabricmc.fabric.impl.tools.ToolManager; +import net.fabricmc.fabric.api.util.TriState; import net.minecraft.block.BlockState; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; diff --git a/src/main/java/net/fabricmc/fabric/mixin/tools/MixinMiningToolItem.java b/src/main/java/net/fabricmc/fabric/mixin/tools/MixinMiningToolItem.java index 523231aae..baacdf53e 100644 --- a/src/main/java/net/fabricmc/fabric/mixin/tools/MixinMiningToolItem.java +++ b/src/main/java/net/fabricmc/fabric/mixin/tools/MixinMiningToolItem.java @@ -16,7 +16,7 @@ package net.fabricmc.fabric.mixin.tools; -import net.fabricmc.fabric.tools.MiningToolDelegate; +import net.fabricmc.fabric.impl.tools.MiningToolDelegate; import net.minecraft.item.MiningToolItem; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; diff --git a/src/test/java/net/fabricmc/fabric/containers/ContainerMod.java b/src/test/java/net/fabricmc/fabric/containers/ContainerMod.java index 44e51b065..807687006 100644 --- a/src/test/java/net/fabricmc/fabric/containers/ContainerMod.java +++ b/src/test/java/net/fabricmc/fabric/containers/ContainerMod.java @@ -18,9 +18,8 @@ package net.fabricmc.fabric.containers; import net.fabricmc.api.ModInitializer; import net.fabricmc.fabric.api.container.ContainerProviderRegistry; -import net.fabricmc.fabric.commands.CommandRegistry; +import net.fabricmc.fabric.api.registry.CommandRegistry; import net.minecraft.container.Container; -import net.minecraft.container.ContainerType; import net.minecraft.container.Slot; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerInventory;