1.15 port
This commit is contained in:
@@ -19,10 +19,10 @@
|
||||
package appeng.util;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraftforge.items.CapabilityItemHandler;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
@@ -41,9 +41,9 @@ import appeng.util.inv.ItemSlot;
|
||||
*/
|
||||
public abstract class InventoryAdaptor implements Iterable<ItemSlot>
|
||||
{
|
||||
public static InventoryAdaptor getAdaptor( final TileEntity te, final EnumFacing d )
|
||||
public static InventoryAdaptor getAdaptor( final TileEntity te, final Direction d )
|
||||
{
|
||||
if( te != null && te.hasCapability( CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, d ) )
|
||||
if( te != null && te.getCapability( CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, d ) )
|
||||
{
|
||||
// Attempt getting an IItemHandler for the given side via caps
|
||||
IItemHandler itemHandler = te.getCapability( CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, d );
|
||||
@@ -55,7 +55,7 @@ public abstract class InventoryAdaptor implements Iterable<ItemSlot>
|
||||
return null;
|
||||
}
|
||||
|
||||
public static InventoryAdaptor getAdaptor( final EntityPlayer te )
|
||||
public static InventoryAdaptor getAdaptor( final PlayerEntity te )
|
||||
{
|
||||
if( te != null )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user