Record Class ServerPolygon
java.lang.Object
java.lang.Record
journeymap.api.v2.server.overlay.ServerPolygon
- Record Components:
overlayId- the addon-stable handle for this overlaydimension- the dimension this overlay belongs topolygons- one or more polygons, all sharing the same shape propsprops- style and visibility for every polygon in this overlay
public record ServerPolygon(String overlayId, net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension, List<OverlayPolygon> polygons, OverlayShapeProps props)
extends Record
One logical overlay pushed by a server addon. May contain many disjoint
OverlayPolygons sharing one set of OverlayShapeProps.
The overlayId is a stable, addon-chosen string. Re-calling
IServerOverlayAPI.show(ServerPlayer, String, ServerPolygon...) with the same (modId, overlayId) pair
replaces any prior version on the client; calling
IServerOverlayAPI.remove(ServerPlayer, String, String) removes it.
-
Constructor Summary
ConstructorsConstructorDescriptionServerPolygon(String overlayId, net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension, List<OverlayPolygon> polygons, OverlayShapeProps props) Creates an instance of aServerPolygonrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> Returns the value of thedimensionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theoverlayIdrecord component.polygons()Returns the value of thepolygonsrecord component.props()Returns the value of thepropsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ServerPolygon
public ServerPolygon(String overlayId, net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension, List<OverlayPolygon> polygons, OverlayShapeProps props) Creates an instance of aServerPolygonrecord 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 withObjects::equals(Object,Object). -
overlayId
-
dimension
-
polygons
-
props
-