Make api pkg compile

This commit is contained in:
raoulvdberge
2019-08-29 11:47:47 +02:00
parent 74a5b5df23
commit 915114c833
30 changed files with 91 additions and 93 deletions

View File

@@ -25,7 +25,7 @@ import com.raoulvdberge.refinedstorage.api.util.IOneSixMigrationHelper;
import com.raoulvdberge.refinedstorage.api.util.IQuantityFormatter; import com.raoulvdberge.refinedstorage.api.util.IQuantityFormatter;
import com.raoulvdberge.refinedstorage.api.util.IStackList; import com.raoulvdberge.refinedstorage.api.util.IStackList;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.CompoundNBT;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidStack;
@@ -194,7 +194,7 @@ public interface IRSAPI {
* @param tag the nbt tag * @param tag the nbt tag
* @return the request info * @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. * Returns a helper for the 1.6.x migration.

View File

@@ -3,7 +3,7 @@ package com.raoulvdberge.refinedstorage.api.autocrafting;
import com.raoulvdberge.refinedstorage.api.autocrafting.craftingmonitor.ICraftingMonitorListener; import com.raoulvdberge.refinedstorage.api.autocrafting.craftingmonitor.ICraftingMonitorListener;
import com.raoulvdberge.refinedstorage.api.autocrafting.task.ICraftingTask; import com.raoulvdberge.refinedstorage.api.autocrafting.task.ICraftingTask;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.CompoundNBT;
import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.items.IItemHandlerModifiable; import net.minecraftforge.items.IItemHandlerModifiable;
@@ -166,13 +166,13 @@ public interface ICraftingManager {
/** /**
* @param tag the tag to read from * @param tag the tag to read from
*/ */
void readFromNbt(NBTTagCompound tag); void readFromNbt(CompoundNBT tag);
/** /**
* @param tag the tag to write to * @param tag the tag to write to
* @return the written tag * @return the written tag
*/ */
NBTTagCompound writeToNbt(NBTTagCompound tag); CompoundNBT writeToNbt(CompoundNBT tag);
/** /**
* @param listener the listener * @param listener the listener

View File

@@ -1,7 +1,7 @@
package com.raoulvdberge.refinedstorage.api.autocrafting; package com.raoulvdberge.refinedstorage.api.autocrafting;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing; import net.minecraft.util.Direction;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraftforge.fluids.capability.IFluidHandler; import net.minecraftforge.fluids.capability.IFluidHandler;
import net.minecraftforge.items.IItemHandler; import net.minecraftforge.items.IItemHandler;
@@ -74,7 +74,7 @@ public interface ICraftingPatternContainer {
/** /**
* @return the direction to the facing tile * @return the direction to the facing tile
*/ */
EnumFacing getDirection(); Direction getDirection();
/** /**
* @return the patterns stored in this container * @return the patterns stored in this container

View File

@@ -2,8 +2,8 @@ package com.raoulvdberge.refinedstorage.api.autocrafting.craftingmonitor;
import com.raoulvdberge.refinedstorage.api.render.IElementDrawers; import com.raoulvdberge.refinedstorage.api.render.IElementDrawers;
import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBuf;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.api.distmarker.OnlyIn;
import javax.annotation.Nullable; import javax.annotation.Nullable;
@@ -16,7 +16,7 @@ public interface ICraftingMonitorElement {
* @param y position on the y axis to render * @param y position on the y axis to render
* @param drawers the drawers that this element can use * @param drawers the drawers that this element can use
*/ */
@SideOnly(Side.CLIENT) @OnlyIn(Dist.CLIENT)
void draw(int x, int y, IElementDrawers drawers); void draw(int x, int y, IElementDrawers drawers);
/** /**

View File

@@ -2,8 +2,8 @@ package com.raoulvdberge.refinedstorage.api.autocrafting.preview;
import com.raoulvdberge.refinedstorage.api.render.IElementDrawers; import com.raoulvdberge.refinedstorage.api.render.IElementDrawers;
import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBuf;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.api.distmarker.OnlyIn;
/** /**
* Represents a crafting preview element. * Represents a crafting preview element.
@@ -19,7 +19,7 @@ public interface ICraftingPreviewElement<T> {
* @param y position on the y axis to render * @param y position on the y axis to render
* @param drawers the drawers this element can use * @param drawers the drawers this element can use
*/ */
@SideOnly(Side.CLIENT) @OnlyIn(Dist.CLIENT)
void draw(int x, int y, IElementDrawers drawers); void draw(int x, int y, IElementDrawers drawers);
/** /**

View File

@@ -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.ICraftingRequestInfo;
import com.raoulvdberge.refinedstorage.api.autocrafting.task.ICraftingTask; import com.raoulvdberge.refinedstorage.api.autocrafting.task.ICraftingTask;
import com.raoulvdberge.refinedstorage.api.network.INetwork; import com.raoulvdberge.refinedstorage.api.network.INetwork;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.CompoundNBT;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
@@ -33,5 +33,5 @@ public interface ICraftingTaskFactory {
* @param tag the tag * @param tag the tag
* @return the crafting task * @return the crafting task
*/ */
ICraftingTask createFromNbt(INetwork network, NBTTagCompound tag) throws CraftingTaskReadException; ICraftingTask createFromNbt(INetwork network, CompoundNBT tag) throws CraftingTaskReadException;
} }

