Class ReplaceBlockOperation

All Implemented Interfaces:
ITickedWorldOperation

public class ReplaceBlockOperation extends AreaOperation
Operation for removing a single type of block.
  • Field Summary

    Fields inherited from class com.ldtteam.structurize.operations.AreaOperation

    endPos, player, startPos

    Fields inherited from class com.ldtteam.structurize.operations.BaseOperation

    storage
  • Constructor Summary

    Constructors
    Constructor
    Description
    ReplaceBlockOperation(net.minecraft.world.entity.player.Player player, net.minecraft.core.BlockPos startPos, net.minecraft.core.BlockPos endPos, net.minecraft.world.item.ItemStack fromBlock, net.minecraft.world.item.ItemStack toBlock, int percentage)
    Default constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    apply(net.minecraft.server.level.ServerLevel world, net.minecraft.core.BlockPos position)
    Apply the operation on the world.

    Methods inherited from class com.ldtteam.structurize.operations.AreaOperation

    apply

    Methods inherited from class com.ldtteam.structurize.operations.BaseOperation

    getChangeStorage

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ReplaceBlockOperation

      public ReplaceBlockOperation(net.minecraft.world.entity.player.Player player, net.minecraft.core.BlockPos startPos, net.minecraft.core.BlockPos endPos, net.minecraft.world.item.ItemStack fromBlock, net.minecraft.world.item.ItemStack toBlock, int percentage)
      Default constructor.
      Parameters:
      player - the player who initiated the area operation.
      startPos - the start pos to iterate from.
      endPos - the end pos to iterate to.
      fromBlock - the block to replace from.
      toBlock - the block to replace to.
      percentage - the replacement percentage.
  • Method Details

    • apply

      protected void apply(net.minecraft.server.level.ServerLevel world, net.minecraft.core.BlockPos position)
      Description copied from class: AreaOperation
      Apply the operation on the world.
      Specified by:
      apply in class AreaOperation
      Parameters:
      world - the world to apply them on.
      position - the current area position.