Class BlockPos

  • All Implemented Interfaces:
    java.lang.Comparable<Vec3i>, org.teavm.jso.JSObject
    Direct Known Subclasses:
    BlockPos.MutableBlockPos

    public class BlockPos
    extends Vec3i
    + This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code. Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!" Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team EaglercraftX 1.8 patch files are (c) 2022-2023 LAX1DUDE. All Rights Reserved. WITH THE EXCEPTION OF PATCH FILES, MINIFIED JAVASCRIPT, AND ALL FILES NORMALLY FOUND IN AN UNMODIFIED MINECRAFT RESOURCE PACK, YOU ARE NOT ALLOWED TO SHARE, DISTRIBUTE, OR REPURPOSE ANY FILE USED BY OR PRODUCED BY THE SOFTWARE IN THIS REPOSITORY WITHOUT PRIOR PERMISSION FROM THE PROJECT AUTHOR. NOT FOR COMMERCIAL OR MALICIOUS USE (please read the 'LICENSE' file this repo's root directory for more info)
    • Field Detail

      • ORIGIN

        public static final BlockPos ORIGIN
        + The BlockPos with all coordinates 0
    • Constructor Detail

      • BlockPos

        public BlockPos​(int x,
                        int y,
                        int z)
      • BlockPos

        public BlockPos​(double x,
                        double y,
                        double z)
      • BlockPos

        public BlockPos​(Entity source)
      • BlockPos

        public BlockPos​(Vec3 source)
      • BlockPos

        public BlockPos​(Vec3i source)
    • Method Detail

      • add

        public BlockPos add​(double x,
                            double y,
                            double z)
        + Add the given coordinates to the coordinates of this BlockPos
      • add

        public BlockPos add​(int x,
                            int y,
                            int z)
        + Add the given coordinates to the coordinates of this BlockPos
      • add

        public BlockPos add​(Vec3i vec)
        + Add the given coordinates to the coordinates of this BlockPos
      • subtract

        public BlockPos subtract​(Vec3i vec)
        + Subtract the given Vector from this BlockPos
      • up

        public BlockPos up()
        + Offset this BlockPos 1 block up
      • up

        public BlockPos up​(int n)
        + Offset this BlockPos 1 block up
      • down

        public BlockPos down()
        + Offset this BlockPos 1 block down
      • down

        public BlockPos down​(int n)
        + Offset this BlockPos 1 block down
      • north

        public BlockPos north()
        + Offset this BlockPos 1 block in northern direction
      • north

        public BlockPos north​(int n)
        + Offset this BlockPos 1 block in northern direction
      • south

        public BlockPos south()
        + Offset this BlockPos 1 block in southern direction
      • south

        public BlockPos south​(int n)
        + Offset this BlockPos 1 block in southern direction
      • west

        public BlockPos west()
        + Offset this BlockPos 1 block in western direction
      • west

        public BlockPos west​(int n)
        + Offset this BlockPos 1 block in western direction
      • east

        public BlockPos east()
        + Offset this BlockPos 1 block in eastern direction
      • east

        public BlockPos east​(int n)
        + Offset this BlockPos 1 block in eastern direction
      • offset

        public BlockPos offset​(EnumFacing facing)
        + Offset this BlockPos 1 block in the given direction
      • offset

        public BlockPos offset​(EnumFacing facing,
                               int n)
        + Offset this BlockPos 1 block in the given direction
      • crossProduct

        public BlockPos crossProduct​(Vec3i vec3i)
        + Calculate the cross product of this and the given Vector
        Overrides:
        crossProduct in class Vec3i
      • toLong

        public long toLong()
        + Serialize this BlockPos into a long value
      • fromLong

        public static BlockPos fromLong​(long serialized)
        + Create a BlockPos from a serialized long value (created by toLong)
      • getAllInBox

        public static java.lang.Iterable<BlockPos> getAllInBox​(BlockPos from,
                                                               BlockPos to)
        + Create an Iterable that returns all positions in the box specified by the given corners
      • getAllInBoxMutable

        public static java.lang.Iterable<BlockPos.MutableBlockPos> getAllInBoxMutable​(BlockPos from,
                                                                                      BlockPos to)
        + Like getAllInBox but reuses a single MutableBlockPos instead. If this method is used, the resulting BlockPos instances can only be used inside the iteration loop.