Class GenericRegion
java.lang.Object
dev.strwbry.eventhorizon.events.utility.fawe.region.GenericRegion
- Direct Known Subclasses:
GenericCuboidRegion
,GenericCylindricalRegion
An abstract base class for defining regions in WorldEdit operations.
This class provides common functionality for creating and managing different types of regions.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Collection
<com.sk89q.worldedit.world.block.BlockType> Collection of block types that can be replaced in this regionprotected int
The height of the regionprotected int
The vertical offset from the center pointprotected int
The radius of the regionprotected String
The block type ID to use for replacements -
Constructor Summary
ConstructorsConstructorDescriptionGenericRegion
(int radius, int height, int heightOffset) Constructs a new region with specified dimensions. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract com.sk89q.worldedit.regions.AbstractRegion
createRegion
(com.sk89q.worldedit.world.World world, com.sk89q.worldedit.math.BlockVector3 center) Creates a specific region implementation around a center point.com.sk89q.worldedit.regions.AbstractRegion
getRegion
(org.bukkit.entity.Player player) Creates a region centered on a player's location.
-
Field Details
-
radius
protected int radiusThe radius of the region -
height
protected int heightThe height of the region -
heightOffset
protected int heightOffsetThe vertical offset from the center point -
replacementBlockId
The block type ID to use for replacements -
blockTypesToReplace
Collection of block types that can be replaced in this region
-
-
Constructor Details
-
GenericRegion
public GenericRegion(int radius, int height, int heightOffset) Constructs a new region with specified dimensions.- Parameters:
radius
- The radius of the regionheight
- The height of the regionheightOffset
- The vertical offset from the center point
-
-
Method Details
-
createRegion
protected abstract com.sk89q.worldedit.regions.AbstractRegion createRegion(com.sk89q.worldedit.world.World world, com.sk89q.worldedit.math.BlockVector3 center) Creates a specific region implementation around a center point.- Parameters:
world
- The world in which to create the regioncenter
- The center point of the region- Returns:
- An AbstractRegion representing the specific region implementation
-
getRegion
public com.sk89q.worldedit.regions.AbstractRegion getRegion(org.bukkit.entity.Player player) Creates a region centered on a player's location.- Parameters:
player
- The player whose location will be used as the center of the region- Returns:
- An AbstractRegion centered on the player's location
-