public class ExtendingCuboidRegionSelector extends CuboidRegionSelector
CuboidRegion
from a user's selections by expanding
the region on every right click.position1, position2, region
Constructor and Description |
---|
ExtendingCuboidRegionSelector()
Create a new selector with a
null world. |
ExtendingCuboidRegionSelector(RegionSelector oldSelector)
Create a new selector from another one.
|
ExtendingCuboidRegionSelector(World world)
Create a new selector.
|
ExtendingCuboidRegionSelector(World world,
BlockVector3 position1,
BlockVector3 position2)
Create a new selector.
|
Modifier and Type | Method and Description |
---|---|
void |
explainPrimarySelection(Actor player,
LocalSession session,
BlockVector3 pos)
Tell the player information about his/her primary selection.
|
void |
explainSecondarySelection(Actor player,
LocalSession session,
BlockVector3 pos)
Tell the player information about his/her secondary selection.
|
boolean |
selectPrimary(BlockVector3 position,
SelectorLimits limits)
Called when the first point is selected.
|
boolean |
selectSecondary(BlockVector3 position,
SelectorLimits limits)
Called when the second point is selected.
|
clear, describeCUI, describeLegacyCUI, explainRegionAdjust, getIncompleteRegion, getLegacyTypeID, getPrimaryPosition, getProtocolVersion, getRegion, getSelectionInfoLines, getTypeID, getTypeName, getVolume, getWorld, isDefined, learnChanges, setWorld
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getArea, getInformationLines
public ExtendingCuboidRegionSelector()
null
world.public ExtendingCuboidRegionSelector(@Nullable World world)
world
- the world, which may be null
public ExtendingCuboidRegionSelector(RegionSelector oldSelector)
oldSelector
- the other selectorpublic ExtendingCuboidRegionSelector(@Nullable World world, BlockVector3 position1, BlockVector3 position2)
world
- the worldposition1
- the first positionposition2
- the second positionpublic boolean selectPrimary(BlockVector3 position, SelectorLimits limits)
RegionSelector
selectPrimary
in interface RegionSelector
selectPrimary
in class CuboidRegionSelector
position
- the positionpublic boolean selectSecondary(BlockVector3 position, SelectorLimits limits)
RegionSelector
selectSecondary
in interface RegionSelector
selectSecondary
in class CuboidRegionSelector
position
- the positionpublic void explainPrimarySelection(Actor player, LocalSession session, BlockVector3 pos)
RegionSelector
explainPrimarySelection
in interface RegionSelector
explainPrimarySelection
in class CuboidRegionSelector
player
- the actorsession
- the sessionpos
- positionpublic void explainSecondarySelection(Actor player, LocalSession session, BlockVector3 pos)
RegionSelector
explainSecondarySelection
in interface RegionSelector
explainSecondarySelection
in class CuboidRegionSelector
player
- the actorsession
- the sessionpos
- position