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 net.minecraft.core.BlockPos.MutableBlockPosThe end position to iterate to.protected final net.minecraft.world.entity.player.PlayerThe player who initiated the area operation.protected net.minecraft.core.BlockPos.MutableBlockPosThe 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, List<net.minecraft.core.BlockPos> workPosList) protectedAreaOperation(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 net.minecraft.core.BlockPos.MutableBlockPos startPosThe start position to iterate from. -
endPos
protected net.minecraft.core.BlockPos.MutableBlockPos 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.
-
AreaOperation
protected AreaOperation(net.minecraft.network.chat.Component storageText, net.minecraft.world.entity.player.Player player, List<net.minecraft.core.BlockPos> workPosList)
-
-
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.
-