View File

@@ -1,10 +1,9 @@
package com.raoulvdberge.refinedstorage.api.autocrafting.task; package com.raoulvdberge.refinedstorage.api.autocrafting.task;
import com.raoulvdberge.refinedstorage.api.network.INetwork; 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 { public class CraftingTaskReadException extends Exception {
/** /**

View File

@@ -1,7 +1,7 @@
package com.raoulvdberge.refinedstorage.api.autocrafting.task; package com.raoulvdberge.refinedstorage.api.autocrafting.task;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.CompoundNBT;
import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidStack;
import javax.annotation.Nullable; import javax.annotation.Nullable;
@@ -25,5 +25,5 @@ public interface ICraftingRequestInfo {
/** /**
* @return the written tag * @return the written tag
*/ */
NBTTagCompound writeToNbt(); CompoundNBT writeToNbt();
} }

View File

@@ -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.autocrafting.preview.ICraftingPreviewElement;
import com.raoulvdberge.refinedstorage.api.util.IStackList; import com.raoulvdberge.refinedstorage.api.util.IStackList;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.CompoundNBT;
import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidStack;
import javax.annotation.Nullable; import javax.annotation.Nullable;
@@ -79,7 +79,7 @@ public interface ICraftingTask {
* @param tag the tag * @param tag the tag
* @return the written tag * @return the written tag
*/ */
NBTTagCompound writeToNbt(NBTTagCompound tag); CompoundNBT writeToNbt(CompoundNBT tag);
/** /**
* {@link ICraftingTask#calculate()} must be run before this! * {@link ICraftingTask#calculate()} must be run before this!

View File

@@ -1,7 +1,7 @@
package com.raoulvdberge.refinedstorage.api.network; package com.raoulvdberge.refinedstorage.api.network;
import com.raoulvdberge.refinedstorage.api.util.Action; 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.util.math.BlockPos;
import net.minecraft.world.World; import net.minecraft.world.World;
@@ -31,7 +31,7 @@ public interface INetworkNodeVisitor {
* @param pos the position * @param pos the position
* @param side the side * @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. * Returns whether the network graph is scanning in simulation mode.

View File

@@ -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.IStorageCache;
import com.raoulvdberge.refinedstorage.api.storage.IStorageCacheListener; import com.raoulvdberge.refinedstorage.api.storage.IStorageCacheListener;
import com.raoulvdberge.refinedstorage.api.util.IFilter; import com.raoulvdberge.refinedstorage.api.util.IFilter;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.ServerPlayerEntity;
import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.inventory.CraftResultInventory;
import net.minecraft.inventory.InventoryCraftResult; import net.minecraft.inventory.CraftingInventory;
import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraftforge.items.IItemHandlerModifiable; import net.minecraftforge.items.IItemHandlerModifiable;
@@ -53,7 +52,7 @@ public interface IGrid {
* @param player the player to create a listener for * @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()} * @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 * @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 * @return the crafting matrix, or null if not a crafting grid
*/ */
@Nullable @Nullable
InventoryCrafting getCraftingMatrix(); CraftingInventory getCraftingMatrix();
/** /**
* @return the crafting result inventory, or null if not a crafting grid * @return the crafting result inventory, or null if not a crafting grid
*/ */
@Nullable @Nullable
InventoryCraftResult getCraftingResult(); CraftResultInventory getCraftingResult();
/** /**
* Called when the crafting matrix changes. * Called when the crafting matrix changes.
@@ -202,14 +201,14 @@ public interface IGrid {
* *
* @param player the player that crafted the item * @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. * 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 * @param player the player that crafted the item
*/ */
void onCraftedShift(EntityPlayer player); void onCraftedShift(ServerPlayerEntity player);
/** /**
* Called when a JEI recipe transfer occurs. * Called when a JEI recipe transfer occurs.
@@ -217,14 +216,14 @@ public interface IGrid {
* @param player the player * @param player the player
* @param recipe a 9*x array stack array, where x is the possible combinations for the given slot * @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. * Called when the grid is closed.
* *
* @param player the player * @param player the player
*/ */
void onClosed(EntityPlayer player); void onClosed(ServerPlayerEntity player);
/** /**
* @return true if the grid is active, false otherwise * @return true if the grid is active, false otherwise

View File

@@ -1,6 +1,6 @@
package com.raoulvdberge.refinedstorage.api.network.grid; 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.item.ItemStack;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
@@ -20,7 +20,7 @@ public interface IGridFactory {
* @return the grid, or null if a problem occurred * @return the grid, or null if a problem occurred
*/ */
@Nullable @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. * 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 * @return the grid, or null if a problem occurred
*/ */
@Nullable @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. * Returns a possible tile for this grid if {@link #getType()} is BLOCK.

View File

@@ -1,7 +1,7 @@
package com.raoulvdberge.refinedstorage.api.network.grid; package com.raoulvdberge.refinedstorage.api.network.grid;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.entity.player.ServerPlayerEntity;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
@@ -33,7 +33,7 @@ public interface IGridManager {
* @param player the player * @param player the player
* @param pos the block position * @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. * Opens a grid. Can only be called on the server.
@@ -42,7 +42,7 @@ public interface IGridManager {
* @param player the player * @param player the player
* @param stack the stack * @param stack the stack
*/ */
void openGrid(int id, EntityPlayerMP player, ItemStack stack); void openGrid(int id, ServerPlayerEntity player, ItemStack stack);
/** /**
* Creates a grid. * Creates a grid.
@@ -54,5 +54,5 @@ public interface IGridManager {
* @return a grid, or null if an error has occurred * @return a grid, or null if an error has occurred
*/ */
@Nullable @Nullable
Pair<IGrid, TileEntity> createGrid(int id, EntityPlayer player, @Nullable ItemStack stack, @Nullable BlockPos pos); Pair<IGrid, TileEntity> createGrid(int id, PlayerEntity player, @Nullable ItemStack stack, @Nullable BlockPos pos);
} }

View File

@@ -1,7 +1,7 @@
package com.raoulvdberge.refinedstorage.api.network.grid.handler; package com.raoulvdberge.refinedstorage.api.network.grid.handler;
import com.raoulvdberge.refinedstorage.api.IRSAPI; 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.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack; 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 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 * @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. * 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 * @return the remainder, or null if there is no remainder
*/ */
@Nullable @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. * 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 * @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. * Called when the player shift clicks a container into the grid.
@@ -44,7 +44,7 @@ public interface IFluidGridHandler {
* @param container the container * @param container the container
* @return the remainder 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. * 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 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 * @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. * 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 hash the hash of the item to request a craft for
* @param quantity the amount of the item that has to be crafted * @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);
} }

