Package com.wdiscute.starcatcher.fish
Record Class Difficulty
java.lang.Object
java.lang.Record
com.wdiscute.starcatcher.fish.Difficulty
public record Difficulty(int hp, int speed, int penalty, float decay, List<Modifier> modifiers, List<Difficulty.SweetSpot> sweetSpots)
extends Record
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic Difficultystatic Difficultystatic Difficultystatic Difficultystatic Difficultystatic final com.mojang.serialization.Codec<Difficulty> static Difficultystatic Difficultystatic Difficultystatic Difficultystatic Difficultystatic Difficultystatic Difficultystatic Difficultystatic Difficultystatic Difficultystatic Difficultystatic Difficultystatic Difficultystatic Difficultystatic Difficultystatic Difficultystatic Difficultystatic Difficultystatic Difficultystatic Difficultystatic Difficultystatic Difficultystatic Difficultystatic Difficultystatic Difficultystatic Difficultystatic Difficultystatic Difficultystatic Difficultystatic Difficultystatic Difficultystatic Difficultystatic Difficultystatic final net.minecraft.network.codec.StreamCodec<net.minecraft.network.FriendlyByteBuf, Difficulty> static Difficultystatic Difficultystatic Difficultystatic Difficultystatic Difficulty -
Constructor Summary
ConstructorsConstructorDescriptionDifficulty(int hp, int speed, int penalty, float decay, List<Modifier> modifiers, Difficulty.SweetSpot... sweetSpots) Difficulty(int hp, int speed, int penalty, float decay, List<Modifier> modifiers, List<Difficulty.SweetSpot> sweetSpots) Creates an instance of aDifficultyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionaddModifier(Modifier newModifier) addModifiers(List<Modifier> newModifier) floatdecay()Returns the value of thedecayrecord component.final booleanIndicates whether some other object is "equal to" this one.flip()final inthashCode()Returns a hash code value for this object.inthp()Returns the value of thehprecord component.Returns the value of themodifiersrecord component.moving()moving(float movingRate) intpenalty()Returns the value of thepenaltyrecord component.intspeed()Returns the value of thespeedrecord component.Returns the value of thesweetSpotsrecord component.final StringtoString()Returns a string representation of this record class.vanishing(float vanishingRate) withDecay(int decay) withHP(int hp) withPenalty(int penalty) withSpeed(int speed)
-
Field Details
-
TRASH
-
EASY
-
EASY_STONE
-
EASY_DEEP_DARK
-
EASY_DRIPSTONE
-
EASY_FROZEN
-
EASY_MIRAGE
-
EASY_MIRAGE_MOVING
-
EASY_DEEPSLATE
-
MEDIUM
-
MEDIUM_DEEP_DARK
-
MEDIUM_STONE
-
MEDIUM_DRIPSTONE
-
MEDIUM_FROZEN
-
MEDIUM_MIRAGE
-
MEDIUM_MIRAGE_MOVING
-
MEDIUM_DEEPSLATE
-
HARD
-
HARD_DEEP_DARK
-
HARD_STONE
-
HARD_DRIPSTONE
-
HARD_FROZEN
-
HARD_MIRAGE
-
HARD_MIRAGE_MOVING
-
CREEPER
-
DEEPSLATE_CRAB
-
OBSIDIAN_CRAB
-
NETHER_CRAB
-
END_CRAB
-
AURORA
-
BOREAL
-
AZURE_CRYSTALBACK_MINNOW
-
JOEL
-
SHROOMFISH
-
OASIS_SURGEON
-
WITHER
-
STONEFISH
-
DEEPSLATEFISH
-
WARD
-
VESANI
-
CERBERAY
-
CLOUDFIN
-
VOIDBITER
-
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.FriendlyByteBuf,Difficulty> STREAM_CODEC
-
-
Constructor Details
-
Difficulty
public Difficulty(int hp, int speed, int penalty, float decay, List<Modifier> modifiers, Difficulty.SweetSpot... sweetSpots) -
Difficulty
public Difficulty(int hp, int speed, int penalty, float decay, List<Modifier> modifiers, List<Difficulty.SweetSpot> sweetSpots) Creates an instance of aDifficultyrecord class.- Parameters:
hp- the value for thehprecord componentspeed- the value for thespeedrecord componentpenalty- the value for thepenaltyrecord componentdecay- the value for thedecayrecord componentmodifiers- the value for themodifiersrecord componentsweetSpots- the value for thesweetSpotsrecord component
-
-
Method Details
-
addModifiers
-
addModifier
-
withHP
-
withPenalty
-
withDecay
-
withSpeed
-
vanishing
-
vanishing
-
moving
-
moving
-
flip
-
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 '=='. -
hp
public int hp()Returns the value of thehprecord component.- Returns:
- the value of the
hprecord component
-
speed
public int speed()Returns the value of thespeedrecord component.- Returns:
- the value of the
speedrecord component
-
penalty
public int penalty()Returns the value of thepenaltyrecord component.- Returns:
- the value of the
penaltyrecord component
-
decay
public float decay()Returns the value of thedecayrecord component.- Returns:
- the value of the
decayrecord component
-
modifiers
Returns the value of themodifiersrecord component.- Returns:
- the value of the
modifiersrecord component
-
sweetSpots
Returns the value of thesweetSpotsrecord component.- Returns:
- the value of the
sweetSpotsrecord component
-