Search in sources :

Example 1 with IAreaProvider

use of pneumaticCraft.common.progwidgets.IAreaProvider in project PneumaticCraft by MineMaarten.

the class TileEntityProgrammer method previewArea.

public boolean previewArea(int widgetX, int widgetY) {
    for (IProgWidget w : progWidgets) {
        if (w.getX() == widgetX && w.getY() == widgetY && w instanceof IAreaProvider) {
            Set<ChunkPosition> area = new HashSet<ChunkPosition>();
            ((IAreaProvider) w).getArea(area);
            AreaShowManager.getInstance().showArea(area, 0x00FF00, this);
        }
    }
    return true;
}
Also used : IAreaProvider(pneumaticCraft.common.progwidgets.IAreaProvider) IProgWidget(pneumaticCraft.common.progwidgets.IProgWidget) ChunkPosition(net.minecraft.world.ChunkPosition) HashSet(java.util.HashSet)

Aggregations

HashSet (java.util.HashSet)1 ChunkPosition (net.minecraft.world.ChunkPosition)1 IAreaProvider (pneumaticCraft.common.progwidgets.IAreaProvider)1 IProgWidget (pneumaticCraft.common.progwidgets.IProgWidget)1