Search in sources :

Example 1 with TEBellJar

use of WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar in project BloodMagic by WayofTime.

the class RenderCrystalBelljar method renderTileEntityAt.

@Override
public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f) {
    if (tileEntity instanceof TEBellJar) {
        TEBellJar tileAltar = (TEBellJar) tileEntity;
        GL11.glPushMatrix();
        GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F);
        ResourceLocation test = new ResourceLocation("alchemicalwizardry:textures/models/CrystalBelljar.png");
        FMLClientHandler.instance().getClient().renderEngine.bindTexture(test);
        GL11.glPushMatrix();
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        this.modelConduit.render(null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
        GL11.glPopMatrix();
        GL11.glPopMatrix();
        ReagentContainerInfo[] info = tileAltar.getContainerInfo(ForgeDirection.UNKNOWN);
        if (info.length >= 1 && info[0] != null) {
            ReagentStack reagentStack = info[0].reagent;
            int capacity = info[0].capacity;
            if (reagentStack != null && reagentStack.reagent != null) {
                Reagent reagent = reagentStack.reagent;
                this.renderTankContents(d0, d1, d2, reagent.getColourRed(), reagent.getColourGreen(), reagent.getColourBlue(), 200 * reagentStack.amount / capacity);
            }
        }
    }
}
Also used : ReagentContainerInfo(WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo) ResourceLocation(net.minecraft.util.ResourceLocation) TEBellJar(WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar) ReagentStack(WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack) Reagent(WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent)

Example 2 with TEBellJar

use of WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar in project BloodMagic by WayofTime.

the class RitualEffectDemonPortal method checkJars.

public boolean checkJars(IMasterRitualStone ritualStone) {
    int x = ritualStone.getXCoord();
    int y = ritualStone.getYCoord();
    int z = ritualStone.getZCoord();
    for (Int3 pos : jarLocations) {
        if (!(ritualStone.getWorld().getTileEntity(x + pos.xCoord, y + pos.yCoord, z + pos.zCoord) instanceof TEBellJar)) {
            return false;
        }
    }
    return true;
}
Also used : Int3(WayofTime.alchemicalWizardry.api.Int3) TEBellJar(WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar)

Example 3 with TEBellJar

use of WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar in project BloodMagic by WayofTime.

the class BlockBelljar method getDrops.

@Override
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
    ArrayList<ItemStack> list = new ArrayList();
    TileEntity tile = world.getTileEntity(x, y, z);
    if (tile instanceof TEBellJar) {
        ItemStack drop = new ItemStack(this);
        NBTTagCompound tag = new NBTTagCompound();
        ((TEBellJar) tile).writeTankNBT(tag);
        drop.setTagCompound(tag);
        list.add(drop);
    }
    return list;
}
Also used : TileEntity(net.minecraft.tileentity.TileEntity) ArrayList(java.util.ArrayList) NBTTagCompound(net.minecraft.nbt.NBTTagCompound) TEBellJar(WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar) ItemStack(net.minecraft.item.ItemStack)

Aggregations

TEBellJar (WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar)3 Int3 (WayofTime.alchemicalWizardry.api.Int3)1 Reagent (WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent)1 ReagentContainerInfo (WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo)1 ReagentStack (WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack)1 ArrayList (java.util.ArrayList)1 ItemStack (net.minecraft.item.ItemStack)1 NBTTagCompound (net.minecraft.nbt.NBTTagCompound)1 TileEntity (net.minecraft.tileentity.TileEntity)1 ResourceLocation (net.minecraft.util.ResourceLocation)1