Record Class FishProperties.CatchInfo
java.lang.Object
java.lang.Record
com.wdiscute.starcatcher.registry.FishProperties.CatchInfo
- Enclosing class:
FishProperties
public static record FishProperties.CatchInfo(net.minecraft.core.Holder<net.minecraft.world.item.Item> fish, net.minecraft.core.Holder<net.minecraft.world.item.Item> bucketedFish, net.minecraft.core.Holder<net.minecraft.world.entity.EntityType<?>> entityToSpawn, boolean alwaysSpawnEntity, net.minecraft.core.Holder<net.minecraft.world.item.Item> overrideMinigameWith, net.minecraft.world.item.ItemStack treasureIs, FishProperties.CatchInfo.FishEntryType fishEntryType)
extends Record
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<FishProperties.CatchInfo> static final FishProperties.CatchInfostatic final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, FishProperties.CatchInfo> static final FishProperties.CatchInfo -
Constructor Summary
ConstructorsConstructorDescriptionCatchInfo(net.minecraft.core.Holder<net.minecraft.world.item.Item> fish, net.minecraft.core.Holder<net.minecraft.world.item.Item> bucketedFish, net.minecraft.core.Holder<net.minecraft.world.entity.EntityType<?>> entityToSpawn, boolean alwaysSpawnEntity, net.minecraft.core.Holder<net.minecraft.world.item.Item> overrideMinigameWith, net.minecraft.world.item.ItemStack treasureIs, FishProperties.CatchInfo.FishEntryType fishEntryType) Creates an instance of aCatchInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thealwaysSpawnEntityrecord component.net.minecraft.core.Holder<net.minecraft.world.item.Item> Returns 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.net.minecraft.core.Holder<net.minecraft.world.item.Item> fish()Returns the value of thefishrecord component.Returns the value of thefishEntryTyperecord component.final inthashCode()Returns a hash code value for this object.net.minecraft.core.Holder<net.minecraft.world.item.Item> Returns the value of theoverrideMinigameWithrecord component.final StringtoString()Returns a string representation of this record class.net.minecraft.world.item.ItemStackReturns the value of thetreasureIsrecord component.withItemToOverrideWith(net.minecraft.core.Holder<net.minecraft.world.item.Item> itemToOverrideWith)
-
Field Details
-
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, FishProperties.CatchInfo> STREAM_CODEC -
DEFAULT
-
VANILLA
-
-
Constructor Details
-
CatchInfo
public CatchInfo(net.minecraft.core.Holder<net.minecraft.world.item.Item> fish, net.minecraft.core.Holder<net.minecraft.world.item.Item> bucketedFish, net.minecraft.core.Holder<net.minecraft.world.entity.EntityType<?>> entityToSpawn, boolean alwaysSpawnEntity, net.minecraft.core.Holder<net.minecraft.world.item.Item> overrideMinigameWith, net.minecraft.world.item.ItemStack treasureIs, FishProperties.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 componenttreasureIs- the value for thetreasureIsrecord componentfishEntryType- the value for thefishEntryTyperecord component
-
-
Method Details
-
withItemToOverrideWith
public FishProperties.CatchInfo withItemToOverrideWith(net.minecraft.core.Holder<net.minecraft.world.item.Item> itemToOverrideWith) -
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
fish
public net.minecraft.core.Holder<net.minecraft.world.item.Item> fish()Returns the value of thefishrecord component.- Returns:
- the value of the
fishrecord component
-
bucketedFish
public net.minecraft.core.Holder<net.minecraft.world.item.Item> 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 net.minecraft.core.Holder<net.minecraft.world.item.Item> overrideMinigameWith()Returns the value of theoverrideMinigameWithrecord component.- Returns:
- the value of the
overrideMinigameWithrecord component
-
treasureIs
public net.minecraft.world.item.ItemStack treasureIs()Returns the value of thetreasureIsrecord component.- Returns:
- the value of the
treasureIsrecord component
-
fishEntryType
Returns the value of thefishEntryTyperecord component.- Returns:
- the value of the
fishEntryTyperecord component
-