Search in sources :

Example 1 with EntityPrototype

use of com.demod.factorio.prototype.EntityPrototype in project Factorio-FBSR by demodude4u.

the class RenderUtils method spriteRenderer.

public static EntityRenderer spriteRenderer(Layer layer, List<Sprite> sprites, BlueprintEntity entity, EntityPrototype prototype) {
    Point2D.Double pos = entity.getPosition();
    RenderUtils.shiftSprites(sprites, pos);
    Map<Boolean, List<Sprite>> groupedSprites = sprites.stream().collect(Collectors.partitioningBy(sprite -> sprite.shadow));
    // Rectangle2D.Double groundBounds =
    // Utils.parseRectangle(prototype.lua().get("collision_box"));
    Rectangle2D.Double groundBounds = Utils.parseRectangle(prototype.lua().get("selection_box"));
    groundBounds.x += pos.x;
    groundBounds.y += pos.y;
    return new EntityRenderer(layer, groundBounds) {

        @SuppressWarnings("unused")
        private void debugShowBounds(Rectangle2D.Double groundBounds, Graphics2D g) {
            long x = Math.round(groundBounds.getCenterX() * 2);
            long y = Math.round(groundBounds.getCenterY() * 2);
            long w = Math.round(groundBounds.width * 2);
            long h = Math.round(groundBounds.height * 2);
            // System.out.println("x=" + x + " y=" + y + " w=" + w + "
            // h=" + h);
            g.setColor(new Color(255, 255, 255, 64));
            g.draw(groundBounds);
            if (((w / 2) % 2) == (x % 2)) {
                g.setColor(new Color(255, 0, 0, 64));
                g.fill(groundBounds);
            }
            if (((h / 2) % 2) == (y % 2)) {
                g.setColor(new Color(0, 255, 0, 64));
                g.fill(groundBounds);
            }
        }

        @Override
        public void render(Graphics2D g) {
            for (Sprite sprite : groupedSprites.get(false)) {
                drawSprite(sprite, g);
            // debugShowBounds(groundBounds, g);
            }
        }

        @Override
        public void renderShadows(Graphics2D g) {
            for (Sprite sprite : groupedSprites.get(true)) {
                drawSprite(sprite, g);
            }
        }
    };
}
Also used : Color(java.awt.Color) Rectangle(java.awt.Rectangle) Point2D(java.awt.geom.Point2D) Multiset(com.google.common.collect.Multiset) Rectangle2D(java.awt.geom.Rectangle2D) DataTable(com.demod.factorio.DataTable) ArrayList(java.util.ArrayList) JSONObject(org.json.JSONObject) ImmutableList(com.google.common.collect.ImmutableList) Graphics2D(java.awt.Graphics2D) Map(java.util.Map) LinkedHashMultiset(com.google.common.collect.LinkedHashMultiset) Layer(com.demod.fbsr.Renderer.Layer) Stroke(java.awt.Stroke) TilePrototype(com.demod.factorio.prototype.TilePrototype) BufferedImage(java.awt.image.BufferedImage) Font(java.awt.Font) DecimalFormat(java.text.DecimalFormat) AffineTransform(java.awt.geom.AffineTransform) Collectors(java.util.stream.Collectors) Path2D(java.awt.geom.Path2D) ItemPrototype(com.demod.factorio.prototype.ItemPrototype) List(java.util.List) Utils(com.demod.factorio.Utils) FactorioData(com.demod.factorio.FactorioData) LuaValue(org.luaj.vm2.LuaValue) Optional(java.util.Optional) BasicStroke(java.awt.BasicStroke) EntityPrototype(com.demod.factorio.prototype.EntityPrototype) JSONArray(org.json.JSONArray) Color(java.awt.Color) Rectangle2D(java.awt.geom.Rectangle2D) Graphics2D(java.awt.Graphics2D) Point2D(java.awt.geom.Point2D) ArrayList(java.util.ArrayList) ImmutableList(com.google.common.collect.ImmutableList) List(java.util.List)

Example 2 with EntityPrototype

use of com.demod.factorio.prototype.EntityPrototype in project Factorio-FBSR by demodude4u.

the class EntityRendererFactory method createRenderers.

