类 BlockBox


  • public class BlockBox
    extends Object
    A mutable box with integer coordinates. The box is axis-aligned and the coordinates are inclusive.

    This box, though mutable, has proper hashCode and equals implementations and can be used as map keys if user can ensure they are not modified.

    另请参阅:
    Box
    Mappings:
    Namespace Name
    official czr
    intermediary net/minecraft/class_3341
    named net/minecraft/util/math/BlockBox
    • 字段详细资料

      • LOGGER

        private static final Logger LOGGER
        Mappings:
        Namespace Name Mixin selector
        official b Lczr;b:Lorg/apache/logging/log4j/Logger;
        intermediary field_31548 Lnet/minecraft/class_3341;field_31548:Lorg/apache/logging/log4j/Logger;
        named LOGGER Lnet/minecraft/util/math/BlockBox;LOGGER:Lorg/apache/logging/log4j/Logger;
      • CODEC

        public static final com.mojang.serialization.Codec<BlockBox> CODEC
        A codec that stores a block box as an int array. In the serialized array, the ordered elements are minX, minY, minZ, maxX, maxY, maxZ.
        Mappings:
        Namespace Name Mixin selector
        official a Lczr;a:Lcom/mojang/serialization/Codec;
        intermediary field_29325 Lnet/minecraft/class_3341;field_29325:Lcom/mojang/serialization/Codec;
        named CODEC Lnet/minecraft/util/math/BlockBox;CODEC:Lcom/mojang/serialization/Codec;
      • minX

        private int minX
        Mappings:
        Namespace Name Mixin selector
        official c Lczr;c:I
        intermediary field_14380 Lnet/minecraft/class_3341;field_14380:I
        named minX Lnet/minecraft/util/math/BlockBox;minX:I
      • minY

        private int minY
        Mappings:
        Namespace Name Mixin selector
        official d Lczr;d:I
        intermediary field_14379 Lnet/minecraft/class_3341;field_14379:I
        named minY Lnet/minecraft/util/math/BlockBox;minY:I
      • minZ

        private int minZ
        Mappings:
        Namespace Name Mixin selector
        official e Lczr;e:I
        intermediary field_14378 Lnet/minecraft/class_3341;field_14378:I
        named minZ Lnet/minecraft/util/math/BlockBox;minZ:I
      • maxX

        private int maxX
        Mappings:
        Namespace Name Mixin selector
        official f Lczr;f:I
        intermediary field_14377 Lnet/minecraft/class_3341;field_14377:I
        named maxX Lnet/minecraft/util/math/BlockBox;maxX:I
      • maxY

        private int maxY
        Mappings:
        Namespace Name Mixin selector
        official g Lczr;g:I
        intermediary field_14376 Lnet/minecraft/class_3341;field_14376:I
        named maxY Lnet/minecraft/util/math/BlockBox;maxY:I
      • maxZ

        private int maxZ
        Mappings:
        Namespace Name Mixin selector
        official h Lczr;h:I
        intermediary field_14381 Lnet/minecraft/class_3341;field_14381:I
        named maxZ Lnet/minecraft/util/math/BlockBox;maxZ:I
    • 构造器详细资料

      • BlockBox

        public BlockBox​(BlockPos pos)
        Creates a box enclosing only pos.
        Mappings:
        Namespace Name Mixin selector
        official <init> Lczr;<init>(Lgb;)V
        intermediary <init> Lnet/minecraft/class_3341;<init>(Lnet/minecraft/class_2338;)V
        named <init> Lnet/minecraft/util/math/BlockBox;<init>(Lnet/minecraft/util/math/BlockPos;)V
      • BlockBox

        public BlockBox​(int minX,
                        int minY,
                        int minZ,
                        int maxX,
                        int maxY,
                        int maxZ)
        Mappings:
        Namespace Name Mixin selector
        official <init> Lczr;<init>(IIIIII)V
        intermediary <init> Lnet/minecraft/class_3341;<init>(IIIIII)V
        named <init> Lnet/minecraft/util/math/BlockBox;<init>(IIIIII)V
    • 方法详细资料

      • create

        public static BlockBox create​(Vec3i first,
                                      Vec3i second)
        Mappings:
        Namespace Name Mixin selector
        official a Lczr;a(Lgw;Lgw;)Lczr;
        intermediary method_34390 Lnet/minecraft/class_3341;method_34390(Lnet/minecraft/class_2382;Lnet/minecraft/class_2382;)Lnet/minecraft/class_3341;
        named create Lnet/minecraft/util/math/BlockBox;create(Lnet/minecraft/util/math/Vec3i;Lnet/minecraft/util/math/Vec3i;)Lnet/minecraft/util/math/BlockBox;
      • empty

        public static BlockBox empty()
        Creates an empty box.
        Mappings:
        Namespace Name Mixin selector
        official a Lczr;a()Lczr;
        intermediary method_14665 Lnet/minecraft/class_3341;method_14665()Lnet/minecraft/class_3341;
        named empty Lnet/minecraft/util/math/BlockBox;empty()Lnet/minecraft/util/math/BlockBox;
      • rotated

        public static BlockBox rotated​(int x,
                                       int y,
                                       int z,
                                       int offsetX,
                                       int offsetY,
                                       int offsetZ,
                                       int sizeX,
                                       int sizeY,
                                       int sizeZ,
                                       Direction facing)
        Mappings:
        Namespace Name Mixin selector
        official a Lczr;a(IIIIIIIIILgg;)Lczr;
        intermediary method_14667 Lnet/minecraft/class_3341;method_14667(IIIIIIIIILnet/minecraft/class_2350;)Lnet/minecraft/class_3341;
        named rotated Lnet/minecraft/util/math/BlockBox;rotated(IIIIIIIIILnet/minecraft/util/math/Direction;)Lnet/minecraft/util/math/BlockBox;
      • intersects

        public boolean intersects​(BlockBox other)
        Mappings:
        Namespace Name Mixin selector
        official a Lczr;a(Lczr;)Z
        intermediary method_14657 Lnet/minecraft/class_3341;method_14657(Lnet/minecraft/class_3341;)Z
        named intersects Lnet/minecraft/util/math/BlockBox;intersects(Lnet/minecraft/util/math/BlockBox;)Z
      • intersectsXZ

        public boolean intersectsXZ​(int minX,
                                    int minZ,
                                    int maxX,
                                    int maxZ)
        Mappings:
        Namespace Name Mixin selector
        official a Lczr;a(IIII)Z
        intermediary method_14669 Lnet/minecraft/class_3341;method_14669(IIII)Z
        named intersectsXZ Lnet/minecraft/util/math/BlockBox;intersectsXZ(IIII)Z
      • method_35411

        public static Optional<BlockBox> method_35411​(Iterable<BlockPos> iterable)
        Mappings:
        Namespace Name Mixin selector
        official a Lczr;a(Ljava/lang/Iterable;)Ljava/util/Optional;
        intermediary method_35411 Lnet/minecraft/class_3341;method_35411(Ljava/lang/Iterable;)Ljava/util/Optional;
        named method_35411 Lnet/minecraft/util/math/BlockBox;method_35411(Ljava/lang/Iterable;)Ljava/util/Optional;
      • method_35413

        public static Optional<BlockBox> method_35413​(Iterable<BlockBox> iterable)
        Mappings:
        Namespace Name Mixin selector
        official b Lczr;b(Ljava/lang/Iterable;)Ljava/util/Optional;
        intermediary method_35413 Lnet/minecraft/class_3341;method_35413(Ljava/lang/Iterable;)Ljava/util/Optional;
        named method_35413 Lnet/minecraft/util/math/BlockBox;method_35413(Ljava/lang/Iterable;)Ljava/util/Optional;
      • intersection

        public BlockBox intersection​(BlockBox box)
        Mappings:
        Namespace Name Mixin selector
        official b Lczr;b(Lczr;)Lczr;
        intermediary method_35412 Lnet/minecraft/class_3341;method_35412(Lnet/minecraft/class_3341;)Lnet/minecraft/class_3341;
        named intersection Lnet/minecraft/util/math/BlockBox;intersection(Lnet/minecraft/util/math/BlockBox;)Lnet/minecraft/util/math/BlockBox;
      • encompass

        public BlockBox encompass​(BlockPos pos)
        Expands this box to encompass the pos.
        参数:
        pos - the pos to encompass
        返回:
        this box, for chaining
        Mappings:
        Namespace Name Mixin selector
        official a Lczr;a(Lgb;)Lczr;
        intermediary method_34389 Lnet/minecraft/class_3341;method_34389(Lnet/minecraft/class_2338;)Lnet/minecraft/class_3341;
        named encompass Lnet/minecraft/util/math/BlockBox;encompass(Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/math/BlockBox;
      • expand

        public BlockBox expand​(int offset)
        Mappings:
        Namespace Name Mixin selector
        official a Lczr;a(I)Lczr;
        intermediary method_35410 Lnet/minecraft/class_3341;method_35410(I)Lnet/minecraft/class_3341;
        named expand Lnet/minecraft/util/math/BlockBox;expand(I)Lnet/minecraft/util/math/BlockBox;
      • move

        public BlockBox move​(int dx,
                             int dy,
                             int dz)
        Mappings:
        Namespace Name Mixin selector
        official a Lczr;a(III)Lczr;
        intermediary method_14661 Lnet/minecraft/class_3341;method_14661(III)Lnet/minecraft/class_3341;
        named move Lnet/minecraft/util/math/BlockBox;move(III)Lnet/minecraft/util/math/BlockBox;
      • move

        public BlockBox move​(Vec3i vec)
        Mappings:
        Namespace Name Mixin selector
        official a Lczr;a(Lgw;)Lczr;
        intermediary method_29299 Lnet/minecraft/class_3341;method_29299(Lnet/minecraft/class_2382;)Lnet/minecraft/class_3341;
        named move Lnet/minecraft/util/math/BlockBox;move(Lnet/minecraft/util/math/Vec3i;)Lnet/minecraft/util/math/BlockBox;
      • offset

        public BlockBox offset​(int x,
                               int y,
                               int z)
        Creates a new box that is translated by x, y, z on each axis from this box.
        返回:
        the new box created
        另请参阅:
        move(int, int, int)
        Mappings:
        Namespace Name Mixin selector
        official b Lczr;b(III)Lczr;
        intermediary method_19311 Lnet/minecraft/class_3341;method_19311(III)Lnet/minecraft/class_3341;
        named offset Lnet/minecraft/util/math/BlockBox;offset(III)Lnet/minecraft/util/math/BlockBox;
      • contains

        public boolean contains​(Vec3i vec)
        Mappings:
        Namespace Name Mixin selector
        official b Lczr;b(Lgw;)Z
        intermediary method_14662 Lnet/minecraft/class_3341;method_14662(Lnet/minecraft/class_2382;)Z
        named contains Lnet/minecraft/util/math/BlockBox;contains(Lnet/minecraft/util/math/Vec3i;)Z
      • getDimensions

        public Vec3i getDimensions()
        Mappings:
        Namespace Name Mixin selector
        official b Lczr;b()Lgw;
        intermediary method_14659 Lnet/minecraft/class_3341;method_14659()Lnet/minecraft/class_2382;
        named getDimensions Lnet/minecraft/util/math/BlockBox;getDimensions()Lnet/minecraft/util/math/Vec3i;
      • getBlockCountX

        public int getBlockCountX()
        Mappings:
        Namespace Name Mixin selector
        official c Lczr;c()I
        intermediary method_35414 Lnet/minecraft/class_3341;method_35414()I
        named getBlockCountX Lnet/minecraft/util/math/BlockBox;getBlockCountX()I
      • getBlockCountY

        public int getBlockCountY()
        Mappings:
        Namespace Name Mixin selector
        official d Lczr;d()I
        intermediary method_14660 Lnet/minecraft/class_3341;method_14660()I
        named getBlockCountY Lnet/minecraft/util/math/BlockBox;getBlockCountY()I
      • getBlockCountZ

        public int getBlockCountZ()
        Mappings:
        Namespace Name Mixin selector
        official e Lczr;e()I
        intermediary method_14663 Lnet/minecraft/class_3341;method_14663()I
        named getBlockCountZ Lnet/minecraft/util/math/BlockBox;getBlockCountZ()I
      • getCenter

        public BlockPos getCenter()
        Implementation Note:
        Biased toward the minimum bound corner of the box.
        Mappings:
        Namespace Name Mixin selector
        official f Lczr;f()Lgb;
        intermediary method_22874 Lnet/minecraft/class_3341;method_22874()Lnet/minecraft/class_2338;
        named getCenter Lnet/minecraft/util/math/BlockBox;getCenter()Lnet/minecraft/util/math/BlockPos;
      • forEachVertex

        public void forEachVertex​(Consumer<BlockPos> consumer)
        Mappings:
        Namespace Name Mixin selector
        official a Lczr;a(Ljava/util/function/Consumer;)V
        intermediary method_34391 Lnet/minecraft/class_3341;method_34391(Ljava/util/function/Consumer;)V
        named forEachVertex Lnet/minecraft/util/math/BlockBox;forEachVertex(Ljava/util/function/Consumer;)V
      • toString

        public String toString()
        覆盖:
        toString 在类中 Object
        Mappings:
        Namespace Name Mixin selector
        official toString Lczr;toString()Ljava/lang/String;
        intermediary toString Lnet/minecraft/class_3341;toString()Ljava/lang/String;
        named toString Lnet/minecraft/util/math/BlockBox;toString()Ljava/lang/String;
      • equals

        public boolean equals​(Object o)
        覆盖:
        equals 在类中 Object
        Mappings:
        Namespace Name Mixin selector
        official equals Lczr;equals(Ljava/lang/Object;)Z
        intermediary equals Lnet/minecraft/class_3341;equals(Ljava/lang/Object;)Z
        named equals Lnet/minecraft/util/math/BlockBox;equals(Ljava/lang/Object;)Z
      • hashCode

        public int hashCode()
        覆盖:
        hashCode 在类中 Object
        Mappings:
        Namespace Name Mixin selector
        official hashCode Lczr;hashCode()I
        intermediary hashCode Lnet/minecraft/class_3341;hashCode()I
        named hashCode Lnet/minecraft/util/math/BlockBox;hashCode()I
      • getMinX

        public int getMinX()
        Mappings:
        Namespace Name Mixin selector
        official g Lczr;g()I
        intermediary method_35415 Lnet/minecraft/class_3341;method_35415()I
        named getMinX Lnet/minecraft/util/math/BlockBox;getMinX()I
      • getMinY

        public int getMinY()
        Mappings:
        Namespace Name Mixin selector
        official h Lczr;h()I
        intermediary method_35416 Lnet/minecraft/class_3341;method_35416()I
        named getMinY Lnet/minecraft/util/math/BlockBox;getMinY()I
      • getMinZ

        public int getMinZ()
        Mappings:
        Namespace Name Mixin selector
        official i Lczr;i()I
        intermediary method_35417 Lnet/minecraft/class_3341;method_35417()I
        named getMinZ Lnet/minecraft/util/math/BlockBox;getMinZ()I
      • getMaxX

        public int getMaxX()
        Mappings:
        Namespace Name Mixin selector
        official j Lczr;j()I
        intermediary method_35418 Lnet/minecraft/class_3341;method_35418()I
        named getMaxX Lnet/minecraft/util/math/BlockBox;getMaxX()I
      • getMaxY

        public int getMaxY()
        Mappings:
        Namespace Name Mixin selector
        official k Lczr;k()I
        intermediary method_35419 Lnet/minecraft/class_3341;method_35419()I
        named getMaxY Lnet/minecraft/util/math/BlockBox;getMaxY()I
      • getMaxZ

        public int getMaxZ()
        Mappings:
        Namespace Name Mixin selector
        official l Lczr;l()I
        intermediary method_35420 Lnet/minecraft/class_3341;method_35420()I
        named getMaxZ Lnet/minecraft/util/math/BlockBox;getMaxZ()I