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.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.

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.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

View File

@@ -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

View File

@@ -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);
/**

View File

@@ -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<T> {
* @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);
/**

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.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;
}

View File

@@ -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 {
/**

View File

@@ -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();
}

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.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!

View File

@@ -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.

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.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

View File

@@ -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.

View File

@@ -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<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;
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);
}

View File

@@ -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);
}

View File

@@ -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.

View File

@@ -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);
}

View File

@@ -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);
}

View File

@@ -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

View File

@@ -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);
}

View File

@@ -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);
}

View File

@@ -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}

View File

@@ -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);
}

View File

@@ -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);
}

View File

@@ -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

View File

@@ -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.

View File

@@ -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<T> {
* @param player player
* @param stack the stack
*/
void changed(EntityPlayer player, T stack);
void changed(PlayerEntity player, T stack);
/**
* @param stack the stack

View File

@@ -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<T> extends IStorage<T> {
/**
* Writes the storage to NBT.
*/
NBTTagCompound writeToNbt();
CompoundNBT writeToNbt();
/**
* @return the factory id as registered in {@link IStorageDiskRegistry}

View File

@@ -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<T> {
* @param tag the tag
* @return the storage disk
*/
IStorageDisk<T> createFromNbt(World world, NBTTagCompound tag);
IStorageDisk<T> createFromNbt(World world, CompoundNBT tag);
/**
* Creates a storage disk on-demand.

View File

@@ -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<T> {
* @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<T> {
* @return the external storage handler
*/
@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.