Most of the 1.8 Port.

This commit is contained in:
AlgorithmX2
2015-06-15 19:44:59 -05:00
parent 17465e68e8
commit 38afde724b
824 changed files with 12120 additions and 9158 deletions
@@ -23,9 +23,8 @@ import java.util.Iterator;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.config.FuzzyMode;
import appeng.api.util.ForgeDirection;
import appeng.integration.IntegrationRegistry;
import appeng.integration.IntegrationType;
import appeng.integration.abstraction.IBC;
@@ -23,7 +23,6 @@ import java.util.Iterator;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import appeng.api.config.FuzzyMode;
import appeng.util.InventoryAdaptor;
import appeng.util.Platform;
@@ -23,7 +23,6 @@ import java.util.Iterator;
import java.util.List;
import net.minecraft.item.ItemStack;
import appeng.api.config.FuzzyMode;
import appeng.util.InventoryAdaptor;
import appeng.util.Platform;
@@ -23,7 +23,6 @@ import java.util.Iterator;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import appeng.api.config.FuzzyMode;
import appeng.util.InventoryAdaptor;
import appeng.util.Platform;
@@ -22,6 +22,7 @@ package appeng.util.inv;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IChatComponent;
public class AdaptorPlayerInventory implements IInventory
@@ -73,15 +74,15 @@ public class AdaptorPlayerInventory implements IInventory
{
this.src.setInventorySlotContents( var1 + this.min, var2 );
}
@Override
public String getInventoryName()
public IChatComponent getDisplayName()
{
return this.src.getInventoryName();
return this.src.getDisplayName();
}
@Override
public boolean hasCustomInventoryName()
public boolean hasCustomName()
{
return false;
}
@@ -103,17 +104,19 @@ public class AdaptorPlayerInventory implements IInventory
{
return this.src.isUseableByPlayer( var1 );
}
@Override
public void openInventory()
public void openInventory(
EntityPlayer player )
{
this.src.openInventory();
this.src.openInventory(player);
}
@Override
public void closeInventory()
public void closeInventory(
EntityPlayer player )
{
this.src.closeInventory();
this.src.closeInventory(player);
}
@Override
@@ -121,4 +124,37 @@ public class AdaptorPlayerInventory implements IInventory
{
return this.src.isItemValidForSlot( i, itemstack );
}
@Override
public String getName()
{
return src.getName();
}
@Override
public int getField(
int id )
{
return src.getField( id );
}
@Override
public void setField(
int id,
int value )
{
src.setField( id, value );
}
@Override
public int getFieldCount()
{
return src.getFieldCount();
}
@Override
public void clear()
{
src.clear();
}
}
@@ -21,10 +21,7 @@ package appeng.util.inv;
import java.util.Iterator;
import com.google.common.collect.ImmutableList;
import net.minecraft.item.ItemStack;
import appeng.api.AEApi;
import appeng.api.config.Actionable;
import appeng.api.config.FuzzyMode;
@@ -35,6 +32,8 @@ import appeng.api.storage.data.IItemList;
import appeng.util.InventoryAdaptor;
import appeng.util.item.AEItemStack;
import com.google.common.collect.ImmutableList;
public class IMEAdaptor extends InventoryAdaptor
{
@@ -20,7 +20,6 @@ package appeng.util.inv;
import net.minecraft.item.ItemStack;
import appeng.api.config.Actionable;
import appeng.api.storage.IMEInventory;
import appeng.api.storage.data.IAEItemStack;
@@ -20,7 +20,6 @@ package appeng.util.inv;
import net.minecraft.item.ItemStack;
import appeng.api.storage.data.IAEItemStack;
import appeng.util.item.AEItemStack;
@@ -23,8 +23,7 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.util.ForgeDirection;
import appeng.integration.IntegrationRegistry;
import appeng.integration.IntegrationType;
import appeng.integration.abstraction.IBC;
@@ -24,11 +24,12 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.google.common.collect.ImmutableList;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IChatComponent;
import com.google.common.collect.ImmutableList;
public class WrapperChainedInventory implements IInventory
@@ -167,13 +168,13 @@ public class WrapperChainedInventory implements IInventory
}
@Override
public String getInventoryName()
public String getName()
{
return "ChainedInv";
}
@Override
public boolean hasCustomInventoryName()
public boolean hasCustomName()
{
return false;
}
@@ -205,14 +206,16 @@ public class WrapperChainedInventory implements IInventory
{
return false;
}
@Override
public void openInventory()
public void openInventory(
EntityPlayer player )
{
}
@Override
public void closeInventory()
public void closeInventory(
EntityPlayer player )
{
}
@@ -234,4 +237,37 @@ public class WrapperChainedInventory implements IInventory
int size;
IInventory i;
}
@Override
public IChatComponent getDisplayName()
{
return null;
}
@Override
public int getField(
int id )
{
return 0;
}
@Override
public void setField(
int id,
int value )
{
}
@Override
public int getFieldCount()
{
return 0;
}
@Override
public void clear()
{
}
}
@@ -22,6 +22,7 @@ package appeng.util.inv;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IChatComponent;
public class WrapperInvSlot
@@ -86,18 +87,6 @@ public class WrapperInvSlot
this.inv.setInventorySlotContents( this.slot, itemstack );
}
@Override
public String getInventoryName()
{
return this.inv.getInventoryName();
}
@Override
public boolean hasCustomInventoryName()
{
return this.inv.hasCustomInventoryName();
}
@Override
public int getInventoryStackLimit()
{
@@ -117,21 +106,68 @@ public class WrapperInvSlot
}
@Override
public void openInventory()
public String getName()
{
this.inv.openInventory();
return this.inv.getName();
}
@Override
public void closeInventory()
public boolean hasCustomName()
{
this.inv.closeInventory();
return this.inv.hasCustomName();
}
@Override
public void openInventory(
EntityPlayer player )
{
this.inv.openInventory(player);
}
@Override
public void closeInventory(
EntityPlayer player )
{
this.inv.closeInventory(player);
}
@Override
public void clear()
{
this.inv.clear();
}
@Override
public int getField(
int id )
{
return inv.getField( id );
}
@Override
public int getFieldCount()
{
return this.inv.getFieldCount();
}
@Override
public boolean isItemValidForSlot( int i, ItemStack itemstack )
{
return WrapperInvSlot.this.isItemValid( itemstack ) && this.inv.isItemValidForSlot( this.slot, itemstack );
}
@Override
public IChatComponent getDisplayName()
{
return inv.getDisplayName();
}
@Override
public void setField(
int id,
int value )
{
inv.setField( id, value );
}
}
}
@@ -22,6 +22,7 @@ package appeng.util.inv;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IChatComponent;
public class WrapperInventoryRange implements IInventory
@@ -103,18 +104,6 @@ public class WrapperInventoryRange implements IInventory
this.src.setInventorySlotContents( this.slots[var1], var2 );
}
@Override
public String getInventoryName()
{
return this.src.getInventoryName();
}
@Override
public boolean hasCustomInventoryName()
{
return false;
}
@Override
public int getInventoryStackLimit()
{
@@ -134,17 +123,63 @@ public class WrapperInventoryRange implements IInventory
}
@Override
public void openInventory()
public String getName()
{
this.src.openInventory();
return this.src.getName();
}
@Override
public void closeInventory()
public boolean hasCustomName()
{
this.src.closeInventory();
return this.src.hasCustomName();
}
@Override
public void openInventory(
EntityPlayer player )
{
this.src.openInventory(player);
}
@Override
public void closeInventory(
EntityPlayer player )
{
this.src.closeInventory(player);
}
@Override
public void clear()
{
this.src.clear();
}
@Override
public int getField(
int id )
{
return src.getField( id );
}
@Override
public int getFieldCount()
{
return this.src.getFieldCount();
}
@Override
public IChatComponent getDisplayName()
{
return src.getDisplayName();
}
@Override
public void setField(
int id,
int value )
{
src.setField( id, value );
}
@Override
public boolean isItemValidForSlot( int i, ItemStack itemstack )
{
@@ -21,18 +21,18 @@ package appeng.util.inv;
import net.minecraft.inventory.ISidedInventory;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraft.util.EnumFacing;
public class WrapperMCISidedInventory extends WrapperInventoryRange implements IInventoryWrapper
{
final ISidedInventory side;
private final ForgeDirection dir;
private final EnumFacing dir;
public WrapperMCISidedInventory( ISidedInventory a, ForgeDirection d )
public WrapperMCISidedInventory( ISidedInventory a, EnumFacing d )
{
super( a, a.getAccessibleSlotsFromSide( d.ordinal() ), false );
super( a, a.getSlotsForFace( d ), false );
this.side = a;
this.dir = d;
}
@@ -58,7 +58,7 @@ public class WrapperMCISidedInventory extends WrapperInventoryRange implements I
if( this.side.isItemValidForSlot( this.slots[i], itemstack ) )
{
return this.side.canInsertItem( this.slots[i], itemstack, this.dir.ordinal() );
return this.side.canInsertItem( this.slots[i], itemstack, this.dir );
}
return false;
@@ -72,6 +72,6 @@ public class WrapperMCISidedInventory extends WrapperInventoryRange implements I
return false;
}
return this.side.canExtractItem( this.slots[i], is, this.dir.ordinal() );
return this.side.canExtractItem( this.slots[i], is, this.dir );
}
}
@@ -19,11 +19,11 @@
package appeng.util.inv;
import appeng.api.util.ForgeDirection;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
public class WrapperTEPipe implements IInventory