Package mindustry.world
Class Build
java.lang.Object
mindustry.world.Build
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidbeginBreak(mindustry.gen.Unit unit, Team team, int x, int y) static voidbeginPlace(mindustry.gen.Unit unit, Block result, Team team, int x, int y, int rotation, Object placeConfig) Places a ConstructBlock at this location.static booleancheckNoUnitOverlap(Block type, int x, int y) static booleancontactsGround(int x, int y, Block block) static booleancontactsShallows(int x, int y, Block block) static mindustry.gen.BuildinggetEnemyOverlap(Block block, Team team, int x, int y) static booleanvalidBreak(Team team, int x, int y) static booleanvalidPlace(Block type, Team team, int x, int y, int rotation) static booleanvalidPlace(Block type, Team team, int x, int y, int rotation, boolean checkVisible) static booleanvalidPlace(Block type, Team team, int x, int y, int rotation, boolean checkVisible, boolean checkCoreRadius) static booleanvalidPlaceIgnoreUnits(Block type, Team team, int x, int y, int rotation, boolean checkVisible, boolean checkCoreRadius)
-
Constructor Details
-
Build
public Build()
-
-
Method Details
-
beginBreak
-
beginPlace
public static void beginPlace(@Nullable mindustry.gen.Unit unit, Block result, Team team, int x, int y, int rotation, @Nullable Object placeConfig) Places a ConstructBlock at this location. To preserve bandwidth, a config is only passed in the case of instant-place blocks. -
validPlace
- Returns:
- whether a tile can be placed at this location by this team.
-
validPlace
public static boolean validPlace(Block type, Team team, int x, int y, int rotation, boolean checkVisible) - Returns:
- whether a tile can be placed at this location by this team.
-
validPlace
public static boolean validPlace(Block type, Team team, int x, int y, int rotation, boolean checkVisible, boolean checkCoreRadius) - Returns:
- whether a tile can be placed at this location by this team.
-
checkNoUnitOverlap
- Returns:
- whether a tile can be placed at this location by this team.
-
validPlaceIgnoreUnits
public static boolean validPlaceIgnoreUnits(Block type, Team team, int x, int y, int rotation, boolean checkVisible, boolean checkCoreRadius) - Returns:
- whether a tile can be placed at this location by this team. Ignores units at this location.
-
getEnemyOverlap
-
contactsGround
-
contactsShallows
-
validBreak
- Returns:
- whether the tile at this position is breakable by this team
-