Ported to 1.7

This commit is contained in:
AlgorithmX2
2014-02-08 19:34:52 -06:00
parent 30c1deb8cf
commit d50c7f6312
328 changed files with 2209 additions and 2311 deletions
+7 -7
View File
@@ -1,7 +1,7 @@
package appeng.parts.misc;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import io.netty.buffer.ByteBuf;
import java.io.IOException;
import java.util.List;
import java.util.Random;
@@ -13,10 +13,10 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Icon;
import net.minecraft.util.IIcon;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeDirection;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.networking.IGridNode;
import appeng.api.parts.BusSupport;
import appeng.api.parts.IPart;
@@ -41,7 +41,7 @@ public class PartCableAnchor implements IPart
@SideOnly(Side.CLIENT)
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
{
Icon myIcon = is.getIconIndex();
IIcon myIcon = is.getIconIndex();
rh.setTexture( myIcon );
rh.setBounds( 7, 7, 10, 9, 9, 16 );
rh.renderBlock( x, y, z, renderer );
@@ -139,13 +139,13 @@ public class PartCableAnchor implements IPart
}
@Override
public void writeToStream(DataOutputStream data) throws IOException
public void writeToStream(ByteBuf data) throws IOException
{
}
@Override
public boolean readFromStream(DataInputStream data) throws IOException
public boolean readFromStream(ByteBuf data) throws IOException
{
return false;
}
+11 -11
View File
@@ -8,7 +8,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Vec3;
import net.minecraftforge.common.ForgeDirection;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.implementations.tiles.ISegmentedInventory;
import appeng.api.implementations.tiles.ITileStorageMonitorable;
import appeng.api.networking.IGridNode;
@@ -189,15 +189,15 @@ public class PartInterface extends PartBasicState implements IGridTickable, ISeg
}
@Override
public String getInvName()
public String getInventoryName()
{
return duality.getStorage().getInvName();
return duality.getStorage().getInventoryName();
}
@Override
public boolean isInvNameLocalized()
public boolean hasCustomInventoryName()
{
return duality.getStorage().isInvNameLocalized();
return duality.getStorage().hasCustomInventoryName();
}
@Override
@@ -207,9 +207,9 @@ public class PartInterface extends PartBasicState implements IGridTickable, ISeg
}
@Override
public void onInventoryChanged()
public void markDirty()
{
duality.getStorage().onInventoryChanged();
duality.getStorage().markDirty();
}
@Override
@@ -219,15 +219,15 @@ public class PartInterface extends PartBasicState implements IGridTickable, ISeg
}
@Override
public void openChest()
public void openInventory()
{
duality.getStorage().openChest();
duality.getStorage().openInventory();
}
@Override
public void closeChest()
public void closeInventory()
{
duality.getStorage().closeChest();
duality.getStorage().closeInventory();
}
@Override
+2 -2
View File
@@ -10,7 +10,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Vec3;
import net.minecraftforge.common.ForgeDirection;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.AEApi;
import appeng.api.config.AccessRestriction;
import appeng.api.config.FuzzyMode;
@@ -190,7 +190,7 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
cached = true;
TileEntity self = getHost().getTile();
TileEntity target = self.worldObj.getBlockTileEntity( self.xCoord + side.offsetX, self.yCoord + side.offsetY, self.zCoord + side.offsetZ );
TileEntity target = self.getWorldObj().getTileEntity( self.xCoord + side.offsetX, self.yCoord + side.offsetY, self.zCoord + side.offsetZ );
int newHandlerHash = Platform.generateTileHash( target );
+2 -2
View File
@@ -9,7 +9,7 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.ForgeDirection;
import net.minecraftforge.common.util.ForgeDirection;
import org.lwjgl.opengl.GL11;
@@ -227,7 +227,7 @@ public class PartToggleBus extends PartBasicState
List<ItemStack> items = new ArrayList();
items.add( is.copy() );
host.removePart( side, false );
Platform.spawnDrops( tile.worldObj, tile.xCoord, tile.yCoord, tile.zCoord, items );
Platform.spawnDrops( tile.getWorldObj(), tile.xCoord, tile.yCoord, tile.zCoord, items );
is.stackSize = 0;
}
}