Package com.pahimar.ee3.item

Examples of com.pahimar.ee3.item.ItemAlchemicalBag


{
    private TileEntityAugmentationTable tileEntityAugmentationTable;

    public GuiAugmentationTable(InventoryPlayer inventoryPlayer, TileEntityAugmentationTable tileEntityAugmentationTable)
    {
        super(new ContainerAugmentationTable(inventoryPlayer, tileEntityAugmentationTable));
        this.tileEntityAugmentationTable = tileEntityAugmentationTable;
        xSize = 188;
        ySize = 199;
    }
View Full Code Here


{
    private TileEntityGlassBell tileEntityGlassBell;

    public GuiGlassBell(InventoryPlayer inventoryPlayer, TileEntityGlassBell tileEntityGlassBell)
    {
        super(new ContainerGlassBell(inventoryPlayer, tileEntityGlassBell));
        this.tileEntityGlassBell = tileEntityGlassBell;
        xSize = 176;
        ySize = 161;
    }
View Full Code Here

{
    private TileEntityResearchStation tileEntityResearchStation;

    public GuiResearchStation(InventoryPlayer inventoryPlayer, TileEntityResearchStation tileEntityResearchStation)
    {
        super(new ContainerResearchStation(inventoryPlayer, tileEntityResearchStation));
        xSize = 256;
        ySize = 234;
        this.tileEntityResearchStation = tileEntityResearchStation;
    }
View Full Code Here

public class GuiSymbolSelection extends GuiContainer
{
    public GuiSymbolSelection()
    {
        super(new ContainerSymbolSelection());
    }
View Full Code Here

    @Override
    public ItemStack getCraftingResult(InventoryCrafting inventoryCrafting)
    {
        ItemStack itemStack = null;
        ItemAlchemicalBag itemAlchemicalBag = null;
        int[] colorChannels = new int[3];
        int i = 0;
        int j = 0;
        int k, j1, k1, l1;
        int currentColor, newColor;
        float red, green, blue;

        for (k = 0; k < inventoryCrafting.getSizeInventory(); ++k)
        {
            ItemStack currentStack = inventoryCrafting.getStackInSlot(k);

            if (currentStack != null)
            {
                if (currentStack.getItem() instanceof ItemAlchemicalBag)
                {
                    itemAlchemicalBag = (ItemAlchemicalBag) currentStack.getItem();

                    if (itemStack != null)
                    {
                        return null;
                    }

                    itemStack = currentStack.copy();
                    itemStack.stackSize = 1;

                    if (itemAlchemicalBag.hasColor(currentStack))
                    {
                        currentColor = itemAlchemicalBag.getColor(itemStack);
                        red = (currentColor >> 16 & 255) / 255.0F;
                        green = (currentColor >> 8 & 255) / 255.0F;
                        blue = (currentColor & 255) / 255.0F;
                        i = (int) (i + Math.max(red, Math.max(green, blue)) * 255.0F);
                        colorChannels[0] = (int) (colorChannels[0] + red * 255.0F);
                        colorChannels[1] = (int) (colorChannels[1] + green * 255.0F);
                        colorChannels[2] = (int) (colorChannels[2] + blue * 255.0F);
                        ++j;
                    }
                }
                else
                {
                    if (currentStack.getItem() != Items.dye)
                    {
                        return null;
                    }

                    float[] dyeColorChannels = EntitySheep.fleeceColorTable[BlockColored.func_150032_b(currentStack.getItemDamage())];
                    j1 = (int) (dyeColorChannels[0] * 255.0F);
                    k1 = (int) (dyeColorChannels[1] * 255.0F);
                    newColor = (int) (dyeColorChannels[2] * 255.0F);
                    i += Math.max(j1, Math.max(k1, newColor));
                    colorChannels[0] += j1;
                    colorChannels[1] += k1;
                    colorChannels[2] += newColor;
                    ++j;
                }
            }
        }

        if (itemAlchemicalBag == null)
        {
            return null;
        }
        else
        {
            k = colorChannels[0] / j;
            l1 = colorChannels[1] / j;
            currentColor = colorChannels[2] / j;
            red = (float) i / (float) j;
            green = Math.max(k, Math.max(l1, currentColor));
            k = (int) (k * red / green);
            l1 = (int) (l1 * red / green);
            currentColor = (int) (currentColor * red / green);
            newColor = (k << 8) + l1;
            newColor = (newColor << 8) + currentColor;
            itemAlchemicalBag.setColor(itemStack, newColor);
            return itemStack;
        }
    }
View Full Code Here

        return aludelRegistry;
    }

    public void addRecipe(ItemStack recipeOutput, ItemStack recipeInputStack, ItemStack recipeInputDust)
    {
        addRecipe(new RecipeAludel(recipeOutput, recipeInputStack, recipeInputDust));
    }
View Full Code Here

        }
    }

    public void addRecipe(ItemStack recipeOutput, OreStack recipeInputStack, ItemStack recipeInputDust)
    {
        addRecipe(new RecipeAludel(recipeOutput, recipeInputStack, recipeInputDust));
    }
View Full Code Here

public class CraftingHandler
{
    public static void init()
    {
        // Add in the ability to dye Alchemical Bags
        CraftingManager.getInstance().getRecipeList().add(new RecipesAlchemicalBagDyes());
    }
View Full Code Here

                }
            }

            chalkSettings.writeToNBT(playerCustomData);
            EntityHelper.saveCustomEntityData(entityPlayer, playerCustomData);
            PacketHandler.INSTANCE.sendTo(new MessageChalkSettings(chalkSettings), (EntityPlayerMP) entityPlayer);
        }
    }
View Full Code Here

    {
        NBTTagCompound playerCustomData = EntityHelper.getCustomEntityData(event.player);
        ChalkSettings chalkSettings = new ChalkSettings();
        chalkSettings.readFromNBT(playerCustomData);

        PacketHandler.INSTANCE.sendTo(new MessageChalkSettings(chalkSettings), (EntityPlayerMP) event.player);
    }
View Full Code Here

TOP

Related Classes of com.pahimar.ee3.item.ItemAlchemicalBag

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.