Class ReplaceBlockOperation

All Implemented Interfaces:
ITickedWorldOperation

public class ReplaceBlockOperation extends AreaOperation
Operation for removing a single type of block.
  • Constructor Details

    • ReplaceBlockOperation

      public ReplaceBlockOperation(net.minecraft.world.entity.player.Player player, ItemPositionsStorage toReplace, net.minecraft.world.item.ItemStack toBlock, int percentage)
      Default constructor.
      Parameters:
      player - the player who initiated the area operation.
      toReplace -
      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.