View File

@@ -1,7 +1,7 @@
package com.raoulvdberge.refinedstorage.api.network.grid.handler; package com.raoulvdberge.refinedstorage.api.network.grid.handler;
import com.raoulvdberge.refinedstorage.api.IRSAPI; 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.minecraft.item.ItemStack;
import javax.annotation.Nullable; 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 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} * @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. * 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 * @return the remainder, or null if there is no remainder
*/ */
@Nullable @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. * 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 player the player that is attempting the insert
* @param single true if we are only inserting a single item, false otherwise * @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. * Called when the player shift clicks an item into the grid.
@@ -49,7 +49,7 @@ public interface IItemGridHandler {
* @param stack the stack * @param stack the stack
* @return the remainder 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. * 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 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 * @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. * 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 hash the hash of the item to request a craft for
* @param quantity the amount of the item that has to be crafted * @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. * 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 player the player that requested the cancel
* @param id the task id, or null to cancel all tasks that are in the network currently * @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);
} }

View File

@@ -1,7 +1,7 @@
package com.raoulvdberge.refinedstorage.api.network.item; package com.raoulvdberge.refinedstorage.api.network.item;
import com.raoulvdberge.refinedstorage.api.network.INetwork; 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). * 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 * @return the player using the network item
*/ */
EntityPlayer getPlayer(); PlayerEntity getPlayer();
/** /**
* Called when the network item is being opened. * Called when the network item is being opened.

View File

@@ -1,6 +1,6 @@
package com.raoulvdberge.refinedstorage.api.network.item; 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 net.minecraft.item.ItemStack;
import javax.annotation.Nullable; import javax.annotation.Nullable;
@@ -16,14 +16,14 @@ public interface INetworkItemHandler {
* @param player the player that opened the network item * @param player the player that opened the network item
* @param stack the stack that has been opened * @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. * Called when the player closes a network item.
* *
* @param player the player that closed the 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. * 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 * @return the {@link INetworkItem} that corresponds to a player, or null if the player isn't using a network item
*/ */
@Nullable @Nullable
INetworkItem getItem(EntityPlayer player); INetworkItem getItem(PlayerEntity player);
/** /**
* @param player the player * @param player the player
* @param energy energy to extract * @param energy energy to extract
*/ */
void drainEnergy(EntityPlayer player, int energy); void drainEnergy(PlayerEntity player, int energy);
} }

