use of thaumcraft.api.aspects.IAspectContainer 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