Record Class IRaiderManager.RaidSettings
java.lang.Object
java.lang.Record
com.minecolonies.api.colony.managers.interfaces.IRaiderManager.RaidSettings
- Enclosing interface:
IRaiderManager
-
Constructor Summary
ConstructorsConstructorDescriptionRaidSettings(boolean forcedSpawn, @Nullable String raidType, boolean allowShips, @Nullable Integer raiderAmount, @Nullable net.minecraft.core.BlockPos location) Creates an instance of aRaidSettingsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theallowShipsrecord component.static IRaiderManager.RaidSettingsfinal booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of theforcedSpawnrecord component.final inthashCode()Returns a hash code value for this object.@Nullable net.minecraft.core.BlockPoslocation()Returns the value of thelocationrecord component.@Nullable IntegerReturns the value of theraiderAmountrecord component.@Nullable StringraidType()Returns the value of theraidTyperecord component.final StringtoString()Returns a string representation of this record class.withExplicitType(@Nullable String raidType)
-
Constructor Details
-
RaidSettings
public RaidSettings(boolean forcedSpawn, @Nullable @Nullable String raidType, boolean allowShips, @Nullable @Nullable Integer raiderAmount, @Nullable @Nullable net.minecraft.core.BlockPos location) Creates an instance of aRaidSettingsrecord class.- Parameters:
forcedSpawn- the value for theforcedSpawnrecord componentraidType- the value for theraidTyperecord componentallowShips- the value for theallowShipsrecord componentraiderAmount- the value for theraiderAmountrecord componentlocation- the value for thelocationrecord component
-
-
Method Details
-
withExplicitType
-
defaultRaidSettings
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
forcedSpawn
public boolean forcedSpawn()Returns the value of theforcedSpawnrecord component.- Returns:
- the value of the
forcedSpawnrecord component
-
raidType
Returns the value of theraidTyperecord component.- Returns:
- the value of the
raidTyperecord component
-
allowShips
public boolean allowShips()Returns the value of theallowShipsrecord component.- Returns:
- the value of the
allowShipsrecord component
-
raiderAmount
Returns the value of theraiderAmountrecord component.- Returns:
- the value of the
raiderAmountrecord component
-
location
@Nullable public @Nullable net.minecraft.core.BlockPos location()Returns the value of thelocationrecord component.- Returns:
- the value of the
locationrecord component
-