View File

@@ -1,6 +1,6 @@
package com.raoulvdberge.refinedstorage.api.network.item; 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 net.minecraft.item.ItemStack;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
@@ -18,5 +18,5 @@ public interface INetworkItemProvider {
* @return the network item * @return the network item
*/ */
@Nonnull @Nonnull
INetworkItem provide(INetworkItemHandler handler, EntityPlayer player, ItemStack stack); INetworkItem provide(INetworkItemHandler handler, PlayerEntity player, ItemStack stack);
} }

View File

@@ -2,7 +2,7 @@ package com.raoulvdberge.refinedstorage.api.network.node;
import com.raoulvdberge.refinedstorage.api.network.INetwork; import com.raoulvdberge.refinedstorage.api.network.INetwork;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.CompoundNBT;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World; import net.minecraft.world.World;
@@ -65,7 +65,7 @@ public interface INetworkNode {
* @param tag the tag * @param tag the tag
* @return the written tag * @return the written tag
*/ */
NBTTagCompound write(NBTTagCompound tag); CompoundNBT write(CompoundNBT tag);
/** /**
* @return the position of this network node * @return the position of this network node

View File

@@ -1,6 +1,6 @@
package com.raoulvdberge.refinedstorage.api.network.node; 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.util.math.BlockPos;
import net.minecraft.world.World; import net.minecraft.world.World;
@@ -19,5 +19,5 @@ public interface INetworkNodeFactory {
* @return the network node * @return the network node
*/ */
@Nonnull @Nonnull
INetworkNode create(NBTTagCompound tag, World world, BlockPos pos); INetworkNode create(CompoundNBT tag, World world, BlockPos pos);
} }