public void createRenderers(Consumer<Renderer> register, WorldMap map, DataTable dataTable, BlueprintEntity entity, EntityPrototype prototype) {
    try {
        List<Sprite> sprites;
        Optional<LuaValue> findSpriteLua = defaultProperties.stream().map(p -> prototype.lua().get(p)).filter(l -> l != LuaValue.NIL).findAny();
        if (findSpriteLua.isPresent()) {
            LuaValue spriteLua = findSpriteLua.get();
            boolean hasDir = spriteLua.get(entity.getDirection().name().toLowerCase()) != LuaValue.NIL;
            if (hasDir) {
                spriteLua = spriteLua.get(entity.getDirection().name().toLowerCase());
            }
            sprites = RenderUtils.getSpritesFromAnimation(spriteLua, entity.getDirection());
        } else {
            Sprite sprite = new Sprite();
            sprite.image = FactorioData.getModImage(prototype.lua().get("icon").tojstring());
            sprite.source = new Rectangle(0, 0, sprite.image.getWidth(), sprite.image.getHeight());
            sprite.bounds = (Rectangle2D.Double) prototype.getSelectionBox().clone();
            sprites = ImmutableList.of(sprite);
        }
        register.accept(RenderUtils.spriteRenderer(sprites, entity, prototype));
    } catch (RuntimeException e) {
        debugPrintContext(entity, prototype);
        throw e;
    }
}
Also used : Color(java.awt.Color) SplitterRendering(com.demod.fbsr.entity.SplitterRendering) Point2D(java.awt.geom.Point2D) ReactorRendering(com.demod.fbsr.entity.ReactorRendering) SolarPanelRendering(com.demod.fbsr.entity.SolarPanelRendering) Rectangle2D(java.awt.geom.Rectangle2D) Random(java.util.Random) CurvedRailRendering(com.demod.fbsr.entity.CurvedRailRendering) DataTable(com.demod.factorio.DataTable) JSONObject(org.json.JSONObject) Ellipse2D(java.awt.geom.Ellipse2D) FurnaceRendering(com.demod.fbsr.entity.FurnaceRendering) LinkedBeltRendering(com.demod.fbsr.entity.LinkedBeltRendering) BoilerRendering(com.demod.fbsr.entity.BoilerRendering) Map(java.util.Map) LinkedHashMultiset(com.google.common.collect.LinkedHashMultiset) ArtilleryWagonRendering(com.demod.fbsr.entity.ArtilleryWagonRendering) AssemblingMachineRendering(com.demod.fbsr.entity.AssemblingMachineRendering) LandMineRendering(com.demod.fbsr.entity.LandMineRendering) LogisticContainerRendering(com.demod.fbsr.entity.LogisticContainerRendering) BufferedImage(java.awt.image.BufferedImage) Font(java.awt.Font) WallRendering(com.demod.fbsr.entity.WallRendering) Set(java.util.Set) RailSignalRendering(com.demod.fbsr.entity.RailSignalRendering) TurretRendering(com.demod.fbsr.entity.TurretRendering) RoboportRendering(com.demod.fbsr.entity.RoboportRendering) Collectors(java.util.stream.Collectors) GeneratorRendering(com.demod.fbsr.entity.GeneratorRendering) LabRendering(com.demod.fbsr.entity.LabRendering) TransportBeltRendering(com.demod.fbsr.entity.TransportBeltRendering) List(java.util.List) FactorioData(com.demod.factorio.FactorioData) ArtilleryTurretRendering(com.demod.fbsr.entity.ArtilleryTurretRendering) ProgrammableSpeakerRendering(com.demod.fbsr.entity.ProgrammableSpeakerRendering) ElectricEnergyInterfaceRendering(com.demod.fbsr.entity.ElectricEnergyInterfaceRendering) StraightRailRendering(com.demod.fbsr.entity.StraightRailRendering) Entry(java.util.Map.Entry) Optional(java.util.Optional) EntityPrototype(com.demod.factorio.prototype.EntityPrototype) ContainerRendering(com.demod.fbsr.entity.ContainerRendering) PumpRendering(com.demod.fbsr.entity.PumpRendering) ElectricPoleRendering(com.demod.fbsr.entity.ElectricPoleRendering) Rectangle(java.awt.Rectangle) InfinityContainerRendering(com.demod.fbsr.entity.InfinityContainerRendering) ConstantCombinatorRendering(com.demod.fbsr.entity.ConstantCombinatorRendering) DeciderCombinatorRendering(com.demod.fbsr.entity.DeciderCombinatorRendering) GateRendering(com.demod.fbsr.entity.GateRendering) InserterRendering(com.demod.fbsr.entity.InserterRendering) BeaconRendering(com.demod.fbsr.entity.BeaconRendering) Multiset(com.google.common.collect.Multiset) RollingStockRendering(com.demod.fbsr.entity.RollingStockRendering) HashMap(java.util.HashMap) ArithmeticCombinatorRendering(com.demod.fbsr.entity.ArithmeticCombinatorRendering) RecipePrototype(com.demod.factorio.prototype.RecipePrototype) FluidTurretRendering(com.demod.fbsr.entity.FluidTurretRendering) HashSet(java.util.HashSet) LinkedHashMap(java.util.LinkedHashMap) LoaderRendering(com.demod.fbsr.entity.LoaderRendering) RailChainSignalRendering(com.demod.fbsr.entity.RailChainSignalRendering) ImmutableList(com.google.common.collect.ImmutableList) Graphics2D(java.awt.Graphics2D) LinkedContainerRendering(com.demod.fbsr.entity.LinkedContainerRendering) AccumulatorRendering(com.demod.fbsr.entity.AccumulatorRendering) OffshorePumpRendering(com.demod.fbsr.entity.OffshorePumpRendering) HeatPipeRendering(com.demod.fbsr.entity.HeatPipeRendering) PowerSwitchRendering(com.demod.fbsr.entity.PowerSwitchRendering) BurnerGeneratorRendering(com.demod.fbsr.entity.BurnerGeneratorRendering) SimpleEntry(java.util.AbstractMap.SimpleEntry) LinkedHashSet(java.util.LinkedHashSet) Layer(com.demod.fbsr.Renderer.Layer) StorageTankRendering(com.demod.fbsr.entity.StorageTankRendering) HeatInterfaceRendering(com.demod.fbsr.entity.HeatInterfaceRendering) LampRendering(com.demod.fbsr.entity.LampRendering) RadarRendering(com.demod.fbsr.entity.RadarRendering) PipeToGroundRendering(com.demod.fbsr.entity.PipeToGroundRendering) RocketSiloRendering(com.demod.fbsr.entity.RocketSiloRendering) MiningDrillRendering(com.demod.fbsr.entity.MiningDrillRendering) TrainStopRendering(com.demod.fbsr.entity.TrainStopRendering) PipeRendering(com.demod.fbsr.entity.PipeRendering) Consumer(java.util.function.Consumer) Utils(com.demod.factorio.Utils) UndergroundBeltRendering(com.demod.fbsr.entity.UndergroundBeltRendering) LuaValue(org.luaj.vm2.LuaValue) JSONArray(org.json.JSONArray) Rectangle(java.awt.Rectangle) Rectangle2D(java.awt.geom.Rectangle2D) LuaValue(org.luaj.vm2.LuaValue)

