Package forgottentowns.mod.api
Record Class WorldInspection
java.lang.Object
java.lang.Record
forgottentowns.mod.api.WorldInspection
- Record Components:
units- whether citizens, soldiers, heroes, and creatures can be inspectedzones- whether zones expose inspection and their available construction toolssampleBuildables- whether middle-click selects an unlocked structural construction tool
public record WorldInspection(boolean units, boolean zones, boolean sampleBuildables)
extends Record
Opts into the host's dedicated middle-click inspectors.
The host owns picking, localized presentation, unlock checks, equipment requests and world-tool selection.
Unit inspection also routes roster information buttons to the same dedicated inspector.
Registrations are additive; disabling the owning mod removes its opt-in on restart.
-
Constructor Summary
ConstructorsConstructorDescriptionWorldInspection(boolean units, boolean zones) Creates inspection options without enabling construction sampling.WorldInspection(boolean units, boolean zones, boolean sampleBuildables) Creates an instance of aWorldInspectionrecord 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.booleanReturns the value of thesampleBuildablesrecord component.final StringtoString()Returns a string representation of this record class.booleanunits()Returns the value of theunitsrecord component.booleanzones()Returns the value of thezonesrecord component.
-
Constructor Details
-
WorldInspection
public WorldInspection(boolean units, boolean zones) Creates inspection options without enabling construction sampling.- Parameters:
units- whether units can be inspectedzones- whether zones can be inspected
-
WorldInspection
public WorldInspection(boolean units, boolean zones, boolean sampleBuildables) Creates an instance of aWorldInspectionrecord class.- Parameters:
units- the value for theunitsrecord componentzones- the value for thezonesrecord componentsampleBuildables- the value for thesampleBuildablesrecord 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 with '=='. -
units
public boolean units()Returns the value of theunitsrecord component.- Returns:
- the value of the
unitsrecord component
-
zones
public boolean zones()Returns the value of thezonesrecord component.- Returns:
- the value of the
zonesrecord component
-
sampleBuildables
public boolean sampleBuildables()Returns the value of thesampleBuildablesrecord component.- Returns:
- the value of the
sampleBuildablesrecord component
-