View File

@@ -1,6 +1,6 @@
package com.raoulvdberge.refinedstorage.api.network.readerwriter; package com.raoulvdberge.refinedstorage.api.network.readerwriter;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.CompoundNBT;
import java.util.List; import java.util.List;
@@ -29,12 +29,12 @@ public interface IReaderWriterChannel {
* @param tag the tag to write to * @param tag the tag to write to
* @return the written tag * @return the written tag
*/ */
NBTTagCompound writeToNbt(NBTTagCompound tag); CompoundNBT writeToNbt(CompoundNBT tag);
/** /**
* Reads this channel from NBT. * Reads this channel from NBT.
* *
* @param tag the tag to read from * @param tag the tag to read from
*/ */
void readFromNbt(NBTTagCompound tag); void readFromNbt(CompoundNBT tag);
} }

View File

@@ -1,6 +1,6 @@
package com.raoulvdberge.refinedstorage.api.network.readerwriter; 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.minecraft.util.text.ITextComponent;
import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.capabilities.Capability;
@@ -64,7 +64,7 @@ public interface IReaderWriterHandler {
* @param tag the tag to write to * @param tag the tag to write to
* @return the written tag * @return the written tag
*/ */
NBTTagCompound writeToNbt(NBTTagCompound tag); CompoundNBT writeToNbt(CompoundNBT tag);
/** /**
* @return the id of this writer, as assigned to the {@link IReaderWriterHandlerRegistry} * @return the id of this writer, as assigned to the {@link IReaderWriterHandlerRegistry}

View File

@@ -1,6 +1,6 @@
package com.raoulvdberge.refinedstorage.api.network.readerwriter; package com.raoulvdberge.refinedstorage.api.network.readerwriter;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.CompoundNBT;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
import javax.annotation.Nullable; import javax.annotation.Nullable;
@@ -16,5 +16,5 @@ public interface IReaderWriterHandlerFactory {
* @return the reader writer handler * @return the reader writer handler
*/ */
@Nonnull @Nonnull
IReaderWriterHandler create(@Nullable NBTTagCompound tag); IReaderWriterHandler create(@Nullable CompoundNBT tag);
} }

View File

@@ -1,6 +1,6 @@
package com.raoulvdberge.refinedstorage.api.network.readerwriter; package com.raoulvdberge.refinedstorage.api.network.readerwriter;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.CompoundNBT;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.Collection; import java.util.Collection;
@@ -57,10 +57,10 @@ public interface IReaderWriterManager {
/** /**
* @param tag the tag to write to * @param tag the tag to write to
*/ */
void writeToNbt(NBTTagCompound tag); void writeToNbt(CompoundNBT tag);
/** /**
* @param tag the tag to read from * @param tag the tag to read from
*/ */
void readFromNbt(NBTTagCompound tag); void readFromNbt(CompoundNBT tag);
} }

View File