Example 3 with EntityPrototype

use of com.demod.factorio.prototype.EntityPrototype in project Factorio-FBSR by demodude4u.

the class AssemblingMachineRendering method populateWorldMap.

@Override
public void populateWorldMap(WorldMap map, DataTable dataTable, BlueprintEntity entity, EntityPrototype prototype) {
    String recipeName = entity.json().optString("recipe", null);
    boolean hasFluid = false;
    if (recipeName != null) {
        Optional<RecipePrototype> optRecipe = dataTable.getRecipe(recipeName);
        if (optRecipe.isPresent()) {
            RecipePrototype protoRecipe = optRecipe.get();
            List<LuaValue> items = new ArrayList<>();
            Utils.forEach(protoRecipe.lua().get("ingredients"), (Consumer<LuaValue>) items::add);
            LuaValue resultsLua = protoRecipe.lua().get("results");
            if (resultsLua != LuaValue.NIL) {
                items.add(resultsLua);
            }
            hasFluid = items.stream().anyMatch(lua -> {
                LuaValue typeLua = lua.get("type");
                return typeLua != LuaValue.NIL && typeLua.toString().equals("fluid");
            });
        }
    }
    LuaValue fluidBoxesLua = prototype.lua().get("fluid_boxes");
    boolean offWhenNoFluidRecipe = fluidBoxesLua.isnil() ? true : fluidBoxesLua.get("off_when_no_fluid_recipe").optboolean(false);
    if (!fluidBoxesLua.isnil() && (!offWhenNoFluidRecipe || hasFluid)) {
        Utils.forEach(fluidBoxesLua, fluidBoxLua -> {
            if (!fluidBoxLua.istable()) {
                return;
            }
            Utils.forEach(fluidBoxLua.get("pipe_connections"), pipeConnectionLua -> {
                Point2D.Double offset = Utils.parsePoint2D(pipeConnectionLua.get("position"));
                if (Math.abs(offset.y) > Math.abs(offset.x)) {
                    offset.y += -Math.signum(offset.y);
                } else {
                    offset.x += -Math.signum(offset.x);
                }
                Point2D.Double pos = entity.getDirection().left().offset(entity.getDirection().back().offset(entity.getPosition(), offset.y), offset.x);
                Direction direction = offset.y > 0 ? entity.getDirection().back() : entity.getDirection();
                map.setPipe(pos, direction);
            });
        });
    }
}
Also used : Color(java.awt.Color) Rectangle(java.awt.Rectangle) Point2D(java.awt.geom.Point2D) DataPrototype(com.demod.factorio.prototype.DataPrototype) Rectangle2D(java.awt.geom.Rectangle2D) RecipePrototype(com.demod.factorio.prototype.RecipePrototype) BlueprintEntity(com.demod.fbsr.BlueprintEntity) DataTable(com.demod.factorio.DataTable) ArrayList(java.util.ArrayList) RenderUtils(com.demod.fbsr.RenderUtils) Consumer(java.util.function.Consumer) Renderer(com.demod.fbsr.Renderer) Sprite(com.demod.fbsr.Sprite) WorldMap(com.demod.fbsr.WorldMap) EntityRendererFactory(com.demod.fbsr.EntityRendererFactory) List(java.util.List) Utils(com.demod.factorio.Utils) FactorioData(com.demod.factorio.FactorioData) Direction(com.demod.fbsr.Direction) Graphics2D(java.awt.Graphics2D) LuaValue(org.luaj.vm2.LuaValue) Optional(java.util.Optional) EntityPrototype(com.demod.factorio.prototype.EntityPrototype) Layer(com.demod.fbsr.Renderer.Layer) Point2D(java.awt.geom.Point2D) ArrayList(java.util.ArrayList) LuaValue(org.luaj.vm2.LuaValue) Direction(com.demod.fbsr.Direction) RecipePrototype(com.demod.factorio.prototype.RecipePrototype)

