Package mindustry.entities.units
Class BuildPlan
java.lang.Object
mindustry.entities.units.BuildPlan
- All Implemented Interfaces:
arc.math.geom.Position,arc.math.geom.QuadTree.QuadTreeObject
public class BuildPlan
extends Object
implements arc.math.geom.Position, arc.math.geom.QuadTree.QuadTreeObject
Class for storing build plans. Can be either a place or remove plan.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfloatVisual scale.Block being placed.booleanWhether this is a break plan.booleanWhether construction has started for this plan.Config int.booleanWhether construction has started for this plan.floatLast progress.intPosition and rotation of this plan.booleanWhether construction has started for this plan.booleanIf true, this plan is in the world.intPosition and rotation of this plan.intPosition and rotation of this plan. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionarc.math.geom.Rectbounds(arc.math.geom.Rect rect) mindustry.gen.Buildingbuild()copy()floatdrawx()floatdrawy()floatgetX()floatgetY()voidhitbox(arc.math.geom.Rect out) booleanbooleanisDone()booleanisRotation(Team team) booleanvoidpointConfig(arc.func.Cons<arc.math.geom.Point2> cons) Transforms the internal position of this config using the specified function.static ObjectpointConfig(Block block, Object config, arc.func.Cons<arc.math.geom.Point2> cons) Transforms the internal position of this config using the specified function, and return the result.booleantile()toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface arc.math.geom.Position
angleTo, angleTo, dst, dst, dst2, dst2, within, within
-
Field Details
-
x
public int xPosition and rotation of this plan. -
y
public int yPosition and rotation of this plan. -
rotation
public int rotationPosition and rotation of this plan. -
block
Block being placed. If null, this is a breaking plan. -
breaking
public boolean breakingWhether this is a break plan. -
config
Config int. Not used unless hasConfig is true. -
progress
public float progressLast progress. -
initialized
public boolean initializedWhether construction has started for this plan. -
stuck
public boolean stuckWhether construction has started for this plan. -
cachedValid
public boolean cachedValidWhether construction has started for this plan. -
worldContext
public boolean worldContextIf true, this plan is in the world. If false, it is being rendered in a schematic. -
animScale
public float animScaleVisual scale. Used only for rendering.
-
-
Constructor Details
-
BuildPlan
This creates a build plan. -
BuildPlan
This creates a build plan with a config. -
BuildPlan
public BuildPlan(int x, int y) This creates a remove plan. -
BuildPlan
public BuildPlan()
-
-
Method Details
-
placeable
-
isRotation
-
isDerelictRepair
public boolean isDerelictRepair() -
samePos
-
pointConfig
public static Object pointConfig(Block block, Object config, arc.func.Cons<arc.math.geom.Point2> cons) Transforms the internal position of this config using the specified function, and return the result. -
pointConfig
public void pointConfig(arc.func.Cons<arc.math.geom.Point2> cons) Transforms the internal position of this config using the specified function. -
copy
-
bounds
public arc.math.geom.Rect bounds(arc.math.geom.Rect rect) -
set
-
drawx
public float drawx() -
drawy
public float drawy() -
isDone
public boolean isDone() -
tile
-
build
@Nullable public mindustry.gen.Building build() -
hitbox
public void hitbox(arc.math.geom.Rect out) - Specified by:
hitboxin interfacearc.math.geom.QuadTree.QuadTreeObject
-
getX
public float getX()- Specified by:
getXin interfacearc.math.geom.Position
-
getY
public float getY()- Specified by:
getYin interfacearc.math.geom.Position
-
toString
-