public interface IPartItem
you must register your bus with the Bus renderer, using AEApi.INSTANCE().partHelper().setItemBusRenderer( this );
then simply add these two methods, which tell MC to use the Block Textures, and call AE's Bus Placement Code.
@Override
@SideOnly(Side.CLIENT)
public int getSpriteNumber()
{
return 0;
}
@Override
public boolean onItemUse(ItemStack is, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ)
{
return AEApi.INSTANCE().partHelper().placeBus( is, x, y, z, side, player, world );
}
Modifier and Type | Method and Description |
---|---|
IPart |
createPartFromItemStack(net.minecraft.item.ItemStack is)
create a new part INSTANCE, from the item stack.
|
@Nullable IPart createPartFromItemStack(net.minecraft.item.ItemStack is)
is
- item