Class cleanup, stage 1

This commit is contained in:
Adrian Siekierka 2019-02-06 21:57:42 +01:00
parent 16d32490f6
commit 9cb807b212
74 changed files with 122 additions and 126 deletions

View file

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package net.fabricmc.fabric.block; package net.fabricmc.fabric.api.block;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;

View file

@ -14,9 +14,9 @@
* limitations under the License. * 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.Block;
import net.minecraft.block.Material; import net.minecraft.block.Material;
import net.minecraft.block.MaterialColor; import net.minecraft.block.MaterialColor;

View file

@ -14,9 +14,8 @@
* limitations under the License. * 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; import net.minecraft.nbt.CompoundTag;
/** /**

View file

@ -16,7 +16,7 @@
package net.fabricmc.fabric.api.client.itemgroup; 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.ItemGroup;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.DefaultedList; import net.minecraft.util.DefaultedList;

View file

@ -14,7 +14,7 @@
* limitations under the License. * 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.block.entity.BlockEntity;
import net.minecraft.client.render.block.entity.BlockEntityRenderDispatcher; import net.minecraft.client.render.block.entity.BlockEntityRenderDispatcher;

View file

@ -14,7 +14,7 @@
* limitations under the License. * 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.EntityRenderDispatcher;
import net.minecraft.client.render.entity.EntityRenderer; import net.minecraft.client.render.entity.EntityRenderer;
@ -26,7 +26,6 @@ import net.minecraft.resource.ReloadableResourceManager;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.WeakHashMap; import java.util.WeakHashMap;
import java.util.function.Function;
/** /**
* Helper class for registering EntityRenderers. * Helper class for registering EntityRenderers.

View file

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package net.fabricmc.fabric.client.texture; package net.fabricmc.fabric.api.client.texture;
import net.minecraft.resource.ResourceManager; import net.minecraft.resource.ResourceManager;

View file

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package net.fabricmc.fabric.client.texture; package net.fabricmc.fabric.api.client.texture;
import net.minecraft.util.Identifier; import net.minecraft.util.Identifier;

View file

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package net.fabricmc.fabric.entity; package net.fabricmc.fabric.api.entity;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityType; import net.minecraft.entity.EntityType;

View file

@ -14,12 +14,11 @@
* limitations under the License. * limitations under the License.
*/ */
package net.fabricmc.fabric.entity; package net.fabricmc.fabric.api.entity;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityCategory; import net.minecraft.entity.EntityCategory;
import net.minecraft.entity.EntityType; import net.minecraft.entity.EntityType;
import net.minecraft.entity.EntityType.Builder;
import net.minecraft.world.World; import net.minecraft.world.World;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;

View file

