Package mindustry.entities.units
Class BuildPlan
java.lang.Object
mindustry.entities.units.BuildPlan
- All Implemented Interfaces:
Position
,QuadTree.QuadTreeObject
Class for storing build plans. Can be either a place or remove plan.
-
Field Summary
Modifier and TypeFieldDescriptionfloat
Visual scale.Block being placed.boolean
Whether this is a break plan.boolean
Whether construction has started for this plan.Config int.boolean
Whether construction has started for this plan.int
Original position, only used in schematics.int
Original position, only used in schematics.int
Original position, only used in schematics.int
Original position, only used in schematics.float
Last progress.int
Position and rotation of this plan.boolean
Whether construction has started for this plan.boolean
If true, this plan is in the world.int
Position and rotation of this plan.int
Position and rotation of this plan. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionmindustry.gen.Building
build()
copy()
float
drawx()
float
drawy()
float
getX()
float
getY()
void
Fills the out parameter with this element's rough bounding box.boolean
isRotation
(Team team) original
(int x, int y, int originalWidth, int originalHeight) boolean
void
pointConfig
(Cons<Point2> cons) Transforms the internal position of this config using the specified function.static Object
pointConfig
(Block block, Object config, Cons<Point2> cons) Transforms the internal position of this config using the specified function, and return the result.boolean
tile()
toString()
-
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. -
originalX
public int originalXOriginal position, only used in schematics. -
originalY
public int originalYOriginal position, only used in schematics. -
originalWidth
public int originalWidthOriginal position, only used in schematics. -
originalHeight
public int originalHeightOriginal position, only used in schematics. -
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
-
samePos
-
pointConfig
Transforms the internal position of this config using the specified function, and return the result. -
pointConfig
Transforms the internal position of this config using the specified function. -
copy
-
original
-
bounds
-
set
-
drawx
public float drawx() -
drawy
public float drawy() -
tile
-
build
-
hitbox
Description copied from interface:QuadTree.QuadTreeObject
Fills the out parameter with this element's rough bounding box. This should never be smaller than the actual object, but may be larger.- Specified by:
hitbox
in interfaceQuadTree.QuadTreeObject
-
getX
public float getX() -
getY
public float getY() -
toString
-