Class ReplaceBlockOperation
java.lang.Object
com.ldtteam.structurize.operations.BaseOperation
com.ldtteam.structurize.operations.AreaOperation
com.ldtteam.structurize.operations.ReplaceBlockOperation
- All Implemented Interfaces:
ITickedWorldOperation
Operation for removing a single type of block.
-
Field Summary
Fields inherited from class com.ldtteam.structurize.operations.AreaOperation
endPos, player, startPosFields inherited from class com.ldtteam.structurize.operations.BaseOperation
storage -
Constructor Summary
ConstructorsConstructorDescriptionReplaceBlockOperation(net.minecraft.world.entity.player.Player player, ItemPositionsStorage toReplace, net.minecraft.world.item.ItemStack toBlock, int percentage) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidapply(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
applyMethods inherited from class com.ldtteam.structurize.operations.BaseOperation
getChangeStorage
-
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:AreaOperationApply the operation on the world.- Specified by:
applyin classAreaOperation- Parameters:
world- the world to apply them on.position- the current area position.
-