Record Class ITownHallView.MapEntry
java.lang.Object
java.lang.Record
com.minecolonies.api.colony.buildings.workerbuildings.ITownHallView.MapEntry
- Enclosing interface:
ITownHallView
public static record ITownHallView.MapEntry(net.minecraft.world.level.saveddata.maps.MapId mapId, net.minecraft.world.level.saveddata.maps.MapItemSavedData mapData)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, ITownHallView.MapEntry> -
Constructor Summary
ConstructorsConstructorDescriptionMapEntry(net.minecraft.world.level.saveddata.maps.MapId mapId, net.minecraft.world.level.saveddata.maps.MapItemSavedData mapData) Creates an instance of aMapEntryrecord 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.net.minecraft.world.level.saveddata.maps.MapItemSavedDatamapData()Returns the value of themapDatarecord component.net.minecraft.world.level.saveddata.maps.MapIdmapId()Returns the value of themapIdrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,ITownHallView.MapEntry> STREAM_CODEC
-
-
Constructor Details
-
MapEntry
public MapEntry(net.minecraft.world.level.saveddata.maps.MapId mapId, net.minecraft.world.level.saveddata.maps.MapItemSavedData mapData) Creates an instance of aMapEntryrecord class.- Parameters:
mapId- the value for themapIdrecord componentmapData- the value for themapDatarecord component
-
-
Method Details
-
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. -
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. -
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). -
mapId
public net.minecraft.world.level.saveddata.maps.MapId mapId()Returns the value of themapIdrecord component.- Returns:
- the value of the
mapIdrecord component
-
mapData
public net.minecraft.world.level.saveddata.maps.MapItemSavedData mapData()Returns the value of themapDatarecord component.- Returns:
- the value of the
mapDatarecord component
-