Package com.wdiscute.starcatcher.fish
Record Class CatchInfo
java.lang.Object
java.lang.Record
com.wdiscute.starcatcher.fish.CatchInfo
public record CatchInfo(com.wdiscute.utils.MaybeStack fish, com.wdiscute.utils.MaybeStack bucketedFish, net.minecraft.core.Holder<net.minecraft.world.entity.EntityType<?>> entityToSpawn, boolean alwaysSpawnEntity, com.wdiscute.utils.MaybeStack overrideMinigameWith, CatchInfo.FishEntryType fishEntryType)
extends Record
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCatchInfo(com.wdiscute.utils.MaybeStack fish, com.wdiscute.utils.MaybeStack bucketedFish, net.minecraft.core.Holder<net.minecraft.world.entity.EntityType<?>> entityToSpawn, boolean alwaysSpawnEntity, com.wdiscute.utils.MaybeStack overrideMinigameWith, CatchInfo.FishEntryType fishEntryType) Creates an instance of aCatchInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thealwaysSpawnEntityrecord component.com.wdiscute.utils.MaybeStackReturns the value of thebucketedFishrecord component.net.minecraft.core.Holder<net.minecraft.world.entity.EntityType<?>> Returns the value of theentityToSpawnrecord component.final booleanIndicates whether some other object is "equal to" this one.com.wdiscute.utils.MaybeStackfish()Returns the value of thefishrecord component.Returns the value of thefishEntryTyperecord component.final inthashCode()Returns a hash code value for this object.com.wdiscute.utils.MaybeStackReturns the value of theoverrideMinigameWithrecord component.final StringtoString()Returns a string representation of this record class.withBucket(com.wdiscute.utils.MaybeStack bucket) withEntityToSpawn(net.minecraft.core.Holder<net.minecraft.world.entity.EntityType<?>> entityToSpawn) withFish(com.wdiscute.utils.MaybeStack fish) withItemToOverrideWith(com.wdiscute.utils.MaybeStack itemToOverrideWith)
-
Field Details
-
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,CatchInfo> STREAM_CODEC -
DEFAULT
-
-
Constructor Details
-
CatchInfo
public CatchInfo(com.wdiscute.utils.MaybeStack fish, com.wdiscute.utils.MaybeStack bucketedFish, net.minecraft.core.Holder<net.minecraft.world.entity.EntityType<?>> entityToSpawn, boolean alwaysSpawnEntity, com.wdiscute.utils.MaybeStack overrideMinigameWith, CatchInfo.FishEntryType fishEntryType) Creates an instance of aCatchInforecord class.- Parameters:
fish- the value for thefishrecord componentbucketedFish- the value for thebucketedFishrecord componententityToSpawn- the value for theentityToSpawnrecord componentalwaysSpawnEntity- the value for thealwaysSpawnEntityrecord componentoverrideMinigameWith- the value for theoverrideMinigameWithrecord componentfishEntryType- the value for thefishEntryTyperecord component
-
-
Method Details
-
withFish
-
withBucket
-
withEntityToSpawn
public CatchInfo withEntityToSpawn(net.minecraft.core.Holder<net.minecraft.world.entity.EntityType<?>> entityToSpawn) -
withAlwaysSpawnEntity
-
withFishType
-
withItemToOverrideWith
-
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 '=='. -
fish
public com.wdiscute.utils.MaybeStack fish()Returns the value of thefishrecord component.- Returns:
- the value of the
fishrecord component
-
bucketedFish
public com.wdiscute.utils.MaybeStack bucketedFish()Returns the value of thebucketedFishrecord component.- Returns:
- the value of the
bucketedFishrecord component
-
entityToSpawn
public net.minecraft.core.Holder<net.minecraft.world.entity.EntityType<?>> entityToSpawn()Returns the value of theentityToSpawnrecord component.- Returns:
- the value of the
entityToSpawnrecord component
-
alwaysSpawnEntity
public boolean alwaysSpawnEntity()Returns the value of thealwaysSpawnEntityrecord component.- Returns:
- the value of the
alwaysSpawnEntityrecord component
-
overrideMinigameWith
public com.wdiscute.utils.MaybeStack overrideMinigameWith()Returns the value of theoverrideMinigameWithrecord component.- Returns:
- the value of the
overrideMinigameWithrecord component
-
fishEntryType
Returns the value of thefishEntryTyperecord component.- Returns:
- the value of the
fishEntryTyperecord component
-