Record Class SourceTile
- Record Components:
tileX- absolute world tile X in the source regiontileY- absolute world tile Y in the source regionplane- source plane,0..3— need not equal the plane asked forrotation- chunk rotation applied to the copy,0..3
Returned by DynamicRegion.sourceOf(int, int, int). The coordinates
are absolute world tiles in the source region — the same coordinate
space as Npc.tileX() or a baked navigation grid, not an offset and not
a scene-local position. That is the whole point of the resolver: a tile inside
a player-owned house resolves to the tile in the house template region that
supplied its terrain, collision and scenery.
rotation() is the chunk's rotation, 0..3 in 90-degree
steps, and it is not merely informational: anything directional read out of
the source tile has to be rotated by it before being believed in the
instance. Wall and door collision bits are the classic case, and a
Location's own rotation composes with it via
DynamicRegion.rotateLocRotation(int, int). Copying raw directional
flags without applying this is the standard way to get an instance's
collision subtly wrong.
-
Constructor Summary
ConstructorsConstructorDescriptionSourceTile(int tileX, int tileY, int plane, int rotation) Creates an instance of aSourceTilerecord 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.intplane()Returns the value of theplanerecord component.introtation()Returns the value of therotationrecord component.inttileX()Returns the value of thetileXrecord component.inttileY()Returns the value of thetileYrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SourceTile
public SourceTile(int tileX, int tileY, int plane, int rotation) Creates an instance of aSourceTilerecord class.
-
-
Method Details
-
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. -
tileX
-
tileY
-
plane
-
rotation
-