Example 4 with EntityPrototype

use of com.demod.factorio.prototype.EntityPrototype in project Factorio-FBSR by demodude4u.

the class FBSR method renderBlueprint.

public static BufferedImage renderBlueprint(Blueprint blueprint, CommandReporting reporting, JSONObject options) throws JSONException, IOException {
    System.out.println("Rendering " + blueprint.getLabel().orElse("(No Name)"));
    long startMillis = System.currentTimeMillis();
    DataTable table = FactorioData.getTable();
    WorldMap map = new WorldMap();
    List<EntityRenderingTuple> entityRenderingTuples = new ArrayList<EntityRenderingTuple>();
    List<TileRenderingTuple> tileRenderingTuples = new ArrayList<TileRenderingTuple>();
    for (BlueprintEntity entity : blueprint.getEntities()) {
        EntityRenderingTuple tuple = new EntityRenderingTuple();
        tuple.entity = entity;
        Optional<EntityPrototype> prototype = table.getEntity(entity.getName());
        if (!prototype.isPresent()) {
            tuple.prototype = null;
            tuple.factory = EntityRendererFactory.UNKNOWN;
            blueprint.setModsDetected();
        } else {
            tuple.prototype = prototype.get();
            tuple.factory = EntityRendererFactory.forType(tuple.prototype.getType());
            if (options.optBoolean("debug-typeMapping")) {
                reporting.addDebug(entity.getName() + " -> " + tuple.factory.getClass().getSimpleName());
            }
        }
        entityRenderingTuples.add(tuple);
    }
    for (BlueprintTile tile : blueprint.getTiles()) {
        TileRenderingTuple tuple = new TileRenderingTuple();
        tuple.tile = tile;
        Optional<TilePrototype> prototype = table.getTile(tile.getName());
        if (!prototype.isPresent()) {
            tuple.prototype = null;
            tuple.factory = TileRendererFactory.UNKNOWN;
            blueprint.setModsDetected();
        } else {
            tuple.prototype = prototype.get();
            tuple.factory = TileRendererFactory.forType(tuple.prototype.getType());
            if (options.optBoolean("debug-typeMapping")) {
                reporting.addDebug(tile.getName() + " -> " + tuple.factory.getClass().getSimpleName());
            }
        }
        tileRenderingTuples.add(tuple);
    }
    if (blueprint.getVersion().greaterOrEquals(new MapVersion(0, 18, 37, 3)))
        alignTileRenderingTuplesToGrid(tileRenderingTuples);
    else
        // legacy
        alignRenderingTuplesToGrid(entityRenderingTuples, tileRenderingTuples);
    entityRenderingTuples.forEach(t -> {
        try {
            t.factory.populateWorldMap(map, table, t.entity, t.prototype);
        } catch (Exception e) {
            reporting.addException(e);
        }
    });
    tileRenderingTuples.forEach(t -> {
        try {
            t.factory.populateWorldMap(map, table, t.tile, t.prototype);
        } catch (Exception e) {
            reporting.addException(e);
        }
    });
    entityRenderingTuples.forEach(t -> {
        try {
            t.factory.populateLogistics(map, table, t.entity, t.prototype);
        } catch (Exception e) {
            reporting.addException(e);
        }
    });
    populateReverseLogistics(map);
    populateTransitLogistics(map, options);
    populateRailBlocking(map);
    populateRailStationLogistics(map);
    List<Renderer> renderers = new ArrayList<>();
    entityRenderingTuples.forEach(t -> {
        try {
            t.factory.createRenderers(renderers::add, map, table, t.entity, t.prototype);
        } catch (Exception e) {
            reporting.addException(e);
        }
    });
    tileRenderingTuples.forEach(t -> {
        try {
            t.factory.createRenderers(renderers::add, map, table, t.tile, t.prototype);
        } catch (Exception e) {
            reporting.addException(e);
        }
    });
    entityRenderingTuples.forEach(t -> {
        try {
            t.factory.createModuleIcons(renderers::add, map, table, t.entity, t.prototype);
        } catch (Exception e) {
            reporting.addException(e);
        }
    });
    entityRenderingTuples.forEach(t -> {
        try {
            t.factory.createWireConnections(renderers::add, map, table, t.entity, t.prototype);
        } catch (Exception e) {
            reporting.addException(e);
        }
    });
    showLogisticGrid(renderers::add, table, map, options);
    showRailLogistics(renderers::add, table, map, options);
    ArrayListMultimap<Direction, PanelRenderer> borderPanels = ArrayListMultimap.create();
    if (options.optBoolean("show-info-panels", true)) {
        blueprint.getLabel().ifPresent(label -> {
            borderPanels.put(Direction.NORTH, createHeaderPanel(label));
        });
        borderPanels.put(Direction.SOUTH, createFooterPanel());
        Map<String, Double> totalItems = generateTotalItems(table, blueprint);
        borderPanels.put(Direction.EAST, createItemListPanel(table, "TOTAL", totalItems));
        borderPanels.put(Direction.EAST, createItemListPanel(table, "RAW", generateTotalRawItems(table, table.getRecipes(), totalItems)));
    }
    if (options.optBoolean("debug-placement")) {
        entityRenderingTuples.forEach(t -> {
            Point2D.Double pos = t.entity.getPosition();
            renderers.add(new Renderer(Layer.DEBUG_P, pos) {

                @Override
                public void render(Graphics2D g) {
                    g.setColor(Color.cyan);
                    g.fill(new Ellipse2D.Double(pos.x - 0.1, pos.y - 0.1, 0.2, 0.2));
                    Stroke ps = g.getStroke();
                    g.setStroke(new BasicStroke(3f / 32f));
                    g.setColor(Color.green);
                    g.draw(new Line2D.Double(pos, t.entity.getDirection().offset(pos, 0.3)));
                    g.setStroke(ps);
                }
            });
        });
        tileRenderingTuples.forEach(t -> {
            Point2D.Double pos = t.tile.getPosition();
            renderers.add(new Renderer(Layer.DEBUG_P, pos) {

                @Override
                public void render(Graphics2D g) {
                    g.setColor(Color.cyan);
                    g.fill(new Ellipse2D.Double(pos.x - 0.1, pos.y - 0.1, 0.2, 0.2));
                }
            });
        });
    }
    BufferedImage result = applyRendering(reporting, (int) Math.round(tileSize), renderers, borderPanels, options);
    long endMillis = System.currentTimeMillis();
    System.out.println("\tRender Time " + (endMillis - startMillis) + " ms");
    blueprint.setRenderTime(endMillis - startMillis);
    return result;
}
Also used : BasicStroke(java.awt.BasicStroke) DataTable(com.demod.factorio.DataTable) ArrayList(java.util.ArrayList) BufferedImage(java.awt.image.BufferedImage) Point2D(java.awt.geom.Point2D) EntityPrototype(com.demod.factorio.prototype.EntityPrototype) BasicStroke(java.awt.BasicStroke) Stroke(java.awt.Stroke) TilePrototype(com.demod.factorio.prototype.TilePrototype) JSONException(org.json.JSONException) IOException(java.io.IOException) Graphics2D(java.awt.Graphics2D)

