Package mindustry.world.blocks
Interface Autotiler
- All Known Implementing Classes:
ArmoredConduit
,ArmoredConveyor
,Conduit
,Conveyor
,Duct
,StackConveyor
public interface Autotiler
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
Holds some static temporary variables, required due to some RoboVM bugsstatic enum
The mode to slice a texture at. -
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
boolean
default boolean
default boolean
blendsArmored
(Tile tile, int rotation, int otherx, int othery, int otherrot, Block otherblock) default TextureRegion
botHalf
(TextureRegion input) default int[]
buildBlending
(Tile tile, int rotation, BuildPlan[] directional, boolean world) default boolean
facing
(int x, int y, int rotation, int x2, int y2) Check if a position is facing the secondary position at a rotationdefault int[]
default boolean
Check if a position is facing the secondary position at a rotationdefault boolean
lookingAtEither
(Tile tile, int rotation, int otherx, int othery, int otherrot, Block otherblock) default boolean
notLookingAt
(Tile tile, int rotation, int otherx, int othery, int otherrot, Block otherblock) default TextureRegion
sliced
(TextureRegion input, Autotiler.SliceMode mode) default TextureRegion
topHalf
(TextureRegion input) default void
transformCase
(int num, int[] bits) Transforms the autotiler setting the connection and the y-scale
-
Method Details
-
sliced
- Parameters:
input
- The TextureRegion to be slicedmode
- The SliceMode to be applied- Returns:
- The sliced texture
-
topHalf
- Returns:
- The top half of the input
-
botHalf
- Returns:
- The bottom half of the input
-
getTiling
-
buildBlending
- Returns:
- an array of blending values: [0]: the type of connection: - 0: straight - 1: curve (top) - 2: straight (bottom) - 3: all sides - 4: straight (top) [1]: X scale [2]: Y scale [3]: a 4-bit mask with bits 0-3 indicating blend state in that direction (0 being 0 degrees, 1 being 90, etc) [4]: same as [3] but only blends with non-square sprites
-
transformCase
default void transformCase(int num, int[] bits) Transforms the autotiler setting the connection and the y-scale- Parameters:
num
- The number to use to transform the arraybits
- The blending value array
-
facing
default boolean facing(int x, int y, int rotation, int x2, int y2) Check if a position is facing the secondary position at a rotation- Parameters:
x
- The x coordinate of position 1y
- The y coordinate of position 1rotation
- The rotation of the tile on (x, y)x2
- The x coordinate of position 2y2
- The y coordinate of position 2- Returns:
- If position 1 is facing position 2 at a certain angle
-
blends
-
blends
-
blendsArmored
-
notLookingAt
default boolean notLookingAt(Tile tile, int rotation, int otherx, int othery, int otherrot, Block otherblock) - Returns:
- whether this other block is *not* looking at this one.
-
lookingAtEither
default boolean lookingAtEither(Tile tile, int rotation, int otherx, int othery, int otherrot, Block otherblock) - Returns:
- whether this tile is looking at the other tile, or the other tile is looking at this one. If the other tile does not rotate, it is always considered to be facing this one.
-
lookingAt
Check if a position is facing the secondary position at a rotation- Parameters:
tile
- The origin tile that is or is not facing the `otherblock`rotation
- The rotation of the tile on (x, y)otherx
- The x coordinate of position 2othery
- The y coordinate of position 2- Returns:
- whether this tile is looking at the other tile.
-
blends
-