Search in sources :

Example 36 with IProgWidget

use of pneumaticCraft.common.progwidgets.IProgWidget 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

IProgWidget (pneumaticCraft.common.progwidgets.IProgWidget)36 Point (java.awt.Point)8 ProgWidgetStart (pneumaticCraft.common.progwidgets.ProgWidgetStart)8 ArrayList (java.util.ArrayList)6 ItemStack (net.minecraft.item.ItemStack)6 EntityDrone (pneumaticCraft.common.entity.living.EntityDrone)6 ProgWidgetArea (pneumaticCraft.common.progwidgets.ProgWidgetArea)5 PacketProgrammerUpdate (pneumaticCraft.common.network.PacketProgrammerUpdate)4 ProgWidgetGoToLocation (pneumaticCraft.common.progwidgets.ProgWidgetGoToLocation)4 ProgWidgetSuicide (pneumaticCraft.common.progwidgets.ProgWidgetSuicide)4 HashSet (java.util.HashSet)3 GuiScreen (net.minecraft.client.gui.GuiScreen)3 NBTTagCompound (net.minecraft.nbt.NBTTagCompound)3 ChunkPosition (net.minecraft.world.ChunkPosition)3 Rectangle (java.awt.Rectangle)2 HashMap (java.util.HashMap)2 Map (java.util.Map)2 Entity (net.minecraft.entity.Entity)2 NBTTagList (net.minecraft.nbt.NBTTagList)2 IProgrammable (pneumaticCraft.api.item.IProgrammable)2