@@ -1,7 +1,7 @@
package com.raoulvdberge.refinedstorage.api.network.readerwriter; package com.raoulvdberge.refinedstorage.api.network.readerwriter;
import com.raoulvdberge.refinedstorage.api.network.node.INetworkNode; import com.raoulvdberge.refinedstorage.api.network.node.INetworkNode;
import net.minecraft.util.EnumFacing; import net.minecraft.util.Direction;
/** /**
* Represents a writer network node. * Represents a writer network node.
@@ -20,7 +20,7 @@ public interface IWriter extends INetworkNode {
/** /**
* @return the direction of the writer * @return the direction of the writer
*/ */
EnumFacing getDirection(); Direction getDirection();
/** /**
* @return the channel * @return the channel

View File

@@ -1,6 +1,6 @@
package com.raoulvdberge.refinedstorage.api.network.security; 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. * The security manager of a network.
@@ -11,7 +11,7 @@ public interface ISecurityManager {
* @param player the player to check that permission for * @param player the player to check that permission for
* @return true if the player has the given permission, false otherwise * @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. * Invalidates the security list.

View File

@@ -1,6 +1,6 @@
package com.raoulvdberge.refinedstorage.api.storage; package com.raoulvdberge.refinedstorage.api.storage;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.PlayerEntity;
import javax.annotation.Nullable; import javax.annotation.Nullable;
@@ -26,7 +26,7 @@ public interface IStorageTracker<T> {
* @param player player * @param player player
* @param stack the stack * @param stack the stack
*/ */
void changed(EntityPlayer player, T stack); void changed(PlayerEntity player, T stack);
/** /**
* @param stack the stack * @param stack the stack

View File

@@ -1,7 +1,7 @@
package com.raoulvdberge.refinedstorage.api.storage.disk; package com.raoulvdberge.refinedstorage.api.storage.disk;
import com.raoulvdberge.refinedstorage.api.storage.IStorage; import com.raoulvdberge.refinedstorage.api.storage.IStorage;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.CompoundNBT;
import javax.annotation.Nullable; import javax.annotation.Nullable;
@@ -28,7 +28,7 @@ public interface IStorageDisk<T> extends IStorage<T> {
/** /**
* Writes the storage to NBT. * Writes the storage to NBT.
*/ */
NBTTagCompound writeToNbt(); CompoundNBT writeToNbt();
/** /**
* @return the factory id as registered in {@link IStorageDiskRegistry} * @return the factory id as registered in {@link IStorageDiskRegistry}

View File

@@ -1,6 +1,6 @@
package com.raoulvdberge.refinedstorage.api.storage.disk; package com.raoulvdberge.refinedstorage.api.storage.disk;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.CompoundNBT;
import net.minecraft.world.World; import net.minecraft.world.World;
/** /**
@@ -16,7 +16,7 @@ public interface IStorageDiskFactory<T> {
* @param tag the tag * @param tag the tag
* @return the storage disk * @return the storage disk
*/ */
IStorageDisk<T> createFromNbt(World world, NBTTagCompound tag); IStorageDisk<T> createFromNbt(World world, CompoundNBT tag);
/** /**
* Creates a storage disk on-demand. * Creates a storage disk on-demand.

View File

@@ -1,7 +1,7 @@
package com.raoulvdberge.refinedstorage.api.storage.externalstorage; package com.raoulvdberge.refinedstorage.api.storage.externalstorage;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing; import net.minecraft.util.Direction;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
import java.util.function.Supplier; import java.util.function.Supplier;
@@ -17,7 +17,7 @@ public interface IExternalStorageProvider<T> {
* @param direction the direction of the external storage * @param direction the direction of the external storage
* @return true if the provider can provide, false otherwise * @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 * @param context the context of the external storage
@@ -26,7 +26,7 @@ public interface IExternalStorageProvider<T> {
* @return the external storage handler * @return the external storage handler
*/ */
@Nonnull @Nonnull
IStorageExternal<T> provide(IExternalStorageContext context, Supplier<TileEntity> tile, EnumFacing direction); IStorageExternal<T> provide(IExternalStorageContext context, Supplier<TileEntity> tile, Direction direction);
/** /**
* Returns the priority of this external storage provider. * Returns the priority of this external storage provider.