Record Class CoordOffset
java.lang.Object
java.lang.Record
com.zenith.feature.coordobf.CoordOffset
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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCoordOffset(int x, int z) Creates an instance of aCoordOffsetrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.obfuscateBiomePalettes(DataPalette[] originalPalettes) obfuscateChunkSections(ChunkSection[] originalSections) doubleobfuscateDouble(double d) offsetBlockEntityInfo(BlockEntityInfo blockEntityInfo) offsetBlockEntityInfos(BlockEntityInfo[] blockEntityInfos) intoffsetChunkX(int x) intoffsetChunkZ(int z) com.viaversion.nbt.tag.CompoundTagoffsetCompoundTag(com.viaversion.nbt.tag.CompoundTag compoundTag) com.viaversion.nbt.mini.MNBToffsetNbt(com.viaversion.nbt.mini.MNBT nbt) com.viaversion.nbt.tag.TagoffsetNbt(com.viaversion.nbt.tag.Tag tag) offsetParticle(Particle particle) org.cloudburstmc.math.vector.Vector3ioffsetVector(org.cloudburstmc.math.vector.Vector3i vec) doubleoffsetX(double x) intoffsetX(int x) doubleoffsetZ(double z) intoffsetZ(int z) intreverseChunkOffsetX(int x) intreverseChunkOffsetZ(int z) org.cloudburstmc.math.vector.Vector3ireverseOffsetVector(org.cloudburstmc.math.vector.Vector3i vec) doublereverseOffsetX(double x) intreverseOffsetX(int x) doublereverseOffsetZ(double z) intreverseOffsetZ(int z) sanitizeItemStack(ItemStack itemStack) final StringtoString()Returns a string representation of this record class.intx()Returns the value of thexrecord component.intz()Returns the value of thezrecord component.
-
Field Details
-
EPSILON
public static final double EPSILON- See Also:
-
-
Constructor Details
-
CoordOffset
public CoordOffset(int x, int z) Creates an instance of aCoordOffsetrecord class.- Parameters:
x- the value for thexrecord componentz- the value for thezrecord 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) -
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
-
offsetBlockEntityInfos
-
sanitizeItemStack
-
obfuscateChunkSections
-
obfuscateBiomePalettes
-
offsetParticle
-
toString
-
hashCode
-
equals
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 thecomparemethod from their corresponding wrapper classes. -
x
public int x()Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
z
public int z()Returns the value of thezrecord component.- Returns:
- the value of the
zrecord component
-