BlockPos
Represents a position of a block in the world
Questa classe è stata aggiunta da una mod con ID crafttweaker
. Perciò, è necessario avere questa mod installata per poter utilizzare questa funzione.
Importing the class
Potrebbe essere necessario importare il pacchetto, se si incontrano dei problemi (come castare un vettore), quindi meglio essere sicuri e aggiungere la direttiva di importazione.
Constructors
Methods
add
Adds two positions together and returns the result.
Returns crafttweaker.api.util.BlockPos
Adds the given values to this position, and returns a new position with the new values.
Returns crafttweaker.api.util.BlockPos
crossProduct
Creates a new BlockPos based on the cross product of this position, and the given position
Returns crafttweaker.api.util.BlockPos
distanceSq
Gets the squared distance of this position to the specified BlockPos, using the center of the BlockPos
Returns double
Gets the squared distance of this position to the specified BlockPos
Returns double
Gets the squared distance of this position to the specified coordinates
Returns double
down
Creates a new BlockPos based on this BlockPos that is one block lower than this BlockPos
Returns: a new BlockPos that is one block lower than this BlockPos
Returns net.minecraft.util.math.BlockPos
east
Creates a new BlockPos based on this BlockPos that is one block east of this BlockPos
Returns: a new BlockPos that is one block east of this BlockPos
Returns net.minecraft.util.math.BlockPos
Creates a new BlockPos based on this BlockPos that is n block(s) east of this BlockPos
Returns: a new BlockPos that is n block(s) east of this BlockPos
Returns net.minecraft.util.math.BlockPos
manhattanDistance
Gets the Manhattan Distance of this pos compared to a different position
Restituisce un intero
north
Creates a new BlockPos based on this BlockPos that is one block north of this BlockPos
Returns: a new BlockPos that is one block north of this BlockPos
Returns net.minecraft.util.math.BlockPos
Creates a new BlockPos based on this BlockPos that is n block(s) north of this BlockPos
Returns: a new BlockPos that is n block(s) north of this BlockPos
Returns net.minecraft.util.math.BlockPos
offset
Creates a new BlockPos based on this BlockPos that is one block offset of this BlockPos based on the given crafttweaker.api.util.Direction
Returns: a new BlockPos that is 1 block offset of this BlockPos
Returns crafttweaker.api.util.BlockPos
Creates a new BlockPos based on this BlockPos that is n block(s) offset of this BlockPos based on the given crafttweaker.api.util.Direction
Returns: a new BlockPos that is n block(s) offset of this BlockPos
Returns crafttweaker.api.util.BlockPos
south
Creates a new BlockPos based on this BlockPos that is one block south of this BlockPos
Returns: a new BlockPos that is one block south of this BlockPos
Returns net.minecraft.util.math.BlockPos
Creates a new BlockPos based on this BlockPos that is n block(s) south of this BlockPos
Returns: a new BlockPos that is n block(s) south of this BlockPos
Returns net.minecraft.util.math.BlockPos
subtract
Subtracts two positions together and returns the result.
Returns crafttweaker.api.util.BlockPos
up
Creates a new BlockPos based on this BlockPos that is one block higher than this BlockPos
Returns: a new BlockPos that is one block higher than this BlockPos
Returns net.minecraft.util.math.BlockPos
Creates a new BlockPos based on this BlockPos that is n block(s) higher than this BlockPos
Returns: a new BlockPos that is n block(s) higher than this BlockPos
Returns net.minecraft.util.math.BlockPos
west
Creates a new BlockPos based on this BlockPos that is one block west of this BlockPos
Returns: a new BlockPos that is one block west of this BlockPos
Returns net.minecraft.util.math.BlockPos
Creates a new BlockPos based on this BlockPos that is n block(s) west of this BlockPos
Returns: a new BlockPos that is n block(s) west of this BlockPos
Returns net.minecraft.util.math.BlockPos
withinDistance
Checks if the given BlockPos is within the specified distance of this BlockPos (this uses the middle of the BlockPos)
Restituisce un booleano
Properties
Operators
ADD
Adds two positions together and returns the result.
Subtracts two positions together and returns the result.