diff --git a/src/main/java/com/raoulvdberge/refinedstorage/api/IRSAPI.java b/src/main/java/com/raoulvdberge/refinedstorage/api/IRSAPI.java index 405b6843d..faa11677d 100755 --- a/src/main/java/com/raoulvdberge/refinedstorage/api/IRSAPI.java +++ b/src/main/java/com/raoulvdberge/refinedstorage/api/IRSAPI.java @@ -25,7 +25,7 @@ import com.raoulvdberge.refinedstorage.api.util.IOneSixMigrationHelper; import com.raoulvdberge.refinedstorage.api.util.IQuantityFormatter; import com.raoulvdberge.refinedstorage.api.util.IStackList; import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.CompoundNBT; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraftforge.fluids.FluidStack; @@ -194,7 +194,7 @@ public interface IRSAPI { * @param tag the nbt tag * @return the request info */ - ICraftingRequestInfo createCraftingRequestInfo(NBTTagCompound tag) throws CraftingTaskReadException; + ICraftingRequestInfo createCraftingRequestInfo(CompoundNBT tag) throws CraftingTaskReadException; /** * Returns a helper for the 1.6.x migration. diff --git a/src/main/java/com/raoulvdberge/refinedstorage/api/autocrafting/ICraftingManager.java b/src/main/java/com/raoulvdberge/refinedstorage/api/autocrafting/ICraftingManager.java index 79c60badf..647d5e351 100644 --- a/src/main/java/com/raoulvdberge/refinedstorage/api/autocrafting/ICraftingManager.java +++ b/src/main/java/com/raoulvdberge/refinedstorage/api/autocrafting/ICraftingManager.java @@ -3,7 +3,7 @@ package com.raoulvdberge.refinedstorage.api.autocrafting; import com.raoulvdberge.refinedstorage.api.autocrafting.craftingmonitor.ICraftingMonitorListener; import com.raoulvdberge.refinedstorage.api.autocrafting.task.ICraftingTask; import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.CompoundNBT; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.items.IItemHandlerModifiable; @@ -166,13 +166,13 @@ public interface ICraftingManager { /** * @param tag the tag to read from */ - void readFromNbt(NBTTagCompound tag); + void readFromNbt(CompoundNBT tag); /** * @param tag the tag to write to * @return the written tag */ - NBTTagCompound writeToNbt(NBTTagCompound tag); + CompoundNBT writeToNbt(CompoundNBT tag); /** * @param listener the listener diff --git a/src/main/java/com/raoulvdberge/refinedstorage/api/autocrafting/ICraftingPatternContainer.java b/src/main/java/com/raoulvdberge/refinedstorage/api/autocrafting/ICraftingPatternContainer.java index c63051e0f..69d78a201 100755 --- a/src/main/java/com/raoulvdberge/refinedstorage/api/autocrafting/ICraftingPatternContainer.java +++ b/src/main/java/com/raoulvdberge/refinedstorage/api/autocrafting/ICraftingPatternContainer.java @@ -1,7 +1,7 @@ package com.raoulvdberge.refinedstorage.api.autocrafting; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; +import net.minecraft.util.Direction; import net.minecraft.util.math.BlockPos; import net.minecraftforge.fluids.capability.IFluidHandler; import net.minecraftforge.items.IItemHandler; @@ -74,7 +74,7 @@ public interface ICraftingPatternContainer { /** * @return the direction to the facing tile */ - EnumFacing getDirection(); + Direction getDirection(); /** * @return the patterns stored in this container diff --git a/src/main/java/com/raoulvdberge/refinedstorage/api/autocrafting/craftingmonitor/ICraftingMonitorElement.java b/src/main/java/com/raoulvdberge/refinedstorage/api/autocrafting/craftingmonitor/ICraftingMonitorElement.java index 01df5e3fc..227af07c1 100755 --- a/src/main/java/com/raoulvdberge/refinedstorage/api/autocrafting/craftingmonitor/ICraftingMonitorElement.java +++ b/src/main/java/com/raoulvdberge/refinedstorage/api/autocrafting/craftingmonitor/ICraftingMonitorElement.java @@ -2,8 +2,8 @@ package com.raoulvdberge.refinedstorage.api.autocrafting.craftingmonitor; import com.raoulvdberge.refinedstorage.api.render.IElementDrawers; import io.netty.buffer.ByteBuf; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; import javax.annotation.Nullable; @@ -16,7 +16,7 @@ public interface ICraftingMonitorElement { * @param y position on the y axis to render * @param drawers the drawers that this element can use */ - @SideOnly(Side.CLIENT) + @OnlyIn(Dist.CLIENT) void draw(int x, int y, IElementDrawers drawers); /** diff --git a/src/main/java/com/raoulvdberge/refinedstorage/api/autocrafting/preview/ICraftingPreviewElement.java b/src/main/java/com/raoulvdberge/refinedstorage/api/autocrafting/preview/ICraftingPreviewElement.java index d9af53fca..7f48bff6a 100755 --- a/src/main/java/com/raoulvdberge/refinedstorage/api/autocrafting/preview/ICraftingPreviewElement.java +++ b/src/main/java/com/raoulvdberge/refinedstorage/api/autocrafting/preview/ICraftingPreviewElement.java @@ -2,8 +2,8 @@ package com.raoulvdberge.refinedstorage.api.autocrafting.preview; import com.raoulvdberge.refinedstorage.api.render.IElementDrawers; import io.netty.buffer.ByteBuf; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; /** * Represents a crafting preview element. @@ -19,7 +19,7 @@ public interface ICraftingPreviewElement { * @param y position on the y axis to render * @param drawers the drawers this element can use */ - @SideOnly(Side.CLIENT) + @OnlyIn(Dist.CLIENT) void draw(int x, int y, IElementDrawers drawers); /** diff --git a/src/main/java/com/raoulvdberge/refinedstorage/api/autocrafting/registry/ICraftingTaskFactory.java b/src/main/java/com/raoulvdberge/refinedstorage/api/autocrafting/registry/ICraftingTaskFactory.java index fcce417cb..c0def4d37 100755 --- a/src/main/java/com/raoulvdberge/refinedstorage/api/autocrafting/registry/ICraftingTaskFactory.java +++ b/src/main/java/com/raoulvdberge/refinedstorage/api/autocrafting/registry/ICraftingTaskFactory.java @@ -5,7 +5,7 @@ import com.raoulvdberge.refinedstorage.api.autocrafting.task.CraftingTaskReadExc import com.raoulvdberge.refinedstorage.api.autocrafting.task.ICraftingRequestInfo; import com.raoulvdberge.refinedstorage.api.autocrafting.task.ICraftingTask; import com.raoulvdberge.refinedstorage.api.network.INetwork; -import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.CompoundNBT; import javax.annotation.Nonnull; @@ -33,5 +33,5 @@ public interface ICraftingTaskFactory { * @param tag the tag * @return the crafting task */ - ICraftingTask createFromNbt(INetwork network, NBTTagCompound tag) throws CraftingTaskReadException; + ICraftingTask createFromNbt(INetwork network, CompoundNBT tag) throws CraftingTaskReadException; } diff --git a/src/main/java/com/raoulvdberge/refinedstorage/api/autocrafting/task/CraftingTaskReadException.java b/src/main/java/com/raoulvdberge/refinedstorage/api/autocrafting/task/CraftingTaskReadException.java index 9d5af443e..ad3ee809f 100644 --- a/src/main/java/com/raoulvdberge/refinedstorage/api/autocrafting/task/CraftingTaskReadException.java +++ b/src/main/java/com/raoulvdberge/refinedstorage/api/autocrafting/task/CraftingTaskReadException.java @@ -1,10 +1,9 @@ package com.raoulvdberge.refinedstorage.api.autocrafting.task; import com.raoulvdberge.refinedstorage.api.network.INetwork; -import net.minecraft.nbt.NBTTagCompound; /** - * Gets thrown from {@link com.raoulvdberge.refinedstorage.api.autocrafting.registry.ICraftingTaskFactory#createFromNbt(INetwork, NBTTagCompound)}. + * Gets thrown from {@link com.raoulvdberge.refinedstorage.api.autocrafting.registry.ICraftingTaskFactory#createFromNbt(INetwork, net.minecraft.nbt.CompoundNBT)}. */ public class CraftingTaskReadException extends Exception { /** diff --git a/src/main/java/com/raoulvdberge/refinedstorage/api/autocrafting/task/ICraftingRequestInfo.java b/src/main/java/com/raoulvdberge/refinedstorage/api/autocrafting/task/ICraftingRequestInfo.java index ad3706744..892ebec1f 100644 --- a/src/main/java/com/raoulvdberge/refinedstorage/api/autocrafting/task/ICraftingRequestInfo.java +++ b/src/main/java/com/raoulvdberge/refinedstorage/api/autocrafting/task/ICraftingRequestInfo.java @@ -1,7 +1,7 @@ package com.raoulvdberge.refinedstorage.api.autocrafting.task; import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.CompoundNBT; import net.minecraftforge.fluids.FluidStack; import javax.annotation.Nullable; @@ -25,5 +25,5 @@ public interface ICraftingRequestInfo { /** * @return the written tag */ - NBTTagCompound writeToNbt(); + CompoundNBT writeToNbt(); } diff --git a/src/main/java/com/raoulvdberge/refinedstorage/api/autocrafting/task/ICraftingTask.java b/src/main/java/com/raoulvdberge/refinedstorage/api/autocrafting/task/ICraftingTask.java index 875a98749..36a98b12d 100755 --- a/src/main/java/com/raoulvdberge/refinedstorage/api/autocrafting/task/ICraftingTask.java +++ b/src/main/java/com/raoulvdberge/refinedstorage/api/autocrafting/task/ICraftingTask.java @@ -5,7 +5,7 @@ import com.raoulvdberge.refinedstorage.api.autocrafting.craftingmonitor.ICraftin import com.raoulvdberge.refinedstorage.api.autocrafting.preview.ICraftingPreviewElement; import com.raoulvdberge.refinedstorage.api.util.IStackList; import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.CompoundNBT; import net.minecraftforge.fluids.FluidStack; import javax.annotation.Nullable; @@ -79,7 +79,7 @@ public interface ICraftingTask { * @param tag the tag * @return the written tag */ - NBTTagCompound writeToNbt(NBTTagCompound tag); + CompoundNBT writeToNbt(CompoundNBT tag); /** * {@link ICraftingTask#calculate()} must be run before this! diff --git a/src/main/java/com/raoulvdberge/refinedstorage/api/network/INetworkNodeVisitor.java b/src/main/java/com/raoulvdberge/refinedstorage/api/network/INetworkNodeVisitor.java index 5bf88b459..08bb18797 100644 --- a/src/main/java/com/raoulvdberge/refinedstorage/api/network/INetworkNodeVisitor.java +++ b/src/main/java/com/raoulvdberge/refinedstorage/api/network/INetworkNodeVisitor.java @@ -1,7 +1,7 @@ package com.raoulvdberge.refinedstorage.api.network; import com.raoulvdberge.refinedstorage.api.util.Action; -import net.minecraft.util.EnumFacing; +import net.minecraft.util.Direction; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; @@ -31,7 +31,7 @@ public interface INetworkNodeVisitor { * @param pos the position * @param side the side */ - void apply(World world, BlockPos pos, @Nullable EnumFacing side); + void apply(World world, BlockPos pos, @Nullable Direction side); /** * Returns whether the network graph is scanning in simulation mode. diff --git a/src/main/java/com/raoulvdberge/refinedstorage/api/network/grid/IGrid.java b/src/main/java/com/raoulvdberge/refinedstorage/api/network/grid/IGrid.java index 98b2a6e5b..daa41bdde 100644 --- a/src/main/java/com/raoulvdberge/refinedstorage/api/network/grid/IGrid.java +++ b/src/main/java/com/raoulvdberge/refinedstorage/api/network/grid/IGrid.java @@ -5,10 +5,9 @@ import com.raoulvdberge.refinedstorage.api.network.grid.handler.IItemGridHandler import com.raoulvdberge.refinedstorage.api.storage.IStorageCache; import com.raoulvdberge.refinedstorage.api.storage.IStorageCacheListener; import com.raoulvdberge.refinedstorage.api.util.IFilter; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.inventory.InventoryCraftResult; -import net.minecraft.inventory.InventoryCrafting; +import net.minecraft.entity.player.ServerPlayerEntity; +import net.minecraft.inventory.CraftResultInventory; +import net.minecraft.inventory.CraftingInventory; import net.minecraft.item.ItemStack; import net.minecraftforge.items.IItemHandlerModifiable; @@ -53,7 +52,7 @@ public interface IGrid { * @param player the player to create a listener for * @return a listener for this grid, will be attached to the storage cache in {@link #getStorageCache()} */ - IStorageCacheListener createListener(EntityPlayerMP player); + IStorageCacheListener createListener(ServerPlayerEntity player); /** * @return the storage cache for this grid, or null if this grid is unavailable @@ -184,13 +183,13 @@ public interface IGrid { * @return the crafting matrix, or null if not a crafting grid */ @Nullable - InventoryCrafting getCraftingMatrix(); + CraftingInventory getCraftingMatrix(); /** * @return the crafting result inventory, or null if not a crafting grid */ @Nullable - InventoryCraftResult getCraftingResult(); + CraftResultInventory getCraftingResult(); /** * Called when the crafting matrix changes. @@ -202,14 +201,14 @@ public interface IGrid { * * @param player the player that crafted the item */ - void onCrafted(EntityPlayer player); + void onCrafted(ServerPlayerEntity player); /** * Called when an item is crafted with shift click (up to 64 items) in a crafting grid. * * @param player the player that crafted the item */ - void onCraftedShift(EntityPlayer player); + void onCraftedShift(ServerPlayerEntity player); /** * Called when a JEI recipe transfer occurs. @@ -217,14 +216,14 @@ public interface IGrid { * @param player the player * @param recipe a 9*x array stack array, where x is the possible combinations for the given slot */ - void onRecipeTransfer(EntityPlayer player, ItemStack[][] recipe); + void onRecipeTransfer(ServerPlayerEntity player, ItemStack[][] recipe); /** * Called when the grid is closed. * * @param player the player */ - void onClosed(EntityPlayer player); + void onClosed(ServerPlayerEntity player); /** * @return true if the grid is active, false otherwise diff --git a/src/main/java/com/raoulvdberge/refinedstorage/api/network/grid/IGridFactory.java b/src/main/java/com/raoulvdberge/refinedstorage/api/network/grid/IGridFactory.java index c2849f92d..295b11f27 100644 --- a/src/main/java/com/raoulvdberge/refinedstorage/api/network/grid/IGridFactory.java +++ b/src/main/java/com/raoulvdberge/refinedstorage/api/network/grid/IGridFactory.java @@ -1,6 +1,6 @@ package com.raoulvdberge.refinedstorage.api.network.grid; -import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.ServerPlayerEntity; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.math.BlockPos; @@ -20,7 +20,7 @@ public interface IGridFactory { * @return the grid, or null if a problem occurred */ @Nullable - IGrid createFromStack(EntityPlayer player, ItemStack stack); + IGrid createFromStack(ServerPlayerEntity player, ItemStack stack); /** * Creates a grid from a block. Used when {@link #getType()} is BLOCK. @@ -30,7 +30,7 @@ public interface IGridFactory { * @return the grid, or null if a problem occurred */ @Nullable - IGrid createFromBlock(EntityPlayer player, BlockPos pos); + IGrid createFromBlock(ServerPlayerEntity player, BlockPos pos); /** * Returns a possible tile for this grid if {@link #getType()} is BLOCK. diff --git a/src/main/java/com/raoulvdberge/refinedstorage/api/network/grid/IGridManager.java b/src/main/java/com/raoulvdberge/refinedstorage/api/network/grid/IGridManager.java index 2bb42bb97..1a437c3bd 100644 --- a/src/main/java/com/raoulvdberge/refinedstorage/api/network/grid/IGridManager.java +++ b/src/main/java/com/raoulvdberge/refinedstorage/api/network/grid/IGridManager.java @@ -1,7 +1,7 @@ package com.raoulvdberge.refinedstorage.api.network.grid; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.entity.player.ServerPlayerEntity; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.math.BlockPos; @@ -33,7 +33,7 @@ public interface IGridManager { * @param player the player * @param pos the block position */ - void openGrid(int id, EntityPlayerMP player, BlockPos pos); + void openGrid(int id, ServerPlayerEntity player, BlockPos pos); /** * Opens a grid. Can only be called on the server. @@ -42,7 +42,7 @@ public interface IGridManager { * @param player the player * @param stack the stack */ - void openGrid(int id, EntityPlayerMP player, ItemStack stack); + void openGrid(int id, ServerPlayerEntity player, ItemStack stack); /** * Creates a grid. @@ -54,5 +54,5 @@ public interface IGridManager { * @return a grid, or null if an error has occurred */ @Nullable - Pair createGrid(int id, EntityPlayer player, @Nullable ItemStack stack, @Nullable BlockPos pos); + Pair createGrid(int id, PlayerEntity player, @Nullable ItemStack stack, @Nullable BlockPos pos); } diff --git a/src/main/java/com/raoulvdberge/refinedstorage/api/network/grid/handler/IFluidGridHandler.java b/src/main/java/com/raoulvdberge/refinedstorage/api/network/grid/handler/IFluidGridHandler.java index 15f341c86..8b73f20d7 100644 --- a/src/main/java/com/raoulvdberge/refinedstorage/api/network/grid/handler/IFluidGridHandler.java +++ b/src/main/java/com/raoulvdberge/refinedstorage/api/network/grid/handler/IFluidGridHandler.java @@ -1,7 +1,7 @@ package com.raoulvdberge.refinedstorage.api.network.grid.handler; import com.raoulvdberge.refinedstorage.api.IRSAPI; -import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.entity.player.ServerPlayerEntity; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; @@ -18,7 +18,7 @@ public interface IFluidGridHandler { * @param hash the hash of the fluid we're trying to extract, see {@link IRSAPI#getFluidStackHashCode(FluidStack)} * @param shift true if shift click was used, false otherwise */ - void onExtract(EntityPlayerMP player, int hash, boolean shift); + void onExtract(ServerPlayerEntity player, int hash, boolean shift); /** * Called when a player tries to insert fluids in the grid. @@ -28,14 +28,14 @@ public interface IFluidGridHandler { * @return the remainder, or null if there is no remainder */ @Nullable - ItemStack onInsert(EntityPlayerMP player, ItemStack container); + ItemStack onInsert(ServerPlayerEntity player, ItemStack container); /** * Called when a player is trying to insert a fluid that it is holding in their hand in the GUI. * * @param player the player that is attempting the insert */ - void onInsertHeldContainer(EntityPlayerMP player); + void onInsertHeldContainer(ServerPlayerEntity player); /** * Called when the player shift clicks a container into the grid. @@ -44,7 +44,7 @@ public interface IFluidGridHandler { * @param container the container * @return the remainder container */ - ItemStack onShiftClick(EntityPlayerMP player, ItemStack container); + ItemStack onShiftClick(ServerPlayerEntity player, ItemStack container); /** * Called when a player requests the crafting preview window to be opened. @@ -54,7 +54,7 @@ public interface IFluidGridHandler { * @param quantity the amount of that item that we need a preview for * @param noPreview true if the crafting preview window shouldn't be shown, false otherwise */ - void onCraftingPreviewRequested(EntityPlayerMP player, int hash, int quantity, boolean noPreview); + void onCraftingPreviewRequested(ServerPlayerEntity player, int hash, int quantity, boolean noPreview); /** * Called when a player requested crafting for an item. @@ -63,5 +63,5 @@ public interface IFluidGridHandler { * @param hash the hash of the item to request a craft for * @param quantity the amount of the item that has to be crafted */ - void onCraftingRequested(EntityPlayerMP player, int hash, int quantity); + void onCraftingRequested(ServerPlayerEntity player, int hash, int quantity); } diff --git a/src/main/java/com/raoulvdberge/refinedstorage/api/network/grid/handler/IItemGridHandler.java b/src/main/java/com/raoulvdberge/refinedstorage/api/network/grid/handler/IItemGridHandler.java index 2ef5dcc5d..d4b3f0017 100644 --- a/src/main/java/com/raoulvdberge/refinedstorage/api/network/grid/handler/IItemGridHandler.java +++ b/src/main/java/com/raoulvdberge/refinedstorage/api/network/grid/handler/IItemGridHandler.java @@ -1,7 +1,7 @@ package com.raoulvdberge.refinedstorage.api.network.grid.handler; import com.raoulvdberge.refinedstorage.api.IRSAPI; -import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.entity.player.ServerPlayerEntity; import net.minecraft.item.ItemStack; import javax.annotation.Nullable; @@ -22,7 +22,7 @@ public interface IItemGridHandler { * @param hash the hash of the item we're trying to extract, see {@link IRSAPI#getItemStackHashCode(ItemStack)} * @param flags how we are extracting, see the flags in {@link IItemGridHandler} */ - void onExtract(EntityPlayerMP player, int hash, int flags); + void onExtract(ServerPlayerEntity player, int hash, int flags); /** * Called when a player tries to insert an item in the grid. @@ -32,7 +32,7 @@ public interface IItemGridHandler { * @return the remainder, or null if there is no remainder */ @Nullable - ItemStack onInsert(EntityPlayerMP player, ItemStack stack); + ItemStack onInsert(ServerPlayerEntity player, ItemStack stack); /** * Called when a player is trying to insert an item that it is holding in their hand in the GUI. @@ -40,7 +40,7 @@ public interface IItemGridHandler { * @param player the player that is attempting the insert * @param single true if we are only inserting a single item, false otherwise */ - void onInsertHeldItem(EntityPlayerMP player, boolean single); + void onInsertHeldItem(ServerPlayerEntity player, boolean single); /** * Called when the player shift clicks an item into the grid. @@ -49,7 +49,7 @@ public interface IItemGridHandler { * @param stack the stack * @return the remainder stack */ - ItemStack onShiftClick(EntityPlayerMP player, ItemStack stack); + ItemStack onShiftClick(ServerPlayerEntity player, ItemStack stack); /** * Called when a player requests the crafting preview window to be opened. @@ -59,7 +59,7 @@ public interface IItemGridHandler { * @param quantity the amount of that item that we need a preview for * @param noPreview true if the crafting preview window shouldn't be shown, false otherwise */ - void onCraftingPreviewRequested(EntityPlayerMP player, int hash, int quantity, boolean noPreview); + void onCraftingPreviewRequested(ServerPlayerEntity player, int hash, int quantity, boolean noPreview); /** * Called when a player requested crafting for an item. @@ -68,7 +68,7 @@ public interface IItemGridHandler { * @param hash the hash of the item to request a craft for * @param quantity the amount of the item that has to be crafted */ - void onCraftingRequested(EntityPlayerMP player, int hash, int quantity); + void onCraftingRequested(ServerPlayerEntity player, int hash, int quantity); /** * Called when a player wants to cancel a crafting task. @@ -76,5 +76,5 @@ public interface IItemGridHandler { * @param player the player that requested the cancel * @param id the task id, or null to cancel all tasks that are in the network currently */ - void onCraftingCancelRequested(EntityPlayerMP player, @Nullable UUID id); + void onCraftingCancelRequested(ServerPlayerEntity player, @Nullable UUID id); } diff --git a/src/main/java/com/raoulvdberge/refinedstorage/api/network/item/INetworkItem.java b/src/main/java/com/raoulvdberge/refinedstorage/api/network/item/INetworkItem.java index ea81830fa..f92e6edfe 100755 --- a/src/main/java/com/raoulvdberge/refinedstorage/api/network/item/INetworkItem.java +++ b/src/main/java/com/raoulvdberge/refinedstorage/api/network/item/INetworkItem.java @@ -1,7 +1,7 @@ package com.raoulvdberge.refinedstorage.api.network.item; import com.raoulvdberge.refinedstorage.api.network.INetwork; -import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.PlayerEntity; /** * Represents a network item (an item that is connected to the network somehow). @@ -12,7 +12,7 @@ public interface INetworkItem { /** * @return the player using the network item */ - EntityPlayer getPlayer(); + PlayerEntity getPlayer(); /** * Called when the network item is being opened. diff --git a/src/main/java/com/raoulvdberge/refinedstorage/api/network/item/INetworkItemHandler.java b/src/main/java/com/raoulvdberge/refinedstorage/api/network/item/INetworkItemHandler.java index 295dfff16..19f5062ff 100755 --- a/src/main/java/com/raoulvdberge/refinedstorage/api/network/item/INetworkItemHandler.java +++ b/src/main/java/com/raoulvdberge/refinedstorage/api/network/item/INetworkItemHandler.java @@ -1,6 +1,6 @@ package com.raoulvdberge.refinedstorage.api.network.item; -import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; import javax.annotation.Nullable; @@ -16,14 +16,14 @@ public interface INetworkItemHandler { * @param player the player that opened the network item * @param stack the stack that has been opened */ - void open(EntityPlayer player, ItemStack stack); + void open(PlayerEntity player, ItemStack stack); /** * Called when the player closes a network item. * * @param player the player that closed the network item */ - void close(EntityPlayer player); + void close(PlayerEntity player); /** * Returns a {@link INetworkItem} for a player. @@ -32,11 +32,11 @@ public interface INetworkItemHandler { * @return the {@link INetworkItem} that corresponds to a player, or null if the player isn't using a network item */ @Nullable - INetworkItem getItem(EntityPlayer player); + INetworkItem getItem(PlayerEntity player); /** * @param player the player * @param energy energy to extract */ - void drainEnergy(EntityPlayer player, int energy); + void drainEnergy(PlayerEntity player, int energy); } diff --git a/src/main/java/com/raoulvdberge/refinedstorage/api/network/item/INetworkItemProvider.java b/src/main/java/com/raoulvdberge/refinedstorage/api/network/item/INetworkItemProvider.java index 08e0dd3f3..3f537bf30 100755 --- a/src/main/java/com/raoulvdberge/refinedstorage/api/network/item/INetworkItemProvider.java +++ b/src/main/java/com/raoulvdberge/refinedstorage/api/network/item/INetworkItemProvider.java @@ -1,6 +1,6 @@ package com.raoulvdberge.refinedstorage.api.network.item; -import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; import javax.annotation.Nonnull; @@ -18,5 +18,5 @@ public interface INetworkItemProvider { * @return the network item */ @Nonnull - INetworkItem provide(INetworkItemHandler handler, EntityPlayer player, ItemStack stack); + INetworkItem provide(INetworkItemHandler handler, PlayerEntity player, ItemStack stack); } diff --git a/src/main/java/com/raoulvdberge/refinedstorage/api/network/node/INetworkNode.java b/src/main/java/com/raoulvdberge/refinedstorage/api/network/node/INetworkNode.java index c2ed58d25..cd238e024 100644 --- a/src/main/java/com/raoulvdberge/refinedstorage/api/network/node/INetworkNode.java +++ b/src/main/java/com/raoulvdberge/refinedstorage/api/network/node/INetworkNode.java @@ -2,7 +2,7 @@ package com.raoulvdberge.refinedstorage.api.network.node; import com.raoulvdberge.refinedstorage.api.network.INetwork; import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.CompoundNBT; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; @@ -65,7 +65,7 @@ public interface INetworkNode { * @param tag the tag * @return the written tag */ - NBTTagCompound write(NBTTagCompound tag); + CompoundNBT write(CompoundNBT tag); /** * @return the position of this network node diff --git a/src/main/java/com/raoulvdberge/refinedstorage/api/network/node/INetworkNodeFactory.java b/src/main/java/com/raoulvdberge/refinedstorage/api/network/node/INetworkNodeFactory.java index 7bac57d25..12ad93d60 100644 --- a/src/main/java/com/raoulvdberge/refinedstorage/api/network/node/INetworkNodeFactory.java +++ b/src/main/java/com/raoulvdberge/refinedstorage/api/network/node/INetworkNodeFactory.java @@ -1,6 +1,6 @@ package com.raoulvdberge.refinedstorage.api.network.node; -import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.CompoundNBT; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; @@ -19,5 +19,5 @@ public interface INetworkNodeFactory { * @return the network node */ @Nonnull - INetworkNode create(NBTTagCompound tag, World world, BlockPos pos); + INetworkNode create(CompoundNBT tag, World world, BlockPos pos); } diff --git a/src/main/java/com/raoulvdberge/refinedstorage/api/network/readerwriter/IReaderWriterChannel.java b/src/main/java/com/raoulvdberge/refinedstorage/api/network/readerwriter/IReaderWriterChannel.java index 39b850912..1afe90607 100755 --- a/src/main/java/com/raoulvdberge/refinedstorage/api/network/readerwriter/IReaderWriterChannel.java +++ b/src/main/java/com/raoulvdberge/refinedstorage/api/network/readerwriter/IReaderWriterChannel.java @@ -1,6 +1,6 @@ package com.raoulvdberge.refinedstorage.api.network.readerwriter; -import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.CompoundNBT; import java.util.List; @@ -29,12 +29,12 @@ public interface IReaderWriterChannel { * @param tag the tag to write to * @return the written tag */ - NBTTagCompound writeToNbt(NBTTagCompound tag); + CompoundNBT writeToNbt(CompoundNBT tag); /** * Reads this channel from NBT. * * @param tag the tag to read from */ - void readFromNbt(NBTTagCompound tag); + void readFromNbt(CompoundNBT tag); } diff --git a/src/main/java/com/raoulvdberge/refinedstorage/api/network/readerwriter/IReaderWriterHandler.java b/src/main/java/com/raoulvdberge/refinedstorage/api/network/readerwriter/IReaderWriterHandler.java index eecb6a19f..058ea6ff9 100755 --- a/src/main/java/com/raoulvdberge/refinedstorage/api/network/readerwriter/IReaderWriterHandler.java +++ b/src/main/java/com/raoulvdberge/refinedstorage/api/network/readerwriter/IReaderWriterHandler.java @@ -1,6 +1,6 @@ package com.raoulvdberge.refinedstorage.api.network.readerwriter; -import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.CompoundNBT; import net.minecraft.util.text.ITextComponent; import net.minecraftforge.common.capabilities.Capability; @@ -64,7 +64,7 @@ public interface IReaderWriterHandler { * @param tag the tag to write to * @return the written tag */ - NBTTagCompound writeToNbt(NBTTagCompound tag); + CompoundNBT writeToNbt(CompoundNBT tag); /** * @return the id of this writer, as assigned to the {@link IReaderWriterHandlerRegistry} diff --git a/src/main/java/com/raoulvdberge/refinedstorage/api/network/readerwriter/IReaderWriterHandlerFactory.java b/src/main/java/com/raoulvdberge/refinedstorage/api/network/readerwriter/IReaderWriterHandlerFactory.java index b73533762..80b6148d7 100755 --- a/src/main/java/com/raoulvdberge/refinedstorage/api/network/readerwriter/IReaderWriterHandlerFactory.java +++ b/src/main/java/com/raoulvdberge/refinedstorage/api/network/readerwriter/IReaderWriterHandlerFactory.java @@ -1,6 +1,6 @@ package com.raoulvdberge.refinedstorage.api.network.readerwriter; -import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.CompoundNBT; import javax.annotation.Nonnull; import javax.annotation.Nullable; @@ -16,5 +16,5 @@ public interface IReaderWriterHandlerFactory { * @return the reader writer handler */ @Nonnull - IReaderWriterHandler create(@Nullable NBTTagCompound tag); + IReaderWriterHandler create(@Nullable CompoundNBT tag); } diff --git a/src/main/java/com/raoulvdberge/refinedstorage/api/network/readerwriter/IReaderWriterManager.java b/src/main/java/com/raoulvdberge/refinedstorage/api/network/readerwriter/IReaderWriterManager.java index dc3edafc0..575c8592d 100644 --- a/src/main/java/com/raoulvdberge/refinedstorage/api/network/readerwriter/IReaderWriterManager.java +++ b/src/main/java/com/raoulvdberge/refinedstorage/api/network/readerwriter/IReaderWriterManager.java @@ -1,6 +1,6 @@ package com.raoulvdberge.refinedstorage.api.network.readerwriter; -import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.CompoundNBT; import javax.annotation.Nullable; import java.util.Collection; @@ -57,10 +57,10 @@ public interface IReaderWriterManager { /** * @param tag the tag to write to */ - void writeToNbt(NBTTagCompound tag); + void writeToNbt(CompoundNBT tag); /** * @param tag the tag to read from */ - void readFromNbt(NBTTagCompound tag); + void readFromNbt(CompoundNBT tag); } diff --git a/src/main/java/com/raoulvdberge/refinedstorage/api/network/readerwriter/IWriter.java b/src/main/java/com/raoulvdberge/refinedstorage/api/network/readerwriter/IWriter.java index 86e61b56d..66ab7711f 100755 --- a/src/main/java/com/raoulvdberge/refinedstorage/api/network/readerwriter/IWriter.java +++ b/src/main/java/com/raoulvdberge/refinedstorage/api/network/readerwriter/IWriter.java @@ -1,7 +1,7 @@ package com.raoulvdberge.refinedstorage.api.network.readerwriter; import com.raoulvdberge.refinedstorage.api.network.node.INetworkNode; -import net.minecraft.util.EnumFacing; +import net.minecraft.util.Direction; /** * Represents a writer network node. @@ -20,7 +20,7 @@ public interface IWriter extends INetworkNode { /** * @return the direction of the writer */ - EnumFacing getDirection(); + Direction getDirection(); /** * @return the channel diff --git a/src/main/java/com/raoulvdberge/refinedstorage/api/network/security/ISecurityManager.java b/src/main/java/com/raoulvdberge/refinedstorage/api/network/security/ISecurityManager.java index 9400d4bb3..ac037e27e 100755 --- a/src/main/java/com/raoulvdberge/refinedstorage/api/network/security/ISecurityManager.java +++ b/src/main/java/com/raoulvdberge/refinedstorage/api/network/security/ISecurityManager.java @@ -1,6 +1,6 @@ package com.raoulvdberge.refinedstorage.api.network.security; -import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.PlayerEntity; /** * The security manager of a network. @@ -11,7 +11,7 @@ public interface ISecurityManager { * @param player the player to check that permission for * @return true if the player has the given permission, false otherwise */ - boolean hasPermission(Permission permission, EntityPlayer player); + boolean hasPermission(Permission permission, PlayerEntity player); /** * Invalidates the security list. diff --git a/src/main/java/com/raoulvdberge/refinedstorage/api/storage/IStorageTracker.java b/src/main/java/com/raoulvdberge/refinedstorage/api/storage/IStorageTracker.java index ce249041a..2b4eb2820 100644 --- a/src/main/java/com/raoulvdberge/refinedstorage/api/storage/IStorageTracker.java +++ b/src/main/java/com/raoulvdberge/refinedstorage/api/storage/IStorageTracker.java @@ -1,6 +1,6 @@ package com.raoulvdberge.refinedstorage.api.storage; -import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.PlayerEntity; import javax.annotation.Nullable; @@ -26,7 +26,7 @@ public interface IStorageTracker { * @param player player * @param stack the stack */ - void changed(EntityPlayer player, T stack); + void changed(PlayerEntity player, T stack); /** * @param stack the stack diff --git a/src/main/java/com/raoulvdberge/refinedstorage/api/storage/disk/IStorageDisk.java b/src/main/java/com/raoulvdberge/refinedstorage/api/storage/disk/IStorageDisk.java index 9414ec1ed..106948f5f 100644 --- a/src/main/java/com/raoulvdberge/refinedstorage/api/storage/disk/IStorageDisk.java +++ b/src/main/java/com/raoulvdberge/refinedstorage/api/storage/disk/IStorageDisk.java @@ -1,7 +1,7 @@ package com.raoulvdberge.refinedstorage.api.storage.disk; import com.raoulvdberge.refinedstorage.api.storage.IStorage; -import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.CompoundNBT; import javax.annotation.Nullable; @@ -28,7 +28,7 @@ public interface IStorageDisk extends IStorage { /** * Writes the storage to NBT. */ - NBTTagCompound writeToNbt(); + CompoundNBT writeToNbt(); /** * @return the factory id as registered in {@link IStorageDiskRegistry} diff --git a/src/main/java/com/raoulvdberge/refinedstorage/api/storage/disk/IStorageDiskFactory.java b/src/main/java/com/raoulvdberge/refinedstorage/api/storage/disk/IStorageDiskFactory.java index 2fc0c38ec..d97cb6b15 100644 --- a/src/main/java/com/raoulvdberge/refinedstorage/api/storage/disk/IStorageDiskFactory.java +++ b/src/main/java/com/raoulvdberge/refinedstorage/api/storage/disk/IStorageDiskFactory.java @@ -1,6 +1,6 @@ package com.raoulvdberge.refinedstorage.api.storage.disk; -import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.CompoundNBT; import net.minecraft.world.World; /** @@ -16,7 +16,7 @@ public interface IStorageDiskFactory { * @param tag the tag * @return the storage disk */ - IStorageDisk createFromNbt(World world, NBTTagCompound tag); + IStorageDisk createFromNbt(World world, CompoundNBT tag); /** * Creates a storage disk on-demand. diff --git a/src/main/java/com/raoulvdberge/refinedstorage/api/storage/externalstorage/IExternalStorageProvider.java b/src/main/java/com/raoulvdberge/refinedstorage/api/storage/externalstorage/IExternalStorageProvider.java index 28f8821b3..a60660add 100644 --- a/src/main/java/com/raoulvdberge/refinedstorage/api/storage/externalstorage/IExternalStorageProvider.java +++ b/src/main/java/com/raoulvdberge/refinedstorage/api/storage/externalstorage/IExternalStorageProvider.java @@ -1,7 +1,7 @@ package com.raoulvdberge.refinedstorage.api.storage.externalstorage; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; +import net.minecraft.util.Direction; import javax.annotation.Nonnull; import java.util.function.Supplier; @@ -17,7 +17,7 @@ public interface IExternalStorageProvider { * @param direction the direction of the external storage * @return true if the provider can provide, false otherwise */ - boolean canProvide(TileEntity tile, EnumFacing direction); + boolean canProvide(TileEntity tile, Direction direction); /** * @param context the context of the external storage @@ -26,7 +26,7 @@ public interface IExternalStorageProvider { * @return the external storage handler */ @Nonnull - IStorageExternal provide(IExternalStorageContext context, Supplier tile, EnumFacing direction); + IStorageExternal provide(IExternalStorageContext context, Supplier tile, Direction direction); /** * Returns the priority of this external storage provider.