Add missing methods for util math from 10a update (#2126)

* Add missing methods for util math from 10a update

Signed-off-by: liach <liach@users.noreply.github.com>

* Update mappings/net/minecraft/util/math/BlockBox.mapping

Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com>

* Update mappings/net/minecraft/util/math/Vec3i.mapping

Co-authored-by: SuperCoder79 <25208576+SuperCoder7979@users.noreply.github.com>

Co-authored-by: liach <liach@users.noreply.github.com>
Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com>
Co-authored-by: SuperCoder79 <25208576+SuperCoder7979@users.noreply.github.com>
This commit is contained in:
liach 2021-03-11 17:32:53 -06:00 committed by GitHub
parent f709a6f44f
commit 9ae5d6af60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 50 additions and 0 deletions

View File

@ -1,10 +1,22 @@
CLASS net/minecraft/class_3341 net/minecraft/util/math/BlockBox
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
FIELD field_14376 maxZ I
FIELD field_14377 maxY I
FIELD field_14378 maxX I
FIELD field_14379 minZ I
FIELD field_14380 minY I
FIELD field_14381 minX I
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}.
METHOD <init> (IIIIII)V
ARG 1 minX
ARG 2 minY
@ -12,6 +24,11 @@ CLASS net/minecraft/class_3341 net/minecraft/util/math/BlockBox
ARG 4 maxX
ARG 5 maxY
ARG 6 maxZ
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
METHOD method_14657 intersects (Lnet/minecraft/class_3341;)Z
ARG 1 other
METHOD method_14659 getDimensions ()Lnet/minecraft/class_2382;
@ -25,6 +42,7 @@ CLASS net/minecraft/class_3341 net/minecraft/util/math/BlockBox
METHOD method_14663 getBlockCountY ()I
METHOD method_14664 getBlockCountZ ()I
METHOD method_14665 empty ()Lnet/minecraft/class_3341;
COMMENT Creates an empty box.
METHOD method_14666 create (IIIIII)Lnet/minecraft/class_3341;
ARG 0 x1
ARG 1 y1
@ -51,6 +69,11 @@ CLASS net/minecraft/class_3341 net/minecraft/util/math/BlockBox
ARG 3 maxX
ARG 4 maxZ
METHOD method_19311 offset (III)Lnet/minecraft/class_3341;
COMMENT Creates a new box that is translated by {@code x}, {@code y}, {@code z}
COMMENT on each axis from this box.
COMMENT
COMMENT @return the new box created
COMMENT @see #move(int, int, int)
ARG 1 x
ARG 2 y
ARG 3 z
@ -59,3 +82,20 @@ CLASS net/minecraft/class_3341 net/minecraft/util/math/BlockBox
METHOD method_27234 infinite ()Lnet/minecraft/class_3341;
METHOD method_29299 move (Lnet/minecraft/class_2382;)Lnet/minecraft/class_3341;
ARG 1 vec
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;
ARG 0 first
ARG 1 second
METHOD method_34391 forEachVertex (Ljava/util/function/Consumer;)V
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

View File

@ -13,6 +13,8 @@ CLASS net/minecraft/class_2382 net/minecraft/util/math/Vec3i
ARG 1 x
ARG 2 y
ARG 3 z
METHOD equals (Ljava/lang/Object;)Z
ARG 1 o
METHOD method_10099 setY (I)Lnet/minecraft/class_2382;
ARG 1 y
METHOD method_10259 crossProduct (Lnet/minecraft/class_2382;)Lnet/minecraft/class_2382;
@ -57,3 +59,11 @@ CLASS net/minecraft/class_2382 net/minecraft/util/math/Vec3i
METHOD method_33106 getSquaredDistance (Lnet/minecraft/class_2382;Z)D
ARG 1 vec
ARG 2 treatAsBlockPos
METHOD method_34592 add (III)Lnet/minecraft/class_2382;
COMMENT Returns another Vec3i whose coordinates have the parameter x, y, and z
COMMENT added to the coordinates of this vector.
COMMENT
COMMENT <p>This method always returns an immutable object.
ARG 1 x
ARG 2 y
ARG 3 z