AE2 First Commit, the dawn of 1.7 hast arrived.
This commit is contained in:
@@ -0,0 +1,162 @@
|
||||
package appeng.facade;
|
||||
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.parts.IFacadeContainer;
|
||||
import appeng.api.parts.IFacadePart;
|
||||
import appeng.api.parts.IPartHost;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.integration.abstraction.IBC;
|
||||
import appeng.items.parts.ItemFacade;
|
||||
|
||||
public class FacadeContainer implements IFacadeContainer
|
||||
{
|
||||
|
||||
final private IFacadePart facades[] = new FacadePart[6];
|
||||
|
||||
public void writeToStream(DataOutputStream out) throws IOException
|
||||
{
|
||||
int facadeSides = 0;
|
||||
for (int x = 0; x < facades.length; x++)
|
||||
{
|
||||
if ( getFacade( ForgeDirection.getOrientation( x ) ) != null )
|
||||
facadeSides = facadeSides | (1 << x);
|
||||
}
|
||||
out.writeByte( (byte) facadeSides );
|
||||
|
||||
for (int x = 0; x < facades.length; x++)
|
||||
{
|
||||
IFacadePart part = getFacade( ForgeDirection.getOrientation( x ) );
|
||||
if ( part != null )
|
||||
{
|
||||
int itemID = part.getItem().itemID;
|
||||
int dmgValue = part.getItemDamage();
|
||||
out.writeInt( itemID * (part.isBC() ? -1 : 1) );
|
||||
out.writeInt( dmgValue );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean readFromStream(DataInputStream out) throws IOException
|
||||
{
|
||||
int facadeSides = out.readByte();
|
||||
|
||||
int ids[] = new int[2];
|
||||
for (int x = 0; x < facades.length; x++)
|
||||
{
|
||||
ForgeDirection side = ForgeDirection.getOrientation( x );
|
||||
int ix = (1 << x);
|
||||
if ( (facadeSides & ix) == ix )
|
||||
{
|
||||
ids[0] = out.readInt();
|
||||
ids[1] = out.readInt();
|
||||
boolean isBC = ids[0] < 0;
|
||||
ids[0] = Math.abs( ids[0] );
|
||||
|
||||
if ( isBC && AppEng.instance.isIntegrationEnabled( "BC" ) )
|
||||
{
|
||||
IBC bc = (IBC) AppEng.instance.getIntegration( "BC" );
|
||||
facades[x] = bc.createFacadePart( ids, side );
|
||||
}
|
||||
else if ( !isBC )
|
||||
{
|
||||
ItemFacade ifa = (ItemFacade) AEApi.instance().items().itemFacade.item();
|
||||
ItemStack facade = ifa.createFromInts( ids );
|
||||
if ( facade != null )
|
||||
facades[x] = ifa.createPartFromItemStack( facade, side );
|
||||
}
|
||||
}
|
||||
else
|
||||
facades[x] = null;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void readFromNBT(NBTTagCompound c)
|
||||
{
|
||||
for (int x = 0; x < facades.length; x++)
|
||||
{
|
||||
facades[x] = null;
|
||||
|
||||
NBTTagCompound t = c.getCompoundTag( "facade:" + x );
|
||||
if ( t != null )
|
||||
{
|
||||
ItemStack is = ItemStack.loadItemStackFromNBT( t );
|
||||
if ( is != null )
|
||||
{
|
||||
Item i = is.getItem();
|
||||
if ( i instanceof IFacadeItem )
|
||||
facades[x] = ((IFacadeItem) i).createPartFromItemStack( is, ForgeDirection.getOrientation( x ) );
|
||||
else
|
||||
{
|
||||
if ( AppEng.instance.isIntegrationEnabled( "BC" ) )
|
||||
{
|
||||
IBC bc = (IBC) AppEng.instance.getIntegration( "BC" );
|
||||
if ( bc.isFacade( is ) )
|
||||
facades[x] = bc.createFacadePart( is, ForgeDirection.getOrientation( x ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void writeToNBT(NBTTagCompound c)
|
||||
{
|
||||
for (int x = 0; x < facades.length; x++)
|
||||
{
|
||||
if ( facades[x] != null )
|
||||
{
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
facades[x].getItemStack().writeToNBT( data );
|
||||
c.setCompoundTag( "facade:" + x, data );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addFacade(IFacadePart a)
|
||||
{
|
||||
if ( getFacade( a.getSide() ) == null )
|
||||
{
|
||||
facades[a.getSide().ordinal()] = a;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeFacade(IPartHost host, ForgeDirection side)
|
||||
{
|
||||
if ( side != null && side != ForgeDirection.UNKNOWN )
|
||||
{
|
||||
if ( facades[side.ordinal()] != null )
|
||||
{
|
||||
facades[side.ordinal()] = null;
|
||||
if ( host != null )
|
||||
host.markForUpdate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public IFacadePart getFacade(ForgeDirection s)
|
||||
{
|
||||
return facades[s.ordinal()];
|
||||
}
|
||||
|
||||
public boolean isEmpty()
|
||||
{
|
||||
for (int x = 0; x < facades.length; x++)
|
||||
if ( facades[x] != null )
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,395 @@
|
||||
package appeng.facade;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import appeng.api.parts.IFacadeContainer;
|
||||
import appeng.api.parts.IFacadePart;
|
||||
import appeng.api.parts.IPartCollsionHelper;
|
||||
import appeng.api.parts.IPartRenderHelper;
|
||||
import appeng.client.render.BusRenderHelper;
|
||||
import appeng.client.render.RenderBlocksWorkaround;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.integration.abstraction.IBC;
|
||||
|
||||
public class FacadePart implements IFacadePart
|
||||
{
|
||||
|
||||
public final ItemStack facade;
|
||||
public final ForgeDirection side;
|
||||
|
||||
public FacadePart(ItemStack facade, ForgeDirection side) {
|
||||
if ( facade == null )
|
||||
throw new RuntimeException( "Facade Part constructed on null item." );
|
||||
facade.stackSize = 1;
|
||||
this.facade = facade;
|
||||
this.side = side;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getItemStack()
|
||||
{
|
||||
return facade;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getBoxes(IPartCollsionHelper ch)
|
||||
{
|
||||
ch.addBox( 0.0, 0.0, 14, 16.0, 16.0, 16.0 );
|
||||
}
|
||||
|
||||
public static boolean isFacade(ItemStack is)
|
||||
{
|
||||
if ( is.getItem() instanceof IFacadeItem )
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
ItemStack getTexture()
|
||||
{
|
||||
if ( facade.getItem() instanceof IFacadeItem )
|
||||
{
|
||||
IFacadeItem fi = (IFacadeItem) facade.getItem();
|
||||
return fi.getTextureItem( facade );
|
||||
}
|
||||
else if ( AppEng.instance.isIntegrationEnabled( "BC" ) )
|
||||
{
|
||||
IBC bc = (IBC) AppEng.instance.getIntegration( "BC" );
|
||||
return bc.getTextureForFacade( facade );
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderStatic(int x, int y, int z, IPartRenderHelper instance2, RenderBlocks renderer, IFacadeContainer fc, AxisAlignedBB busBounds,
|
||||
boolean renderStilt)
|
||||
{
|
||||
if ( facade != null )
|
||||
{
|
||||
BusRenderHelper instance = (BusRenderHelper) instance2;
|
||||
|
||||
try
|
||||
{
|
||||
ItemStack randomItem = getTexture();
|
||||
|
||||
if ( renderStilt && busBounds == null )
|
||||
{
|
||||
if ( renderer instanceof RenderBlocksWorkaround )
|
||||
{
|
||||
RenderBlocksWorkaround rbw = (RenderBlocksWorkaround) renderer;
|
||||
rbw.isFacade = false;
|
||||
rbw.calculations = true;
|
||||
}
|
||||
|
||||
Icon myIcon = null;
|
||||
if ( isBC() )
|
||||
{
|
||||
IBC bc = (IBC) AppEng.instance.getIntegration( "BC" );
|
||||
myIcon = bc.getFacadeTexture();
|
||||
}
|
||||
|
||||
if ( myIcon == null )
|
||||
myIcon = facade.getIconIndex();
|
||||
|
||||
instance.setTexture( myIcon );
|
||||
|
||||
if ( isBC() )
|
||||
instance.setBounds( 6, 6, 10, 10, 10, 14 );
|
||||
else
|
||||
instance.setBounds( 7, 7, 10, 9, 9, 14 );
|
||||
|
||||
instance.renderBlock( x, y, z, renderer );
|
||||
instance.setTexture( null );
|
||||
|
||||
}
|
||||
|
||||
if ( randomItem != null )
|
||||
{
|
||||
if ( randomItem.getItem() instanceof ItemBlock )
|
||||
{
|
||||
ItemBlock ib = (ItemBlock) randomItem.getItem();
|
||||
Block blk = Block.blocksList[ib.getBlockID()];
|
||||
|
||||
try
|
||||
{
|
||||
int color = ib.getColorFromItemStack( randomItem, 0 );
|
||||
Tessellator.instance.setColorOpaque_I( color );
|
||||
}
|
||||
catch (Throwable error)
|
||||
{
|
||||
}
|
||||
|
||||
renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0;
|
||||
instance.setBounds( 0, 0, 14, 16, 16, 16 );
|
||||
instance.prepareBounds( renderer );
|
||||
|
||||
if ( renderer instanceof RenderBlocksWorkaround )
|
||||
{
|
||||
RenderBlocksWorkaround rbw = (RenderBlocksWorkaround) renderer;
|
||||
|
||||
rbw.isFacade = true;
|
||||
|
||||
rbw.calculations = true;
|
||||
rbw.faces = EnumSet.noneOf( ForgeDirection.class );
|
||||
|
||||
rbw.renderStandardBlock( blk, x, y, z );
|
||||
|
||||
rbw.calculations = false;
|
||||
rbw.faces = EnumSet.allOf( ForgeDirection.class );
|
||||
|
||||
((RenderBlocksWorkaround) renderer).setTexture( blk.getIcon( side.ordinal(), ib.getMetadata( randomItem.getItemDamage() ) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
instance.setTexture( blk.getIcon( side.ordinal(), ib.getMetadata( randomItem.getItemDamage() ) ) );
|
||||
}
|
||||
|
||||
if ( busBounds == null )
|
||||
{
|
||||
if ( side == ForgeDirection.UP || side == ForgeDirection.DOWN )
|
||||
{
|
||||
instance.renderBlockCurrentBounds( x, y, z, renderer );
|
||||
}
|
||||
else if ( side == ForgeDirection.NORTH || side == ForgeDirection.SOUTH )
|
||||
{
|
||||
if ( fc.getFacade( ForgeDirection.UP ) != null )
|
||||
renderer.renderMaxY -= 2.0 / 16.0;
|
||||
|
||||
if ( fc.getFacade( ForgeDirection.DOWN ) != null )
|
||||
renderer.renderMinY += 2.0 / 16.0;
|
||||
|
||||
instance.renderBlockCurrentBounds( x, y, z, renderer );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( fc.getFacade( ForgeDirection.UP ) != null )
|
||||
renderer.renderMaxY -= 2.0 / 16.0;
|
||||
|
||||
if ( fc.getFacade( ForgeDirection.DOWN ) != null )
|
||||
renderer.renderMinY += 2.0 / 16.0;
|
||||
|
||||
if ( fc.getFacade( ForgeDirection.SOUTH ) != null )
|
||||
renderer.renderMaxZ -= 2.0 / 16.0;
|
||||
|
||||
if ( fc.getFacade( ForgeDirection.NORTH ) != null )
|
||||
renderer.renderMinZ += 2.0 / 16.0;
|
||||
|
||||
instance.renderBlockCurrentBounds( x, y, z, renderer );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( side == ForgeDirection.UP || side == ForgeDirection.DOWN )
|
||||
{
|
||||
renderSegmentBlockCurrentBounds( instance, x, y, z, renderer, 0.0, 0.0, busBounds.maxZ, 1.0, 1.0, 1.0 );
|
||||
renderSegmentBlockCurrentBounds( instance, x, y, z, renderer, 0.0, 0.0, 0.0, 1.0, 1.0, busBounds.minZ );
|
||||
renderSegmentBlockCurrentBounds( instance, x, y, z, renderer, 0.0, 0.0, busBounds.minZ, busBounds.minX, 1.0, busBounds.maxZ );
|
||||
renderSegmentBlockCurrentBounds( instance, x, y, z, renderer, busBounds.maxX, 0.0, busBounds.minZ, 1.0, 1.0, busBounds.maxZ );
|
||||
}
|
||||
else if ( side == ForgeDirection.NORTH || side == ForgeDirection.SOUTH )
|
||||
{
|
||||
if ( fc.getFacade( ForgeDirection.UP ) != null )
|
||||
renderer.renderMaxY -= 2.0 / 16.0;
|
||||
|
||||
if ( fc.getFacade( ForgeDirection.DOWN ) != null )
|
||||
renderer.renderMinY += 2.0 / 16.0;
|
||||
|
||||
renderSegmentBlockCurrentBounds( instance, x, y, z, renderer, busBounds.maxX, 0.0, 0.0, 1.0, 1.0, 1.0 );
|
||||
renderSegmentBlockCurrentBounds( instance, x, y, z, renderer, 0.0, 0.0, 0.0, busBounds.minX, 1.0, 1.0 );
|
||||
renderSegmentBlockCurrentBounds( instance, x, y, z, renderer, busBounds.minX, 0.0, 0.0, busBounds.maxX, busBounds.minY, 1.0 );
|
||||
renderSegmentBlockCurrentBounds( instance, x, y, z, renderer, busBounds.minX, busBounds.maxY, 0.0, busBounds.maxX, 1.0, 1.0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( fc.getFacade( ForgeDirection.UP ) != null )
|
||||
renderer.renderMaxY -= 2.0 / 16.0;
|
||||
|
||||
if ( fc.getFacade( ForgeDirection.DOWN ) != null )
|
||||
renderer.renderMinY += 2.0 / 16.0;
|
||||
|
||||
if ( fc.getFacade( ForgeDirection.SOUTH ) != null )
|
||||
renderer.renderMaxZ -= 2.0 / 16.0;
|
||||
|
||||
if ( fc.getFacade( ForgeDirection.NORTH ) != null )
|
||||
renderer.renderMinZ += 2.0 / 16.0;
|
||||
|
||||
renderSegmentBlockCurrentBounds( instance, x, y, z, renderer, 0.0, 0.0, busBounds.maxZ, 1.0, 1.0, 1.0 );
|
||||
renderSegmentBlockCurrentBounds( instance, x, y, z, renderer, 0.0, 0.0, 0.0, 1.0, 1.0, busBounds.minZ );
|
||||
renderSegmentBlockCurrentBounds( instance, x, y, z, renderer, 0.0, 0.0, busBounds.minZ, 1.0, busBounds.minY, busBounds.maxZ );
|
||||
renderSegmentBlockCurrentBounds( instance, x, y, z, renderer, 0.0, busBounds.maxY, busBounds.minZ, 1.0, 1.0, busBounds.maxZ );
|
||||
}
|
||||
}
|
||||
|
||||
instance.setTexture( null );
|
||||
Tessellator.instance.setColorOpaque_F( 1, 1, 1 );
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Throwable t)
|
||||
{
|
||||
t.printStackTrace();
|
||||
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private void renderSegmentBlockCurrentBounds(BusRenderHelper instance, int x, int y, int z, RenderBlocks renderer, double minX, double minY, double minZ,
|
||||
double maxX, double maxY, double maxZ)
|
||||
{
|
||||
double oldMinX = renderer.renderMinX;
|
||||
double oldMinY = renderer.renderMinY;
|
||||
double oldMinZ = renderer.renderMinZ;
|
||||
double oldMaxX = renderer.renderMaxX;
|
||||
double oldMaxY = renderer.renderMaxY;
|
||||
double oldMaxZ = renderer.renderMaxZ;
|
||||
|
||||
renderer.renderMinX = Math.max( renderer.renderMinX, minX );
|
||||
renderer.renderMinY = Math.max( renderer.renderMinY, minY );
|
||||
renderer.renderMinZ = Math.max( renderer.renderMinZ, minZ );
|
||||
renderer.renderMaxX = Math.min( renderer.renderMaxX, maxX );
|
||||
renderer.renderMaxY = Math.min( renderer.renderMaxY, maxY );
|
||||
renderer.renderMaxZ = Math.min( renderer.renderMaxZ, maxZ );
|
||||
|
||||
// don't draw it if its not at least a pixel wide...
|
||||
if ( renderer.renderMaxX - renderer.renderMinX >= 1.0 / 16.0 && renderer.renderMaxY - renderer.renderMinY >= 1.0 / 16.0
|
||||
&& renderer.renderMaxZ - renderer.renderMinZ >= 1.0 / 16.0 )
|
||||
{
|
||||
instance.renderBlockCurrentBounds( x, y, z, renderer );
|
||||
}
|
||||
|
||||
renderer.renderMinX = oldMinX;
|
||||
renderer.renderMinY = oldMinY;
|
||||
renderer.renderMinZ = oldMinZ;
|
||||
renderer.renderMaxX = oldMaxX;
|
||||
renderer.renderMaxY = oldMaxY;
|
||||
renderer.renderMaxZ = oldMaxZ;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderInventory(IPartRenderHelper instance, RenderBlocks renderer)
|
||||
{
|
||||
if ( facade != null )
|
||||
{
|
||||
IFacadeItem fi = (IFacadeItem) facade.getItem();
|
||||
|
||||
try
|
||||
{
|
||||
ItemStack randomItem = fi.getTextureItem( facade );
|
||||
|
||||
instance.setTexture( facade.getIconIndex() );
|
||||
instance.setBounds( 7, 7, 4, 9, 9, 14 );
|
||||
instance.renderInventoryBox( renderer );
|
||||
instance.setTexture( null );
|
||||
|
||||
if ( randomItem != null )
|
||||
{
|
||||
if ( randomItem.getItem() instanceof ItemBlock )
|
||||
{
|
||||
ItemBlock ib = (ItemBlock) randomItem.getItem();
|
||||
Block blk = Block.blocksList[ib.getBlockID()];
|
||||
|
||||
try
|
||||
{
|
||||
int color = ib.getColorFromItemStack( randomItem, 0 );
|
||||
float r = (color >> 16 & 0xff) / 255F;
|
||||
float g = (color >> 8 & 0xff) / 255F;
|
||||
float b = (color & 0xff) / 255F;
|
||||
GL11.glColor4f( r, g, b, 1.0F );
|
||||
}
|
||||
catch (Throwable error)
|
||||
{
|
||||
}
|
||||
|
||||
GL11.glColor4f( 1, 1, 1, 1.0F );
|
||||
Tessellator.instance.setBrightness( 15 << 20 | 15 << 4 );
|
||||
Tessellator.instance.setColorOpaque_F( 1, 1, 1 );
|
||||
instance.setTexture( blk.getIcon( side.ordinal(), ib.getMetadata( randomItem.getItemDamage() ) ) );
|
||||
|
||||
instance.setBounds( 0, 0, 14, 16, 16, 16 );
|
||||
instance.renderInventoryBox( renderer );
|
||||
|
||||
instance.setTexture( null );
|
||||
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0F );
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Throwable t)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ForgeDirection getSide()
|
||||
{
|
||||
return side;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getPrimaryBox()
|
||||
{
|
||||
switch (side)
|
||||
{
|
||||
case DOWN:
|
||||
return AxisAlignedBB.getBoundingBox( 0.0, 0.0, 0.0, 1.0, 2.0 / 16.0, 1.0 );
|
||||
case EAST:
|
||||
return AxisAlignedBB.getBoundingBox( 14.0 / 16.0, 0.0, 0.0, 1.0, 1.0, 1.0 );
|
||||
case NORTH:
|
||||
return AxisAlignedBB.getBoundingBox( 0.0, 0.0, 0.0, 1.0, 1.0, 2.0 / 16.0 );
|
||||
case SOUTH:
|
||||
return AxisAlignedBB.getBoundingBox( 0.0, 0.0, 14.0 / 16.0, 1.0, 1.0, 1.0 );
|
||||
case UP:
|
||||
return AxisAlignedBB.getBoundingBox( 0.0, 14.0 / 16.0, 0.0, 1.0, 1.0, 1.0 );
|
||||
case WEST:
|
||||
return AxisAlignedBB.getBoundingBox( 0.0, 0.0, 0.0, 2.0 / 16.0, 1.0, 1.0 );
|
||||
default:
|
||||
break;
|
||||
|
||||
}
|
||||
return AxisAlignedBB.getBoundingBox( 0, 0, 0, 1, 1, 1 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItem()
|
||||
{
|
||||
ItemStack is = getTexture();
|
||||
if ( is == null )
|
||||
return null;
|
||||
return is.getItem();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemDamage()
|
||||
{
|
||||
ItemStack is = getTexture();
|
||||
if ( is == null )
|
||||
return 0;
|
||||
return is.getItemDamage();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBC()
|
||||
{
|
||||
return !(facade.getItem() instanceof IFacadeItem);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package appeng.facade;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
|
||||
public interface IFacadeItem
|
||||
{
|
||||
|
||||
FacadePart createPartFromItemStack(ItemStack is, ForgeDirection side);
|
||||
|
||||
ItemStack getTextureItem(ItemStack is);
|
||||
|
||||
int getMeta(ItemStack is);
|
||||
|
||||
Block getBlock(ItemStack is);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user