Record Class CoordOffset

java.lang.Object
java.lang.Record
com.zenith.feature.coordobf.CoordOffset

public record CoordOffset(int x, int z) extends Record
Important to deep copy all objects that are offset by this class Each session will have its own CoordOffset instance. Packet data must not be mutated in-place.
  • Field Details

  • Constructor Details

    • CoordOffset

      public CoordOffset(int x, int z)
      Creates an instance of a CoordOffset record class.
      Parameters:
      x - the value for the x record component
      z - the value for the z record component
  • Method Details

    • obfuscateDouble

      public double obfuscateDouble(double d)
    • offsetX

      public int offsetX(int x)
    • offsetX

      public double offsetX(double x)
    • offsetChunkX

      public int offsetChunkX(int x)
    • offsetZ

      public int offsetZ(int z)
    • offsetZ

      public double offsetZ(double z)
    • offsetChunkZ

      public int offsetChunkZ(int z)
    • reverseOffsetX

      public int reverseOffsetX(int x)
    • reverseOffsetX

      public double reverseOffsetX(double x)
    • reverseChunkOffsetX

      public int reverseChunkOffsetX(int x)
    • reverseOffsetZ

      public int reverseOffsetZ(int z)
    • reverseOffsetZ

      public double reverseOffsetZ(double z)
    • reverseChunkOffsetZ

      public int reverseChunkOffsetZ(int z)
    • offsetVector

      public org.cloudburstmc.math.vector.Vector3i offsetVector(org.cloudburstmc.math.vector.Vector3i vec)
    • reverseOffsetVector

      public org.cloudburstmc.math.vector.Vector3i reverseOffsetVector(org.cloudburstmc.math.vector.Vector3i vec)
    • offsetVector

      public org.cloudburstmc.math.vector.Vector3d offsetVector(org.cloudburstmc.math.vector.Vector3d vec)
    • reverseOffsetVector

      public org.cloudburstmc.math.vector.Vector3d reverseOffsetVector(org.cloudburstmc.math.vector.Vector3d vec)
    • offsetNbt

      public com.viaversion.nbt.mini.MNBT offsetNbt(com.viaversion.nbt.mini.MNBT nbt)
    • offsetNbt

      public com.viaversion.nbt.tag.Tag offsetNbt(com.viaversion.nbt.tag.Tag tag)
    • offsetCompoundTag

      public com.viaversion.nbt.tag.CompoundTag offsetCompoundTag(com.viaversion.nbt.tag.CompoundTag compoundTag)
    • offsetBlockEntityInfo

      public BlockEntityInfo offsetBlockEntityInfo(BlockEntityInfo blockEntityInfo)
    • offsetBlockEntityInfos

      public BlockEntityInfo[] offsetBlockEntityInfos(BlockEntityInfo[] blockEntityInfos)
    • sanitizeItemStack

      public ItemStack sanitizeItemStack(ItemStack itemStack)
    • obfuscateChunkSections

      public ChunkSection[] obfuscateChunkSections(ChunkSection[] originalSections)
    • obfuscateBiomePalettes

      public DataPalette[] obfuscateBiomePalettes(DataPalette[] originalPalettes)
    • obfuscatedBiomePalette

      public DataPalette obfuscatedBiomePalette(PalettedWorldState palettedWorldState)
    • offsetParticle

      public Particle offsetParticle(Particle particle)
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • x

      public int x()
      Returns the value of the x record component.
      Returns:
      the value of the x record component
    • z

      public int z()
      Returns the value of the z record component.
      Returns:
      the value of the z record component