Class AreaOperation
java.lang.Object
com.ldtteam.structurize.operations.BaseOperation
com.ldtteam.structurize.operations.AreaOperation
- All Implemented Interfaces:
ITickedWorldOperation
- Direct Known Subclasses:
RemoveBlockOperation,RemoveFilteredOperation,ReplaceBlockOperation
Operations running on entire areas, require a start and end position and will iterate over the entire area.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final net.minecraft.core.BlockPosThe end position to iterate to.protected final net.minecraft.world.entity.player.PlayerThe player who initiated the area operation.protected final net.minecraft.core.BlockPosThe start position to iterate from.Fields inherited from class com.ldtteam.structurize.operations.BaseOperation
storage -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAreaOperation(net.minecraft.network.chat.Component storageText, net.minecraft.world.entity.player.Player player, net.minecraft.core.BlockPos startPos, net.minecraft.core.BlockPos endPos) Default constructor. -
Method Summary
Methods inherited from class com.ldtteam.structurize.operations.BaseOperation
getChangeStorage
-
Field Details
-
player
protected final net.minecraft.world.entity.player.Player playerThe player who initiated the area operation. -
startPos
protected final net.minecraft.core.BlockPos startPosThe start position to iterate from. -
endPos
protected final net.minecraft.core.BlockPos endPosThe end position to iterate to.
-
-
Constructor Details
-
AreaOperation
protected AreaOperation(net.minecraft.network.chat.Component storageText, net.minecraft.world.entity.player.Player player, net.minecraft.core.BlockPos startPos, net.minecraft.core.BlockPos endPos) Default constructor.- Parameters:
storageText- the text for the change storage.player- the player who initiated the area operation.startPos- the start pos to iterate from.endPos- the end pos to iterate to.
-
-
Method Details
-
apply
public final boolean apply(net.minecraft.server.level.ServerLevel world) Description copied from interface:ITickedWorldOperationApply the operation on the world.- Parameters:
world- the world to apply them on.- Returns:
- true if finished.
-
apply
protected abstract void apply(net.minecraft.server.level.ServerLevel world, net.minecraft.core.BlockPos position) Apply the operation on the world.- Parameters:
world- the world to apply them on.position- the current area position.
-