Search in sources :

Example 16 with AspectList

use of thaumcraft.api.aspects.AspectList in project PneumaticCraft by MineMaarten.

the class Thaumcraft method postInit.

@Override
public void postInit() {
    ThaumcraftApi.registerObjectTag(Names.INGOT_IRON_COMPRESSED, new AspectList().add(Aspect.METAL, 8).add(Aspect.AIR, 1));
    registerPlasticAspects(ItemPlasticPlants.SQUID_PLANT_DAMAGE, Aspect.DARKNESS);
    registerPlasticAspects(ItemPlasticPlants.FIRE_FLOWER_DAMAGE, Aspect.FIRE);
    registerPlasticAspects(ItemPlasticPlants.CREEPER_PLANT_DAMAGE, Aspect.ENERGY);
    registerPlasticAspects(ItemPlasticPlants.SLIME_PLANT_DAMAGE, Aspect.SLIME);
    registerPlasticAspects(ItemPlasticPlants.RAIN_PLANT_DAMAGE, Aspect.WATER);
    registerPlasticAspects(ItemPlasticPlants.ENDER_PLANT_DAMAGE, Aspect.ELDRITCH);
    registerPlasticAspects(ItemPlasticPlants.LIGHTNING_PLANT_DAMAGE, Aspect.WEATHER);
    // registerPlasticAspects(ItemPlasticPlants.ADRENALINE_PLANT_DAMAGE , Aspect.
    registerPlasticAspects(ItemPlasticPlants.POTION_PLANT_DAMAGE, Aspect.POISON);
    registerPlasticAspects(ItemPlasticPlants.REPULSION_PLANT_DAMAGE, Aspect.ENTROPY);
    registerPlasticAspects(ItemPlasticPlants.HELIUM_PLANT_DAMAGE, Aspect.LIGHT);
    registerPlasticAspects(ItemPlasticPlants.CHOPPER_PLANT_DAMAGE, Aspect.AIR);
    // registerPlasticAspects(ItemPlasticPlants.MUSIC_PLANT_DAMAGE , Aspect.
    registerPlasticAspects(ItemPlasticPlants.PROPULSION_PLANT_DAMAGE, Aspect.MOTION);
    registerPlasticAspects(ItemPlasticPlants.FLYING_FLOWER_DAMAGE, Aspect.FLIGHT);
    ThaumcraftApi.registerObjectTag(new ItemStack(Itemss.turbineBlade), new AspectList().add(Aspect.GREED, 2).add(Aspect.METAL, 3).add(Aspect.MOTION, 2).add(Aspect.ENERGY, 4));
    AspectList transAndCapAspects = new AspectList().add(Aspect.ENERGY, 2).add(Aspect.PLANT, 2).add(Aspect.METAL, 6);
    ThaumcraftApi.registerObjectTag(new ItemStack(Itemss.transistor), transAndCapAspects);
    ThaumcraftApi.registerObjectTag(new ItemStack(Itemss.capacitor), transAndCapAspects);
    AspectList pcbAspects = new AspectList().add(Aspect.ENERGY, 1).add(Aspect.PLANT, 2).add(Aspect.METAL, 6);
    ThaumcraftApi.registerObjectTag(new ItemStack(Itemss.emptyPCB), pcbAspects);
    ThaumcraftApi.registerObjectTag(new ItemStack(Itemss.unassembledPCB), pcbAspects);
    ThaumcraftApi.registerObjectTag(new ItemStack(Itemss.airCanister), new AspectList().add(Aspect.METAL, 30).add(Aspect.ENERGY, 4));
/*  for(Item item : pcItems) {
              ThaumcraftApi.registerComplexObjectTag(new ItemStack(item, 1, OreDictionary.WILDCARD_VALUE), new AspectList());
          }
          for(Block block : pcBlocks) {
              ThaumcraftApi.registerComplexObjectTag(new ItemStack(block, 1, OreDictionary.WILDCARD_VALUE), new AspectList());
          }*/
}
Also used : AspectList(thaumcraft.api.aspects.AspectList) ItemStack(net.minecraft.item.ItemStack)

Example 17 with AspectList

use of thaumcraft.api.aspects.AspectList in project ArsMagica2 by Mithion.

the class ThaumcraftApiHelper method getAllAspects.

public static AspectList getAllAspects(int amount) {
    if (allAspects.get(amount) == null) {
        AspectList al = new AspectList();
        for (Aspect aspect : Aspect.aspects.values()) {
            al.add(aspect, amount);
        }
        allAspects.put(amount, al);
    }
    return allAspects.get(amount);
}
Also used : AspectList(thaumcraft.api.aspects.AspectList) Aspect(thaumcraft.api.aspects.Aspect)

