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());
}*/
}
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);
}
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;
}
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;
}
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();
}
Aggregations