Class Cheese
java.lang.Object
com.technicjelle.BMUtils.Cheese
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Collection<Cheese> createPlatterFromCells(Vector2d cellSize, Vector2i... cells) Creates BlueMapShapes with potentially some holes, from a collection of custom-sized cells.
Designed to be looped over and fed into a BlueMapShapeMarkerorExtrudeMarkerstatic Collection<Cheese> createPlatterFromChunks(Vector2i... chunks) Creates BlueMapShapes with potentially some holes, from a collection of chunks.
Designed to be looped over and fed into a BlueMapShapeMarkerorExtrudeMarkerstatic CheesecreateSingleFromCells(Vector2d cellSize, Vector2i... cells) Creates a single BlueMapShapewith potentially some holes, from a collection of custom-sized cells.
Designed to be fed directly into a BlueMapShapeMarkerorExtrudeMarker.static CheesecreateSingleFromChunks(Vector2i... chunks) Creates a single BlueMapShapewith potentially some holes, from a collection of chunks.
Designed to be fed directly into a BlueMapShapeMarkerorExtrudeMarker.getHoles()getShape()
-
Constructor Details
-
Cheese
Creates a new Cheese with no holes.- Parameters:
shape- The outer shape of the cheese.
-
Cheese
-
Cheese
Creates a new Cheese with holes.- Parameters:
shape- The outer shape of the cheese.holes- Any holes in the cheese.
-
-
Method Details
-
getShape
- Returns:
- The outer shape of the cheese.
-
getHoles
- Returns:
- Any holes in the cheese.
-
createPlatterFromChunks
Creates BlueMapShapes with potentially some holes, from a collection of chunks.
Designed to be looped over and fed into a BlueMapShapeMarkerorExtrudeMarker- Parameters:
chunks- The chunks to create the cheese from.- Returns:
- A collection of
Cheeseobjects, each representing a single connected area.
-
createSingleFromChunks
Creates a single BlueMapShapewith potentially some holes, from a collection of chunks.
Designed to be fed directly into a BlueMapShapeMarkerorExtrudeMarker.
WARNING:
This method assumes that all chunks are connected!
If you're not absolutely 100% sure that your chunks will always be connected, usecreatePlatterFromChunks(Vector2i...)instead.
If multiple disconnected areas are found, only the first one will be returned.- Parameters:
chunks- The chunks to create the cheese from.- Returns:
- A single
Cheeseobject representing a single connected area.
-
createPlatterFromCells
Creates BlueMapShapes with potentially some holes, from a collection of custom-sized cells.
Designed to be looped over and fed into a BlueMapShapeMarkerorExtrudeMarker- Parameters:
cellSize- The size of a single cell.cells- The cells to create the cheese from.- Returns:
- A collection of
Cheeseobjects, each representing a single connected area.
-
createSingleFromCells
Creates a single BlueMapShapewith potentially some holes, from a collection of custom-sized cells.
Designed to be fed directly into a BlueMapShapeMarkerorExtrudeMarker.
WARNING:
This method assumes that all cells are connected!
If you're not absolutely 100% sure that your cells will always be connected, usecreatePlatterFromCells(Vector2d, Vector2i...)instead.
If multiple disconnected areas are found, only the first one will be returned.- Parameters:
cellSize- The size of a single cell.cells- The cells to create the cheese from.- Returns:
- A single
Cheeseobject representing a single connected area.
-