Example 18 with AspectList

use of thaumcraft.api.aspects.AspectList in project ArsMagica2 by Mithion.

the class ThaumcraftApi method exists.

/**
 * Checks to see if the passed item/block already has aspects associated with it.
 * @param id
 * @param meta
 * @return
 */
public static boolean exists(Item item, int meta) {
    AspectList tmp = ThaumcraftApi.objectTags.get(Arrays.asList(item, meta));
    if (tmp == null) {
        tmp = ThaumcraftApi.objectTags.get(Arrays.asList(item, OreDictionary.WILDCARD_VALUE));
        if (meta == OreDictionary.WILDCARD_VALUE && tmp == null) {
            int index = 0;
            do {
                tmp = ThaumcraftApi.objectTags.get(Arrays.asList(item, index));
                index++;
            } while (index < 16 && tmp == null);
        }
        if (tmp == null)
            return false;
    }
    return true;
}
Also used : AspectList(thaumcraft.api.aspects.AspectList)

Example 19 with AspectList

use of thaumcraft.api.aspects.AspectList in project ArsMagica2 by Mithion.

the class CrucibleRecipe method removeMatching.

public AspectList removeMatching(AspectList itags) {
    AspectList temptags = new AspectList();
    temptags.aspects.putAll(itags.aspects);
    for (Aspect tag : aspects.getAspects()) {
        temptags.remove(tag, aspects.getAmount(tag));
    // if (!temptags.remove(tag, aspects.getAmount(tag))) return null;
    }
    itags = temptags;
    return itags;
}
Also used : AspectList(thaumcraft.api.aspects.AspectList) Aspect(thaumcraft.api.aspects.Aspect)

Example 20 with AspectList

use of thaumcraft.api.aspects.AspectList in project LogisticsPipes by RS485.

the class ThaumCraftProxy method renderAspectsDown.

/**
	 * Renders the aspect icons for a given stack downwards starting at x, y.
	 * 
	 * @param x
	 *            The x coord of the screen.
	 * @param y
	 *            The y coord of the screen.
	 * @param item
	 *            The ItemStack to render aspects for.
	 * @param gui
	 *            The Gui screen to render on.
	 */
@Override
@SideOnly(Side.CLIENT)
public void renderAspectsDown(ItemStack item, int x, int y, GuiScreen gui) {
    GL11.glPushMatrix();
    AspectList tags = getTagsForStack(item);
    tags = ThaumcraftApiHelper.getBonusObjectTags(item, tags);
    if (tags != null) {
        int index = 0;
        for (Aspect tag : tags.getAspectsSortedAmount()) {
            if (tag == null) {
                continue;
            }
            int yPos = y + index * 18;
            renderAspectAt(tag, x, yPos, gui, tags.getAmount(tag), true);
            index++;
        }
    }
    GL11.glPopMatrix();
}
Also used : AspectList(thaumcraft.api.aspects.AspectList) Aspect(thaumcraft.api.aspects.Aspect) SideOnly(cpw.mods.fml.relauncher.SideOnly)

Aggregations

AspectList (thaumcraft.api.aspects.AspectList)39 Aspect (thaumcraft.api.aspects.Aspect)22 ItemStack (net.minecraft.item.ItemStack)15 DecimalFormat (java.text.DecimalFormat)3 Block (net.minecraft.block.Block)2 SideOnly (cpw.mods.fml.relauncher.SideOnly)1 ArrayList (java.util.ArrayList)1 LinkedList (java.util.LinkedList)1 Map (java.util.Map)1 IGas (ladysnake.gaspunk.api.IGas)1 EnumDetector (mods.railcraft.common.blocks.detector.EnumDetector)1 EnumColor (mods.railcraft.common.plugins.color.EnumColor)1 Entity (net.minecraft.entity.Entity)1 EntityItem (net.minecraft.entity.item.EntityItem)1 BlockPos (net.minecraft.util.math.BlockPos)1 SideOnly (net.minecraftforge.fml.relauncher.SideOnly)1 ThaumcraftApi (thaumcraft.api.ThaumcraftApi)1 IAspectContainer (thaumcraft.api.aspects.IAspectContainer)1 IEssentiaContainerItem (thaumcraft.api.aspects.IEssentiaContainerItem)1 ItemGenericEssentiaContainer (thaumcraft.api.items.ItemGenericEssentiaContainer)1