Class ToolOperation
java.lang.Object
com.hypixel.hytale.builtin.buildertools.tooloperations.ToolOperation
- All Implemented Interfaces:
TriIntObjPredicate<Void>
- Direct Known Subclasses:
FloodOperation,LaserPointerOperation,LayersOperation,NoiseOperation,PaintOperation,ScatterOperation,SculptOperation,SmootherOperation,SmoothOperation,TintOperation
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final BuilderTool.ArgDataprotected final BuilderToolsPlugin.BuilderStateprotected final booleanstatic final intprotected final EditOperationprotected final InteractionTypeprivate final BlockMaskstatic final doublestatic final Map<String, OperationFactory> protected final intprotected final intprotected final intprotected final BlockPatternprotected final Playerprotected final Ref<EntityStore> static final Map<UUID, PrototypePlayerBuilderToolSettings> protected final Randomprotected static final intprotected final BrushShapeprotected final intprotected final intprotected final intprivate final Transformprivate final Vector3iprotected final intprotected final intprotected final int -
Constructor Summary
ConstructorsConstructorDescriptionToolOperation(Ref<EntityStore> ref, BuilderToolOnUseInteraction packet, ComponentAccessor<EntityStore> componentAccessor) -
Method Summary
Modifier and TypeMethodDescriptioncalculateInterpolatedPositions(Vector3i lastPosition, Vector3i currentPosition, int brushWidth, int brushHeight, int brushSpacing) static BlockMaskcombineMasks(BrushData.Values brush, BlockMask globalMask) voidexecute(ComponentAccessor<EntityStore> componentAccessor) (package private) abstract booleanexecute0(int var1, int var2, int var3) voidexecuteAsBrushConfig(PrototypePlayerBuilderToolSettings prototypePlayerBuilderToolSettings, BuilderToolOnUseInteraction packet, ComponentAccessor<EntityStore> componentAccessor) voidexecuteAt(int posX, int posY, int posZ, ComponentAccessor<EntityStore> componentAccessor) static voidexecuteShapeOperation(int x, int y, int z, TriIntObjPredicate<Void> operation, BrushShape shape, int shapeRange, int shapeHeight, int shapeThickness, boolean capped) static ToolOperationfromPacket(Ref<EntityStore> ref, Player player, BuilderToolOnUseInteraction packet, ComponentAccessor<EntityStore> componentAccessor) intintintintprivate static TransformgetMirror(Ref<EntityStore> ref, BrushData.Values brushData, Vector3i vector, ComponentAccessor<EntityStore> componentAccessor) private static Vector3igetOffsets(int width, int height, boolean originRotation, BrushOrigin origin, Transform transform, Vector3i vector, boolean applyBottomOriginFix) getOrCreatePrototypeSettings(UUID playerUuid) private BlockPatterngetPattern(BuilderToolOnUseInteraction packet, BrushData.Values brush) private static TransformgetRotation(Ref<EntityStore> ref, BrushData.Values brushData, Vector3i vector, ComponentAccessor<EntityStore> componentAccessor) getTargetBlockAvoidingPaint(Ref<EntityStore> ref, double maxDistance, ComponentAccessor<EntityStore> componentAccessor, float raycastOriginX, float raycastOriginY, float raycastOriginZ, float raycastDirectionX, float raycastDirectionY, float raycastDirectionZ) private static TransformgetTransform(Ref<EntityStore> ref, BrushData.Values brushData, Vector3i vector, ComponentAccessor<EntityStore> componentAccessor) final boolean
-
Field Details
-
RANDOM_MAX
protected static final int RANDOM_MAX- See Also:
-
OPERATIONS
-
PROTOTYPE_TOOL_SETTINGS
-
MAX_DISTANCE
public static final double MAX_DISTANCE- See Also:
-
DEFAULT_BRUSH_SPACING
public static final int DEFAULT_BRUSH_SPACING- See Also:
-
x
protected final int x -
y
protected final int y -
z
protected final int z -
interactionType
-
shapeRange
protected final int shapeRange -
shapeHeight
protected final int shapeHeight -
shapeThickness
protected final int shapeThickness -
capped
protected final boolean capped -
originOffsetX
protected final int originOffsetX -
originOffsetY
protected final int originOffsetY -
originOffsetZ
protected final int originOffsetZ -
shape
-
pattern
-
edit
-
args
-
random
-
player
-
playerRef
-
builderState
-
transform
-
vector
-
mask
-
-
Constructor Details
-
ToolOperation
public ToolOperation(@Nonnull Ref<EntityStore> ref, @Nonnull BuilderToolOnUseInteraction packet, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
-
-
Method Details
-
getOrCreatePrototypeSettings
@Nonnull public static PrototypePlayerBuilderToolSettings getOrCreatePrototypeSettings(UUID playerUuid) -
calculateInterpolatedPositions
-
getPosition
-
getBrushWidth
public int getBrushWidth() -
getBrushHeight
public int getBrushHeight() -
getBrushSpacing
public int getBrushSpacing() -
getBrushDensity
public int getBrushDensity() -
executeAsBrushConfig
public void executeAsBrushConfig(@Nonnull PrototypePlayerBuilderToolSettings prototypePlayerBuilderToolSettings, @Nonnull BuilderToolOnUseInteraction packet, ComponentAccessor<EntityStore> componentAccessor) -
getPattern
private BlockPattern getPattern(@Nonnull BuilderToolOnUseInteraction packet, @Nonnull BrushData.Values brush) -
getTargetBlockAvoidingPaint
@Nullable public Vector3i getTargetBlockAvoidingPaint(@Nonnull Ref<EntityStore> ref, double maxDistance, @Nonnull ComponentAccessor<EntityStore> componentAccessor, float raycastOriginX, float raycastOriginY, float raycastOriginZ, float raycastDirectionX, float raycastDirectionY, float raycastDirectionZ) -
getEditOperation
-
test
- Specified by:
testin interfaceTriIntObjPredicate<Void>
-
execute0
abstract boolean execute0(int var1, int var2, int var3) -
execute
-
executeAt
public void executeAt(int posX, int posY, int posZ, ComponentAccessor<EntityStore> componentAccessor) -
executeShapeOperation
public static void executeShapeOperation(int x, int y, int z, @Nonnull TriIntObjPredicate<Void> operation, @Nonnull BrushShape shape, int shapeRange, int shapeHeight, int shapeThickness, boolean capped) -
getOffsets
@Nonnull private static Vector3i getOffsets(int width, int height, boolean originRotation, BrushOrigin origin, @Nonnull Transform transform, @Nonnull Vector3i vector, boolean applyBottomOriginFix) -
getTransform
private static Transform getTransform(@Nonnull Ref<EntityStore> ref, @Nonnull BrushData.Values brushData, @Nonnull Vector3i vector, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
getRotation
private static Transform getRotation(@Nonnull Ref<EntityStore> ref, @Nonnull BrushData.Values brushData, @Nonnull Vector3i vector, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
getMirror
private static Transform getMirror(@Nonnull Ref<EntityStore> ref, @Nonnull BrushData.Values brushData, @Nonnull Vector3i vector, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
fromPacket
@Nonnull public static ToolOperation fromPacket(@Nonnull Ref<EntityStore> ref, @Nonnull Player player, @Nonnull BuilderToolOnUseInteraction packet, @Nonnull ComponentAccessor<EntityStore> componentAccessor) throws Exception - Throws:
Exception
-
combineMasks
@Nullable public static BlockMask combineMasks(@Nullable BrushData.Values brush, @Nullable BlockMask globalMask)
-