use of thaumcraft.api.aspects.Aspect in project LogisticsPipes by RS485.
the class ThaumCraftProxy method getListOfTagsForStack.
/**
* Used to get a list of integers representing the IDs of all the aspects in
* the given ItemStack. Returns null if object has no tags.
*
* @param stack
* The item to get tags for.
* @return An Integer list of aspect IDs.
*/
@Override
public List<String> getListOfTagsForStack(ItemStack stack) {
if (stack == null) {
return null;
}
List<String> list = new LinkedList<>();
AspectList tags = getTagsForStack(stack);
Aspect[] tagArray = tags.getAspectsSorted();
if (tagArray.length == 0 || tagArray == null) {
return null;
}
for (Aspect element : tagArray) {
if (element == null) {
continue;
}
list.add(element.getTag());
}
return list;
}
use of thaumcraft.api.aspects.Aspect in project Railcraft by Railcraft.
the class ItemGenericEssentiaContainer method getSubItems.
@SideOnly(Side.CLIENT)
@Override
public void getSubItems(Item par1, CreativeTabs par2CreativeTabs, List par3List) {
for (Aspect tag : Aspect.aspects.values()) {
ItemStack i = new ItemStack(this);
this.setAspects(i, new AspectList().add(tag, base));
par3List.add(i);
}
}
use of thaumcraft.api.aspects.Aspect in project Railcraft by Railcraft.
the class ItemFocusBasic method addInformation.
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) {
AspectList al = this.getVisCost(stack);
if (al != null && al.size() > 0) {
list.add(I18n.translateToLocal(isVisCostPerTick(stack) ? "item.Focus.cost2" : "item.Focus.cost1"));
for (Aspect aspect : al.getAspectsSortedByName()) {
DecimalFormat myFormatter = new DecimalFormat("#####.##");
String amount = myFormatter.format(al.getAmount(aspect));
list.add(" §" + aspect.getChatcolor() + aspect.getName() + "§r x " + amount);
}
}
addFocusInformation(stack, player, list, par4);
}
use of thaumcraft.api.aspects.Aspect in project Railcraft by Railcraft.
the class ThaumcraftPlugin method addBrickAspects.
private static void addBrickAspects(BrickTheme brick, int baseAmount, Aspect... baseAspects) {
Block block = brick.getBlock();
if (block == null)
return;
AspectList aspects = new AspectList().add(Aspect.EARTH, 4);
for (Aspect a : baseAspects) {
aspects.add(a, baseAmount);
}
ThaumcraftApi.registerObjectTag(new ItemStack(block, 1, OreDictionary.WILDCARD_VALUE), aspects);
ThaumcraftApi.registerObjectTag(brick.getStack(BrickVariant.COBBLE), aspects.copy().remove(Aspect.EARTH, 2).add(Aspect.ENTROPY, 2));
ThaumcraftApi.registerObjectTag(brick.getStack(BrickVariant.BLOCK), aspects.copy().remove(Aspect.EARTH, 2).add(Aspect.ORDER, 2));
ThaumcraftApi.registerObjectTag(brick.getStack(BrickVariant.ETCHED), aspects.copy().remove(Aspect.EARTH, 2).add(Aspect.DESIRE, 2));
}
use of thaumcraft.api.aspects.Aspect in project Railcraft by Railcraft.
the class ItemGenericEssentiaContainer method getSubItems.
@Override
public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> items) {
for (Aspect tag : Aspect.aspects.values()) {
ItemStack i = new ItemStack(this);
this.setAspects(i, new AspectList().add(tag, base));
items.add(i);
}
}
Aggregations