Example 5 with EntityPrototype

use of com.demod.factorio.prototype.EntityPrototype in project Factorio-FBSR by demodude4u.

the class EntityRendererFactory method getWirePositionFor.

protected Point2D.Double getWirePositionFor(BlueprintEntity entity, EntityPrototype prototype, String colorName, int circuitId) {
    LuaValue connectionPointLua = wireConnectionCircuitId.entrySet().stream().filter(e -> e.getValue() == circuitId).map(e -> prototype.lua().get(e.getKey())).filter(l -> !l.isnil()).findAny().get();
    if (connectionPointLua.get("wire").isnil()) {
        connectionPointLua = connectionPointLua.get(entity.getDirection().cardinal() + 1);
    }
    Point2D.Double pos = entity.getPosition();
    Point2D.Double offset;
    offset = Utils.parsePoint2D(connectionPointLua.get("wire").get(colorName));
    return new Point2D.Double(pos.x + offset.x, pos.y + offset.y);
}
Also used : Color(java.awt.Color) SplitterRendering(com.demod.fbsr.entity.SplitterRendering) Point2D(java.awt.geom.Point2D) ReactorRendering(com.demod.fbsr.entity.ReactorRendering) SolarPanelRendering(com.demod.fbsr.entity.SolarPanelRendering) Rectangle2D(java.awt.geom.Rectangle2D) Random(java.util.Random) CurvedRailRendering(com.demod.fbsr.entity.CurvedRailRendering) DataTable(com.demod.factorio.DataTable) JSONObject(org.json.JSONObject) Ellipse2D(java.awt.geom.Ellipse2D) FurnaceRendering(com.demod.fbsr.entity.FurnaceRendering) LinkedBeltRendering(com.demod.fbsr.entity.LinkedBeltRendering) BoilerRendering(com.demod.fbsr.entity.BoilerRendering) Map(java.util.Map) LinkedHashMultiset(com.google.common.collect.LinkedHashMultiset) ArtilleryWagonRendering(com.demod.fbsr.entity.ArtilleryWagonRendering) AssemblingMachineRendering(com.demod.fbsr.entity.AssemblingMachineRendering) LandMineRendering(com.demod.fbsr.entity.LandMineRendering) LogisticContainerRendering(com.demod.fbsr.entity.LogisticContainerRendering) BufferedImage(java.awt.image.BufferedImage) Font(java.awt.Font) WallRendering(com.demod.fbsr.entity.WallRendering) Set(java.util.Set) RailSignalRendering(com.demod.fbsr.entity.RailSignalRendering) TurretRendering(com.demod.fbsr.entity.TurretRendering) RoboportRendering(com.demod.fbsr.entity.RoboportRendering) Collectors(java.util.stream.Collectors) GeneratorRendering(com.demod.fbsr.entity.GeneratorRendering) LabRendering(com.demod.fbsr.entity.LabRendering) TransportBeltRendering(com.demod.fbsr.entity.TransportBeltRendering) List(java.util.List) FactorioData(com.demod.factorio.FactorioData) ArtilleryTurretRendering(com.demod.fbsr.entity.ArtilleryTurretRendering) ProgrammableSpeakerRendering(com.demod.fbsr.entity.ProgrammableSpeakerRendering) ElectricEnergyInterfaceRendering(com.demod.fbsr.entity.ElectricEnergyInterfaceRendering) StraightRailRendering(com.demod.fbsr.entity.StraightRailRendering) Entry(java.util.Map.Entry) Optional(java.util.Optional) EntityPrototype(com.demod.factorio.prototype.EntityPrototype) ContainerRendering(com.demod.fbsr.entity.ContainerRendering) PumpRendering(com.demod.fbsr.entity.PumpRendering) ElectricPoleRendering(com.demod.fbsr.entity.ElectricPoleRendering) Rectangle(java.awt.Rectangle) InfinityContainerRendering(com.demod.fbsr.entity.InfinityContainerRendering) ConstantCombinatorRendering(com.demod.fbsr.entity.ConstantCombinatorRendering) DeciderCombinatorRendering(com.demod.fbsr.entity.DeciderCombinatorRendering) GateRendering(com.demod.fbsr.entity.GateRendering) InserterRendering(com.demod.fbsr.entity.InserterRendering) BeaconRendering(com.demod.fbsr.entity.BeaconRendering) Multiset(com.google.common.collect.Multiset) RollingStockRendering(com.demod.fbsr.entity.RollingStockRendering) HashMap(java.util.HashMap) ArithmeticCombinatorRendering(com.demod.fbsr.entity.ArithmeticCombinatorRendering) RecipePrototype(com.demod.factorio.prototype.RecipePrototype) FluidTurretRendering(com.demod.fbsr.entity.FluidTurretRendering) HashSet(java.util.HashSet) LinkedHashMap(java.util.LinkedHashMap) LoaderRendering(com.demod.fbsr.entity.LoaderRendering) RailChainSignalRendering(com.demod.fbsr.entity.RailChainSignalRendering) ImmutableList(com.google.common.collect.ImmutableList) Graphics2D(java.awt.Graphics2D) LinkedContainerRendering(com.demod.fbsr.entity.LinkedContainerRendering) AccumulatorRendering(com.demod.fbsr.entity.AccumulatorRendering) OffshorePumpRendering(com.demod.fbsr.entity.OffshorePumpRendering) HeatPipeRendering(com.demod.fbsr.entity.HeatPipeRendering) PowerSwitchRendering(com.demod.fbsr.entity.PowerSwitchRendering) BurnerGeneratorRendering(com.demod.fbsr.entity.BurnerGeneratorRendering) SimpleEntry(java.util.AbstractMap.SimpleEntry) LinkedHashSet(java.util.LinkedHashSet) Layer(com.demod.fbsr.Renderer.Layer) StorageTankRendering(com.demod.fbsr.entity.StorageTankRendering) HeatInterfaceRendering(com.demod.fbsr.entity.HeatInterfaceRendering) LampRendering(com.demod.fbsr.entity.LampRendering) RadarRendering(com.demod.fbsr.entity.RadarRendering) PipeToGroundRendering(com.demod.fbsr.entity.PipeToGroundRendering) RocketSiloRendering(com.demod.fbsr.entity.RocketSiloRendering) MiningDrillRendering(com.demod.fbsr.entity.MiningDrillRendering) TrainStopRendering(com.demod.fbsr.entity.TrainStopRendering) PipeRendering(com.demod.fbsr.entity.PipeRendering) Consumer(java.util.function.Consumer) Utils(com.demod.factorio.Utils) UndergroundBeltRendering(com.demod.fbsr.entity.UndergroundBeltRendering) LuaValue(org.luaj.vm2.LuaValue) JSONArray(org.json.JSONArray) Point2D(java.awt.geom.Point2D) LuaValue(org.luaj.vm2.LuaValue)

