use of thaumcraft.api.aspects.Aspect in project PneumaticCraft by MineMaarten.
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));
}
itags = temptags;
return itags;
}
use of thaumcraft.api.aspects.Aspect in project PneumaticCraft by MineMaarten.
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(StatCollector.translateToLocal(isVisCostPerTick(stack) ? "item.Focus.cost2" : "item.Focus.cost1"));
for (Aspect aspect : al.getAspectsSorted()) {
DecimalFormat myFormatter = new DecimalFormat("#####.##");
String amount = myFormatter.format(al.getAmount(aspect) / 100f);
list.add(" \u00A7" + aspect.getChatcolor() + aspect.getName() + "\u00A7r x " + amount);
}
}
addFocusInformation(stack, player, list, par4);
}
use of thaumcraft.api.aspects.Aspect in project PneumaticCraft by MineMaarten.
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.Aspect in project PneumaticCraft by MineMaarten.
the class ThaumcraftApiHelper method getAllCompoundAspects.
public static AspectList getAllCompoundAspects(int amount) {
if (allCompoundAspects.get(amount) == null) {
AspectList al = new AspectList();
for (Aspect aspect : Aspect.getCompoundAspects()) {
al.add(aspect, amount);
}
allCompoundAspects.put(amount, al);
}
return allCompoundAspects.get(amount);
}
use of thaumcraft.api.aspects.Aspect in project PneumaticCraft by MineMaarten.
the class BlockTrackEntryThaumcraft method addInformation.
@Override
public void addInformation(World world, int x, int y, int z, TileEntity te, List<String> infoList) {
if (te instanceof IAspectContainer) {
IAspectContainer container = (IAspectContainer) te;
AspectList aspects = container.getAspects();
if (aspects != null && aspects.size() > 0) {
infoList.add("blockTracker.info.thaumcraft");
for (Map.Entry<Aspect, Integer> entry : aspects.aspects.entrySet()) {
infoList.add("-" + entry.getValue() + "x " + entry.getKey().getName());
}
} else {
infoList.add(I18n.format("blockTracker.info.thaumcraft") + " -");
}
if (container instanceof INode) {
INode node = (INode) container;
infoList.add(I18n.format("blockTracker.info.thaumcraft.nodetype") + " " + I18n.format("nodetype." + node.getNodeType() + ".name"));
if (node.getNodeModifier() != null)
infoList.add(I18n.format("blockTracker.info.thaumcraft.nodeModifier") + " " + I18n.format("nodemod." + node.getNodeModifier() + ".name"));
}
}
}
Aggregations