@ -25,6 +25,16 @@ import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction; import net.minecraft.util.math.Direction;
import net.minecraft.world.World; 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 interface AttackBlockCallback {
public static final Event<AttackBlockCallback> EVENT = EventFactory.arrayBacked(AttackBlockCallback.class, public static final Event<AttackBlockCallback> EVENT = EventFactory.arrayBacked(AttackBlockCallback.class,
(listeners) -> (player, world, hand, pos, direction) -> { (listeners) -> (player, world, hand, pos, direction) -> {

View file

@ -25,6 +25,14 @@ import net.minecraft.util.Hand;
import net.minecraft.util.hit.EntityHitResult; import net.minecraft.util.hit.EntityHitResult;
import net.minecraft.world.World; 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 interface AttackEntityCallback {
public static final Event<AttackEntityCallback> EVENT = EventFactory.arrayBacked(AttackEntityCallback.class, public static final Event<AttackEntityCallback> EVENT = EventFactory.arrayBacked(AttackEntityCallback.class,
(listeners) -> (player, world, hand, entity, hitResult) -> { (listeners) -> (player, world, hand, entity, hitResult) -> {

View file

@ -26,6 +26,14 @@ import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction; import net.minecraft.util.math.Direction;
import net.minecraft.world.World; 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 interface UseBlockCallback {
public static final Event<UseBlockCallback> EVENT = EventFactory.arrayBacked(UseBlockCallback.class, public static final Event<UseBlockCallback> EVENT = EventFactory.arrayBacked(UseBlockCallback.class,
(listeners) -> (player, world, hand, hitResult) -> { (listeners) -> (player, world, hand, hitResult) -> {

View file

@ -25,6 +25,14 @@ import net.minecraft.util.Hand;
import net.minecraft.util.hit.EntityHitResult; import net.minecraft.util.hit.EntityHitResult;
import net.minecraft.world.World; 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 interface UseEntityCallback {
public static final Event<UseEntityCallback> EVENT = EventFactory.arrayBacked(UseEntityCallback.class, public static final Event<UseEntityCallback> EVENT = EventFactory.arrayBacked(UseEntityCallback.class,
(listeners) -> (player, world, hand, entity, hitResult) -> { (listeners) -> (player, world, hand, entity, hitResult) -> {

View file

@ -23,6 +23,14 @@ import net.minecraft.util.ActionResult;
import net.minecraft.util.Hand; import net.minecraft.util.Hand;
import net.minecraft.world.World; 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 interface UseItemCallback {
public static final Event<UseItemCallback> EVENT = EventFactory.arrayBacked(UseItemCallback.class, public static final Event<UseItemCallback> EVENT = EventFactory.arrayBacked(UseItemCallback.class,
(listeners) -> (player, world, hand) -> { (listeners) -> (player, world, hand) -> {

View file

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package net.fabricmc.fabric.networking; package net.fabricmc.fabric.api.network;
import net.minecraft.util.Identifier; import net.minecraft.util.Identifier;
import net.minecraft.util.PacketByteBuf; import net.minecraft.util.PacketByteBuf;

View file

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package net.fabricmc.fabric.networking; package net.fabricmc.fabric.api.network;
import net.fabricmc.api.EnvType; import net.fabricmc.api.EnvType;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;

View file

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package net.fabricmc.fabric.commands; package net.fabricmc.fabric.api.registry;
import com.mojang.brigadier.CommandDispatcher; import com.mojang.brigadier.CommandDispatcher;
import net.minecraft.server.command.ServerCommandSource; import net.minecraft.server.command.ServerCommandSource;

View file

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package net.fabricmc.fabric.resources; package net.fabricmc.fabric.api.resource;
import net.fabricmc.loader.ModInfo; import net.fabricmc.loader.ModInfo;
import net.minecraft.resource.ResourcePack; import net.minecraft.resource.ResourcePack;

View file

@ -14,12 +14,9 @@
* limitations under the License. * limitations under the License.
*/ */
package net.fabricmc.fabric.tags; package net.fabricmc.fabric.api.tags;
import net.minecraft.block.Block; 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.tag.Tag;
import net.minecraft.util.Identifier; import net.minecraft.util.Identifier;

View file

@ -14,10 +14,9 @@
* limitations under the License. * limitations under the License.
*/ */
package net.fabricmc.fabric.tags; package net.fabricmc.fabric.api.tags;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.tag.ItemTags;
import net.minecraft.tag.Tag; import net.minecraft.tag.Tag;
import net.minecraft.util.Identifier; import net.minecraft.util.Identifier;

View file

@ -14,10 +14,8 @@
* limitations under the License. * 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.tag.Tag;
import net.minecraft.util.Identifier; import net.minecraft.util.Identifier;

View file

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package net.fabricmc.fabric.tags; package net.fabricmc.fabric.api.tags;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.item.Item; import net.minecraft.item.Item;

View file

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package net.fabricmc.fabric.util; package net.fabricmc.fabric.api.util;
public enum TriState { public enum TriState {
FALSE, FALSE,

View file

@ -18,10 +18,9 @@ package net.fabricmc.fabric.impl;
import net.fabricmc.api.ClientModInitializer; import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.impl.client.gui.GuiProviderImpl; import net.fabricmc.fabric.impl.client.gui.GuiProviderImpl;
import net.fabricmc.fabric.networking.CustomPayloadPacketRegistry; import net.fabricmc.fabric.api.network.CustomPayloadPacketRegistry;
import net.fabricmc.fabric.registry.RegistrySyncManager; import net.fabricmc.fabric.impl.registry.RegistrySyncManager;
import net.minecraft.client.MinecraftClient; import net.minecraft.client.MinecraftClient;
import net.minecraft.server.integrated.IntegratedServer;
public class FabricAPIClientInitializer implements ClientModInitializer { public class FabricAPIClientInitializer implements ClientModInitializer {
@Override @Override

View file

@ -18,7 +18,7 @@ package net.fabricmc.fabric.impl;
import net.fabricmc.api.ModInitializer; import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.event.player.AttackBlockCallback; 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.block.BlockState;
import net.minecraft.util.ActionResult; import net.minecraft.util.ActionResult;
@ -26,8 +26,6 @@ public class FabricAPIInitializer implements ModInitializer {
@Override @Override
public void onInitialize() { public void onInitialize() {
AttackBlockCallback.EVENT.register((player, world, hand, pos, direction) -> { AttackBlockCallback.EVENT.register((player, world, hand, pos, direction) -> {
System.out.println("--- DEMO --- PlayerInteractCallback called!");
BlockState state = world.getBlockState(pos); BlockState state = world.getBlockState(pos);
if (state instanceof BreakInteractable) { if (state instanceof BreakInteractable) {
if (((BreakInteractable) state).onBreakInteract(state, world, pos, player, hand, direction)) { if (((BreakInteractable) state).onBreakInteract(state, world, pos, player, hand, direction)) {

View file

@ -18,10 +18,9 @@ package net.fabricmc.fabric.impl.client.gui;
import net.fabricmc.fabric.api.client.gui.GuiProviderRegistry; import net.fabricmc.fabric.api.client.gui.GuiProviderRegistry;
import net.fabricmc.fabric.api.container.ContainerFactory; 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.api.client.gui.GuiFactory;
import net.fabricmc.fabric.impl.container.ContainerProviderImpl; 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.MinecraftClient;
import net.minecraft.client.gui.ContainerScreen; import net.minecraft.client.gui.ContainerScreen;
import net.minecraft.container.Container; import net.minecraft.container.Container;

View file

@ -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.FabricKeyBinding;
import net.fabricmc.fabric.api.client.keybinding.KeyBindingRegistry; import net.fabricmc.fabric.api.client.keybinding.KeyBindingRegistry;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.options.KeyBinding; import net.minecraft.client.options.KeyBinding;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;

View file

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package net.fabricmc.fabric.client.itemgroup; package net.fabricmc.fabric.impl.itemgroup;
public interface CreativeGuiExtensions { public interface CreativeGuiExtensions {

View file

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package net.fabricmc.fabric.client.itemgroup; package net.fabricmc.fabric.impl.itemgroup;
import com.mojang.blaze3d.platform.GlStateManager; import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.MinecraftClient; import net.minecraft.client.MinecraftClient;

View file

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package net.fabricmc.fabric.client.itemgroup; package net.fabricmc.fabric.impl.itemgroup;
public interface ItemGroupExtensions { public interface ItemGroupExtensions {

View file

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package net.fabricmc.fabric.networking; package net.fabricmc.fabric.impl.network;
import net.minecraft.util.Identifier; import net.minecraft.util.Identifier;
import net.minecraft.util.PacketByteBuf; import net.minecraft.util.PacketByteBuf;

View file

@ -16,8 +16,6 @@
package net.fabricmc.fabric.impl.registry; 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.Identifier;
import net.minecraft.util.registry.Registry; import net.minecraft.util.registry.Registry;
import net.minecraft.world.biome.Biome; import net.minecraft.world.biome.Biome;

View file

@ -16,8 +16,6 @@
package net.fabricmc.fabric.impl.registry; 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.Block;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.util.Identifier; import net.minecraft.util.Identifier;

View file

@ -16,8 +16,6 @@
package net.fabricmc.fabric.impl.registry; 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.Fluid;
import net.minecraft.fluid.FluidState; import net.minecraft.fluid.FluidState;
import net.minecraft.util.Identifier; import net.minecraft.util.Identifier;

View file

@ -16,7 +16,6 @@
package net.fabricmc.fabric.impl.registry; package net.fabricmc.fabric.impl.registry;
import net.fabricmc.fabric.registry.RegistryListener;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.block.BlockItem; import net.minecraft.item.block.BlockItem;
import net.minecraft.util.Identifier; import net.minecraft.util.Identifier;

View file

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package net.fabricmc.fabric.registry; package net.fabricmc.fabric.impl.registry;
public interface ExtendedIdList { public interface ExtendedIdList {
void clear(); void clear();

View file

@ -16,8 +16,6 @@
package net.fabricmc.fabric.impl.registry; 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.IdList;
import net.minecraft.util.Identifier; import net.minecraft.util.Identifier;
import net.minecraft.util.registry.Registry; import net.minecraft.util.registry.Registry;

View file

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package net.fabricmc.fabric.registry; package net.fabricmc.fabric.impl.registry;
public interface ListenableRegistry<T> { public interface ListenableRegistry<T> {
void registerListener(RegistryListener<T> listener); void registerListener(RegistryListener<T> listener);

View file

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package net.fabricmc.fabric.registry; package net.fabricmc.fabric.impl.registry;
import net.minecraft.util.Identifier; import net.minecraft.util.Identifier;
import net.minecraft.util.registry.Registry; import net.minecraft.util.registry.Registry;

View file

@ -14,13 +14,13 @@
* limitations under the License. * limitations under the License.
*/ */
package net.fabricmc.fabric.registry; package net.fabricmc.fabric.impl.registry;
import com.google.common.collect.ImmutableSet; import com.google.common.collect.ImmutableSet;
import io.netty.buffer.Unpooled; import io.netty.buffer.Unpooled;
import it.unimi.dsi.fastutil.objects.Object2IntMap; import it.unimi.dsi.fastutil.objects.Object2IntMap;
import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap; 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.client.network.packet.CustomPayloadClientPacket;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.CompoundTag;
import net.minecraft.util.Identifier; import net.minecraft.util.Identifier;

View file

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package net.fabricmc.fabric.registry; package net.fabricmc.fabric.impl.registry;
public class RemapException extends Exception { public class RemapException extends Exception {
public RemapException(String message) { public RemapException(String message) {

View file

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package net.fabricmc.fabric.registry; package net.fabricmc.fabric.impl.registry;
import it.unimi.dsi.fastutil.objects.Object2IntMap; import it.unimi.dsi.fastutil.objects.Object2IntMap;
import net.minecraft.util.Identifier; import net.minecraft.util.Identifier;

View file

@ -16,7 +16,7 @@
package net.fabricmc.fabric.impl.resources; 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.ResourcePack;
import net.minecraft.resource.ResourcePackContainer; import net.minecraft.resource.ResourcePackContainer;
import net.minecraft.resource.ResourcePackCreator; import net.minecraft.resource.ResourcePackCreator;

View file

@ -16,7 +16,7 @@
package net.fabricmc.fabric.impl.resources; 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.fabricmc.loader.ModInfo;
import net.minecraft.resource.DirectoryResourcePack; import net.minecraft.resource.DirectoryResourcePack;
import net.minecraft.resource.ResourceNotFoundException; import net.minecraft.resource.ResourceNotFoundException;

View file

@ -16,7 +16,7 @@
package net.fabricmc.fabric.impl.resources; 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.fabricmc.loader.ModInfo;
import net.minecraft.resource.ResourceNotFoundException; import net.minecraft.resource.ResourceNotFoundException;
import net.minecraft.resource.ZipResourcePack; import net.minecraft.resource.ZipResourcePack;

View file

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package net.fabricmc.fabric.tools; package net.fabricmc.fabric.impl.tools;
public interface MiningToolDelegate { public interface MiningToolDelegate {
float getBlockBreakingSpeed(); float getBlockBreakingSpeed();

View file

@ -14,11 +14,11 @@
* limitations under the License. * 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.api.event.registry.BlockBuildingCallback;
import net.fabricmc.fabric.block.FabricBlockSettings; import net.fabricmc.fabric.api.block.FabricBlockSettings;
import net.fabricmc.fabric.util.TriState; import net.fabricmc.fabric.api.util.TriState;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.item.Item; import net.minecraft.item.Item;

View file

@ -16,7 +16,7 @@
package net.fabricmc.fabric.mixin.block; 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.Block;
import net.minecraft.block.Material; import net.minecraft.block.Material;
import net.minecraft.block.MaterialColor; import net.minecraft.block.MaterialColor;

View file

@ -16,10 +16,9 @@
package net.fabricmc.fabric.mixin.block.entity; 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.BlockEntity;
import net.minecraft.block.entity.BlockEntityType; import net.minecraft.block.entity.BlockEntityType;
import net.minecraft.client.network.ClientPlayNetworkHandler;
import net.minecraft.client.network.packet.BlockEntityUpdateClientPacket; import net.minecraft.client.network.packet.BlockEntityUpdateClientPacket;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.CompoundTag;
import net.minecraft.util.Identifier; 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.Shadow;
import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject; 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.CallbackInfoReturnable;
import org.spongepowered.asm.mixin.injection.callback.LocalCapture;
@Mixin(BlockEntity.class) @Mixin(BlockEntity.class)
public abstract class MixinBlockEntity { public abstract class MixinBlockEntity {

View file

@ -16,14 +16,13 @@
package net.fabricmc.fabric.mixin.block.entity; 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.BlockEntity;
import net.minecraft.block.entity.BlockEntityType; import net.minecraft.block.entity.BlockEntityType;
import net.minecraft.client.network.ClientPlayNetworkHandler; import net.minecraft.client.network.ClientPlayNetworkHandler;
import net.minecraft.client.network.packet.BlockEntityUpdateClientPacket; import net.minecraft.client.network.packet.BlockEntityUpdateClientPacket;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.CompoundTag;
import net.minecraft.util.Identifier; import net.minecraft.util.Identifier;
import net.minecraft.util.registry.Registry;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.Shadow;

View file

@ -16,8 +16,8 @@
package net.fabricmc.fabric.mixin.client.itemgroup; package net.fabricmc.fabric.mixin.client.itemgroup;
import net.fabricmc.fabric.client.itemgroup.CreativeGuiExtensions; import net.fabricmc.fabric.impl.itemgroup.CreativeGuiExtensions;
import net.fabricmc.fabric.client.itemgroup.FabricCreativeGuiComponents; import net.fabricmc.fabric.impl.itemgroup.FabricCreativeGuiComponents;
import net.minecraft.client.gui.ingame.AbstractPlayerInventoryScreen; import net.minecraft.client.gui.ingame.AbstractPlayerInventoryScreen;
import net.minecraft.client.gui.ingame.CreativePlayerInventoryScreen; import net.minecraft.client.gui.ingame.CreativePlayerInventoryScreen;
import net.minecraft.container.Container; import net.minecraft.container.Container;

View file

@ -16,7 +16,7 @@
package net.fabricmc.fabric.mixin.client.itemgroup; 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 net.minecraft.item.ItemGroup;
import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Mixin;

View file

@ -16,7 +16,7 @@
package net.fabricmc.fabric.mixin.client.render; 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.block.entity.BlockEntity;
import net.minecraft.client.render.block.entity.BlockEntityRenderDispatcher; import net.minecraft.client.render.block.entity.BlockEntityRenderDispatcher;
import net.minecraft.client.render.block.entity.BlockEntityRenderer; import net.minecraft.client.render.block.entity.BlockEntityRenderer;

View file

@ -16,7 +16,7 @@
package net.fabricmc.fabric.mixin.client.render; 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.EntityRenderDispatcher;
import net.minecraft.client.render.entity.EntityRenderer; import net.minecraft.client.render.entity.EntityRenderer;
import net.minecraft.client.render.item.ItemRenderer; import net.minecraft.client.render.item.ItemRenderer;

View file

@ -16,20 +16,11 @@
package net.fabricmc.fabric.mixin.client.texture; package net.fabricmc.fabric.mixin.client.texture;
import com.google.common.base.Joiner; import net.fabricmc.fabric.api.client.texture.*;
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.minecraft.client.texture.Sprite; import net.minecraft.client.texture.Sprite;
import net.minecraft.client.texture.SpriteAtlasTexture; import net.minecraft.client.texture.SpriteAtlasTexture;
import net.minecraft.resource.ResourceManager; import net.minecraft.resource.ResourceManager;
import net.minecraft.util.Identifier; 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.apache.logging.log4j.Logger;
import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin; 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.Shadow;
import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject; 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.injection.callback.CallbackInfoReturnable;
import org.spongepowered.asm.mixin.transformer.meta.MixinInner;
import java.io.IOException; import java.io.IOException;
import java.util.*; import java.util.*;

View file

@ -17,7 +17,7 @@
package net.fabricmc.fabric.mixin.commands; package net.fabricmc.fabric.mixin.commands;
import com.mojang.brigadier.CommandDispatcher; 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.ServerCommandManager;
import net.minecraft.server.command.ServerCommandSource; import net.minecraft.server.command.ServerCommandSource;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;

View file

@ -16,7 +16,7 @@
package net.fabricmc.fabric.mixin.entity; 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.entity.Entity;
import net.minecraft.server.network.EntityTracker; import net.minecraft.server.network.EntityTracker;
import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Mixin;

View file

@ -16,7 +16,7 @@
package net.fabricmc.fabric.mixin.itemgroup; 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 net.minecraft.item.ItemGroup;
import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Mixin;

View file

@ -17,8 +17,8 @@
package net.fabricmc.fabric.mixin.networking; package net.fabricmc.fabric.mixin.networking;
import net.fabricmc.api.EnvType; import net.fabricmc.api.EnvType;
import net.fabricmc.fabric.networking.CustomPayloadPacketRegistry; import net.fabricmc.fabric.api.network.CustomPayloadPacketRegistry;
import net.fabricmc.fabric.networking.PacketContext; import net.fabricmc.fabric.api.network.PacketContext;
import net.minecraft.client.MinecraftClient; import net.minecraft.client.MinecraftClient;
import net.minecraft.client.network.ClientPlayNetworkHandler; import net.minecraft.client.network.ClientPlayNetworkHandler;
import net.minecraft.client.network.packet.CustomPayloadClientPacket; import net.minecraft.client.network.packet.CustomPayloadClientPacket;

View file

@ -16,7 +16,7 @@
package net.fabricmc.fabric.mixin.networking; 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.server.network.packet.CustomPayloadServerPacket;
import net.minecraft.util.Identifier; import net.minecraft.util.Identifier;
import net.minecraft.util.PacketByteBuf; import net.minecraft.util.PacketByteBuf;

View file

@ -17,9 +17,9 @@
package net.fabricmc.fabric.mixin.networking; package net.fabricmc.fabric.mixin.networking;
import net.fabricmc.api.EnvType; import net.fabricmc.api.EnvType;
import net.fabricmc.fabric.networking.CustomPayloadPacketRegistry; import net.fabricmc.fabric.api.network.CustomPayloadPacketRegistry;
import net.fabricmc.fabric.networking.PacketContext; import net.fabricmc.fabric.api.network.PacketContext;
import net.fabricmc.fabric.networking.SPacketCustomPayloadAccessor; import net.fabricmc.fabric.impl.network.SPacketCustomPayloadAccessor;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.server.MinecraftServer; import net.minecraft.server.MinecraftServer;
import net.minecraft.server.network.ServerPlayNetworkHandler; import net.minecraft.server.network.ServerPlayNetworkHandler;

View file

@ -16,9 +16,7 @@
package net.fabricmc.fabric.mixin.registry; package net.fabricmc.fabric.mixin.registry;
import net.fabricmc.fabric.networking.CustomPayloadPacketRegistry; import net.fabricmc.fabric.impl.registry.ListenableRegistry;
import net.fabricmc.fabric.registry.ListenableRegistry;
import net.fabricmc.fabric.registry.RegistrySyncManager;
import net.fabricmc.fabric.impl.registry.BootstrapBiomeRegistryListener; import net.fabricmc.fabric.impl.registry.BootstrapBiomeRegistryListener;
import net.fabricmc.fabric.impl.registry.BootstrapBlockRegistryListener; import net.fabricmc.fabric.impl.registry.BootstrapBlockRegistryListener;
import net.fabricmc.fabric.impl.registry.BootstrapFluidRegistryListener; import net.fabricmc.fabric.impl.registry.BootstrapFluidRegistryListener;

View file

@ -16,7 +16,7 @@
package net.fabricmc.fabric.mixin.registry; 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 net.minecraft.util.IdList;
import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.Shadow;

View file

@ -19,16 +19,14 @@ package net.fabricmc.fabric.mixin.registry;
import com.google.common.collect.BiMap; import com.google.common.collect.BiMap;
import it.unimi.dsi.fastutil.objects.Object2IntMap; import it.unimi.dsi.fastutil.objects.Object2IntMap;
import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap; import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap;
import net.fabricmc.fabric.registry.ListenableRegistry; import net.fabricmc.fabric.impl.registry.ListenableRegistry;
import net.fabricmc.fabric.registry.RegistryListener; import net.fabricmc.fabric.impl.registry.RegistryListener;
import net.fabricmc.fabric.registry.RemapException; import net.fabricmc.fabric.impl.registry.RemapException;
import net.fabricmc.fabric.registry.RemappableRegistry; import net.fabricmc.fabric.impl.registry.RemappableRegistry;
import net.minecraft.particle.ParticleTypes;
import net.minecraft.util.Identifier; import net.minecraft.util.Identifier;
import net.minecraft.util.Int2ObjectBiMap; import net.minecraft.util.Int2ObjectBiMap;
import net.minecraft.util.registry.DefaultMappedRegistry; import net.minecraft.util.registry.DefaultMappedRegistry;
import net.minecraft.util.registry.IdRegistry; import net.minecraft.util.registry.IdRegistry;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.Shadow;

View file

@ -16,7 +16,7 @@
package net.fabricmc.fabric.mixin.registry; 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.ClientConnection;
import net.minecraft.network.Packet; import net.minecraft.network.Packet;
import net.minecraft.server.MinecraftServer; import net.minecraft.server.MinecraftServer;

View file

@ -16,8 +16,8 @@
package net.fabricmc.fabric.mixin.registry; package net.fabricmc.fabric.mixin.registry;
import net.fabricmc.fabric.registry.RegistrySyncManager; import net.fabricmc.fabric.impl.registry.RegistrySyncManager;
import net.fabricmc.fabric.registry.RemapException; import net.fabricmc.fabric.impl.registry.RemapException;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.CompoundTag;
import net.minecraft.nbt.NbtIo; import net.minecraft.nbt.NbtIo;
import net.minecraft.world.OldWorldSaveHandler; import net.minecraft.world.OldWorldSaveHandler;

View file

@ -16,7 +16,7 @@
package net.fabricmc.fabric.mixin.registry.client; 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.fabricmc.fabric.impl.registry.IdListUpdater;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.client.render.block.BlockColorMap; import net.minecraft.client.render.block.BlockColorMap;

View file

@ -16,7 +16,7 @@
package net.fabricmc.fabric.mixin.registry.client; 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.fabricmc.fabric.impl.registry.IdListUpdater;
import net.minecraft.client.render.block.BlockColorMap; import net.minecraft.client.render.block.BlockColorMap;
import net.minecraft.client.render.item.ItemColorMap; import net.minecraft.client.render.item.ItemColorMap;

View file

@ -17,8 +17,8 @@
package net.fabricmc.fabric.mixin.registry.client; package net.fabricmc.fabric.mixin.registry.client;
import it.unimi.dsi.fastutil.ints.Int2ObjectMap; import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
import net.fabricmc.fabric.registry.ListenableRegistry; import net.fabricmc.fabric.impl.registry.ListenableRegistry;
import net.fabricmc.fabric.registry.RegistryListener; import net.fabricmc.fabric.impl.registry.RegistryListener;
import net.minecraft.client.render.item.ItemModels; import net.minecraft.client.render.item.ItemModels;
import net.minecraft.client.render.model.BakedModel; import net.minecraft.client.render.model.BakedModel;
import net.minecraft.client.render.model.BakedModelManager; import net.minecraft.client.render.model.BakedModelManager;

View file

@ -17,13 +17,11 @@
package net.fabricmc.fabric.mixin.registry.client; package net.fabricmc.fabric.mixin.registry.client;
import it.unimi.dsi.fastutil.ints.Int2ObjectMap; import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
import net.fabricmc.fabric.registry.ListenableRegistry; import net.fabricmc.fabric.impl.registry.ListenableRegistry;
import net.fabricmc.fabric.registry.RegistryListener; import net.fabricmc.fabric.impl.registry.RegistryListener;
import net.minecraft.client.particle.ParticleFactory; import net.minecraft.client.particle.ParticleFactory;
import net.minecraft.client.particle.ParticleManager; import net.minecraft.client.particle.ParticleManager;
import net.minecraft.client.render.model.BakedModelManager;
import net.minecraft.client.texture.TextureManager; import net.minecraft.client.texture.TextureManager;
import net.minecraft.item.Item;
import net.minecraft.particle.ParticleType; import net.minecraft.particle.ParticleType;
import net.minecraft.util.Identifier; import net.minecraft.util.Identifier;
import net.minecraft.util.registry.Registry; import net.minecraft.util.registry.Registry;

View file

@ -16,9 +16,9 @@
package net.fabricmc.fabric.mixin.tools; package net.fabricmc.fabric.mixin.tools;
import net.fabricmc.fabric.tools.MiningToolDelegate; import net.fabricmc.fabric.impl.tools.MiningToolDelegate;
import net.fabricmc.fabric.tools.ToolManager; import net.fabricmc.fabric.impl.tools.ToolManager;
import net.fabricmc.fabric.util.TriState; import net.fabricmc.fabric.api.util.TriState;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;

View file

@ -16,7 +16,7 @@
package net.fabricmc.fabric.mixin.tools; 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 net.minecraft.item.MiningToolItem;
import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.Shadow;

View file

@ -18,9 +18,8 @@ package net.fabricmc.fabric.containers;
import net.fabricmc.api.ModInitializer; import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.container.ContainerProviderRegistry; 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.Container;
import net.minecraft.container.ContainerType;
import net.minecraft.container.Slot; import net.minecraft.container.Slot;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerInventory; import net.minecraft.entity.player.PlayerInventory;