Aggregations

DataTable (com.demod.factorio.DataTable)5 EntityPrototype (com.demod.factorio.prototype.EntityPrototype)5 Graphics2D (java.awt.Graphics2D)5 Point2D (java.awt.geom.Point2D)5 FactorioData (com.demod.factorio.FactorioData)4 Utils (com.demod.factorio.Utils)4 Layer (com.demod.fbsr.Renderer.Layer)4 BufferedImage (java.awt.image.BufferedImage)4 RecipePrototype (com.demod.factorio.prototype.RecipePrototype)3 Color (java.awt.Color)3 Rectangle (java.awt.Rectangle)3 Rectangle2D (java.awt.geom.Rectangle2D)3 List (java.util.List)3 Optional (java.util.Optional)3 LuaValue (org.luaj.vm2.LuaValue)3 TilePrototype (com.demod.factorio.prototype.TilePrototype)2 AccumulatorRendering (com.demod.fbsr.entity.AccumulatorRendering)2 ArithmeticCombinatorRendering (com.demod.fbsr.entity.ArithmeticCombinatorRendering)2 ArtilleryTurretRendering (com.demod.fbsr.entity.ArtilleryTurretRendering)2 ArtilleryWagonRendering (com.demod.fbsr.entity.ArtilleryWagonRendering)2