2019-09-12 09:46:52 -04:00
|
|
|
CLASS net/minecraft/class_3341 net/minecraft/util/math/BlockBox
|
2021-03-11 18:32:53 -05:00
|
|
|
COMMENT A mutable box with integer coordinates. The box is axis-aligned and the
|
|
|
|
COMMENT coordinates are inclusive.
|
|
|
|
COMMENT
|
|
|
|
COMMENT <p>This box, though mutable, has proper {@code hashCode} and {@code
|
|
|
|
COMMENT equals} implementations and can be used as map keys if user can ensure
|
|
|
|
COMMENT they are not modified.
|
|
|
|
COMMENT
|
|
|
|
COMMENT @see Box
|
2021-04-01 14:58:05 -04:00
|
|
|
FIELD field_14376 maxY I
|
|
|
|
FIELD field_14377 maxX I
|
|
|
|
FIELD field_14378 minZ I
|
|
|
|
FIELD field_14379 minY I
|
|
|
|
FIELD field_14380 minX I
|
|
|
|
FIELD field_14381 maxZ I
|
2021-03-11 18:32:53 -05:00
|
|
|
FIELD field_29325 CODEC Lcom/mojang/serialization/Codec;
|
|
|
|
COMMENT A codec that stores a block box as an int array. In the serialized array,
|
|
|
|
COMMENT the ordered elements are {@link #minX}, {@link #minY}, {@link #minZ},
|
|
|
|
COMMENT {@link #maxX}, {@link #maxY}, {@link #maxZ}.
|
2022-01-19 12:26:32 -05:00
|
|
|
FIELD field_31548 LOGGER Lorg/slf4j/Logger;
|
2018-12-12 12:22:18 -05:00
|
|
|
METHOD <init> (IIIIII)V
|
2018-12-12 10:08:04 -05:00
|
|
|
ARG 1 minX
|
2021-04-01 14:58:05 -04:00
|
|
|
ARG 2 minY
|
|
|
|
ARG 3 minZ
|
|
|
|
ARG 4 maxX
|
|
|
|
ARG 5 maxY
|
|
|
|
ARG 6 maxZ
|
2021-03-11 18:32:53 -05:00
|
|
|
METHOD <init> (Lnet/minecraft/class_2338;)V
|
|
|
|
COMMENT Creates a box enclosing only {@code pos}.
|
|
|
|
ARG 1 pos
|
|
|
|
METHOD equals (Ljava/lang/Object;)Z
|
|
|
|
ARG 1 o
|
2019-06-28 17:55:20 -04:00
|
|
|
METHOD method_14657 intersects (Lnet/minecraft/class_3341;)Z
|
2022-10-18 16:15:20 -04:00
|
|
|
COMMENT {@return whether {@code other} intersects with this box}
|
2019-06-28 17:55:20 -04:00
|
|
|
ARG 1 other
|
2019-09-12 09:46:52 -04:00
|
|
|
METHOD method_14659 getDimensions ()Lnet/minecraft/class_2382;
|
2022-10-18 16:15:20 -04:00
|
|
|
COMMENT {@return the dimensions (the size) of this box}
|
2021-04-01 14:58:05 -04:00
|
|
|
METHOD method_14660 getBlockCountY ()I
|
2022-10-18 16:15:20 -04:00
|
|
|
COMMENT {@return the number of blocks on the Y axis}
|
|
|
|
COMMENT
|
|
|
|
COMMENT <p>This is equal to {@code maxY - minY + 1}.
|
2021-03-10 13:34:17 -05:00
|
|
|
METHOD method_14661 move (III)Lnet/minecraft/class_3341;
|
2019-09-12 09:46:52 -04:00
|
|
|
ARG 1 dx
|
|
|
|
ARG 2 dy
|
|
|
|
ARG 3 dz
|
2019-06-28 17:55:20 -04:00
|
|
|
METHOD method_14662 contains (Lnet/minecraft/class_2382;)Z
|
2022-10-18 16:15:20 -04:00
|
|
|
COMMENT {@return whether this box contains {@code pos}}
|
2022-11-16 15:33:20 -05:00
|
|
|
ARG 1 pos
|
2021-04-01 14:58:05 -04:00
|
|
|
METHOD method_14663 getBlockCountZ ()I
|
2022-10-18 16:15:20 -04:00
|
|
|
COMMENT {@return the number of blocks on the Z axis}
|
|
|
|
COMMENT
|
|
|
|
COMMENT <p>This is equal to {@code maxZ - minZ + 1}.
|
2021-07-05 11:32:07 -04:00
|
|
|
METHOD method_14665 infinite ()Lnet/minecraft/class_3341;
|
2022-10-18 16:15:20 -04:00
|
|
|
COMMENT {@return a new all-encompassing, infinite box}
|
2019-09-12 09:46:52 -04:00
|
|
|
METHOD method_14667 rotated (IIIIIIIIILnet/minecraft/class_2350;)Lnet/minecraft/class_3341;
|
2018-12-12 10:08:04 -05:00
|
|
|
ARG 0 x
|
|
|
|
ARG 1 y
|
|
|
|
ARG 2 z
|
2019-09-12 09:46:52 -04:00
|
|
|
ARG 3 offsetX
|
|
|
|
ARG 4 offsetY
|
|
|
|
ARG 5 offsetZ
|
|
|
|
ARG 6 sizeX
|
|
|
|
ARG 7 sizeY
|
|
|
|
ARG 8 sizeZ
|
2018-12-12 10:08:04 -05:00
|
|
|
ARG 9 facing
|
2019-06-28 17:55:20 -04:00
|
|
|
METHOD method_14669 intersectsXZ (IIII)Z
|
2022-10-18 16:15:20 -04:00
|
|
|
COMMENT {@return whether the rectangle from the given coordinates intersects with this box's XZ plane}
|
2019-06-28 17:55:20 -04:00
|
|
|
ARG 1 minX
|
|
|
|
ARG 2 minZ
|
|
|
|
ARG 3 maxX
|
|
|
|
ARG 4 maxZ
|
2020-08-30 06:09:18 -04:00
|
|
|
METHOD method_19311 offset (III)Lnet/minecraft/class_3341;
|
2022-10-18 16:15:20 -04:00
|
|
|
COMMENT {@return a new box that is translated by {@code x}, {@code y}, {@code z}
|
|
|
|
COMMENT on each axis from this box}
|
2021-03-11 18:32:53 -05:00
|
|
|
COMMENT
|
|
|
|
COMMENT @see #move(int, int, int)
|
2019-09-12 09:28:23 -04:00
|
|
|
ARG 1 x
|
|
|
|
ARG 2 y
|
|
|
|
ARG 3 z
|
2021-03-10 13:34:17 -05:00
|
|
|
METHOD method_22874 getCenter ()Lnet/minecraft/class_2338;
|
2022-10-18 16:15:20 -04:00
|
|
|
COMMENT {@return the center of this box}
|
|
|
|
COMMENT
|
|
|
|
COMMENT @apiNote This is biased toward the minimum bound corner of the box.
|
2021-03-10 13:34:17 -05:00
|
|
|
METHOD method_29299 move (Lnet/minecraft/class_2382;)Lnet/minecraft/class_3341;
|
2020-12-23 13:37:43 -05:00
|
|
|
ARG 1 vec
|
2021-03-11 18:32:53 -05:00
|
|
|
METHOD method_34389 encompass (Lnet/minecraft/class_2338;)Lnet/minecraft/class_3341;
|
|
|
|
COMMENT Expands this box to encompass the {@code pos}.
|
|
|
|
COMMENT
|
|
|
|
COMMENT @return this box, for chaining
|
|
|
|
ARG 1 pos
|
|
|
|
COMMENT the pos to encompass
|
|
|
|
METHOD method_34390 create (Lnet/minecraft/class_2382;Lnet/minecraft/class_2382;)Lnet/minecraft/class_3341;
|
2022-10-18 16:15:20 -04:00
|
|
|
COMMENT {@return a new box from two corners, {@code first} and {@code second}}
|
2021-03-11 18:32:53 -05:00
|
|
|
ARG 0 first
|
|
|
|
ARG 1 second
|
|
|
|
METHOD method_34391 forEachVertex (Ljava/util/function/Consumer;)V
|
2022-10-18 16:15:20 -04:00
|
|
|
COMMENT Calls {@code consumer} for each vertex (corner) of this box.
|
2021-03-11 18:32:53 -05:00
|
|
|
ARG 1 consumer
|
|
|
|
METHOD method_34392 (Ljava/util/stream/IntStream;)Lcom/mojang/serialization/DataResult;
|
|
|
|
ARG 0 values
|
|
|
|
METHOD method_34393 ([I)Lnet/minecraft/class_3341;
|
|
|
|
ARG 0 array
|
|
|
|
METHOD method_34394 (Lnet/minecraft/class_3341;)Ljava/util/stream/IntStream;
|
|
|
|
ARG 0 box
|
2021-04-01 14:58:05 -04:00
|
|
|
METHOD method_35410 expand (I)Lnet/minecraft/class_3341;
|
2022-10-18 16:15:20 -04:00
|
|
|
COMMENT {@return a new box that is expanded on each direction by {@code offset}}
|
2021-04-01 14:58:05 -04:00
|
|
|
ARG 1 offset
|
2021-04-18 09:04:10 -04:00
|
|
|
METHOD method_35411 encompassPositions (Ljava/lang/Iterable;)Ljava/util/Optional;
|
2022-10-18 16:15:20 -04:00
|
|
|
COMMENT {@return the minimum box encompassing all of the given {@code positions},
|
|
|
|
COMMENT or an empty optional if {@code positions} is empty}
|
2021-04-16 10:19:52 -04:00
|
|
|
ARG 0 positions
|
2021-04-18 09:04:10 -04:00
|
|
|
METHOD method_35412 encompass (Lnet/minecraft/class_3341;)Lnet/minecraft/class_3341;
|
2021-04-01 14:58:05 -04:00
|
|
|
ARG 1 box
|
2021-04-18 09:04:10 -04:00
|
|
|
METHOD method_35413 encompass (Ljava/lang/Iterable;)Ljava/util/Optional;
|
2022-10-18 16:15:20 -04:00
|
|
|
COMMENT {@return the minimum box encompassing all of the given {@code boxes},
|
|
|
|
COMMENT or an empty optional if {@code boxes} is empty}
|
2021-04-16 10:19:52 -04:00
|
|
|
ARG 0 boxes
|
2021-04-01 14:58:05 -04:00
|
|
|
METHOD method_35414 getBlockCountX ()I
|
2022-10-18 16:15:20 -04:00
|
|
|
COMMENT {@return the number of blocks on the X axis}
|
|
|
|
COMMENT
|
|
|
|
COMMENT <p>This is equal to {@code maxX - minX + 1}.
|
2021-04-01 14:58:05 -04:00
|
|
|
METHOD method_35415 getMinX ()I
|
|
|
|
METHOD method_35416 getMinY ()I
|
|
|
|
METHOD method_35417 getMinZ ()I
|
|
|
|
METHOD method_35418 getMaxX ()I
|
|
|
|
METHOD method_35419 getMaxY ()I
|
|
|
|
METHOD method_35420 getMaxZ ()I
|
2022-11-16 15:33:20 -05:00
|
|
|
METHOD method_47593 contains (III)Z
|
|
|
|
ARG 1 x
|
|
|
|
ARG 2 y
|
|
|
|
ARG 3 z
|