Search in sources :

Example 1 with INode

use of thaumcraft.api.nodes.INode 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"));
        }
    }
}
Also used : INode(thaumcraft.api.nodes.INode) IAspectContainer(thaumcraft.api.aspects.IAspectContainer) AspectList(thaumcraft.api.aspects.AspectList) Aspect(thaumcraft.api.aspects.Aspect) Map(java.util.Map)

Aggregations

Map (java.util.Map)1 Aspect (thaumcraft.api.aspects.Aspect)1 AspectList (thaumcraft.api.aspects.AspectList)1 IAspectContainer (thaumcraft.api.aspects.IAspectContainer)1 INode (thaumcraft.api.nodes.INode)1