Class ConstructionPlaceBatch

java.lang.Object
net.risingworld.api.world.batch.ConstructionPlaceBatch

public class ConstructionPlaceBatch extends Object
A batch to perform multiple construction place actions simultaneously. This is useful if you want to place several construction elements, because that is a lot more performant than placing them all individually (using the regular World.createConstructionElement(int, int, float, int, net.risingworld.api.utils.Vector3f, net.risingworld.api.utils.Quaternion, net.risingworld.api.utils.Vector3f) methods).
  • Constructor Details

    • ConstructionPlaceBatch

      public ConstructionPlaceBatch()
    • ConstructionPlaceBatch

      public ConstructionPlaceBatch(int initialCapacity)
  • Method Details

    • add

      public void add(int shape, int texture, float textureScale, int color, Vector3f worldPosition, Quaternion rotation, Vector3f scale, Vector3f surfaceOffset, Vector3f surfaceScale)
    • count

      public int count()
      Gets the current number of entries in this batch.
      Returns:
      the number of entries.
    • clear

      public void clear()
      Clears the batch.