Package com.wdiscute.starcatcher.io
Record Class FishCaughtCounter
java.lang.Object
java.lang.Record
com.wdiscute.starcatcher.io.FishCaughtCounter
public record FishCaughtCounter(int count, int fastestTicks, float averageTicks, int size, int weight, float percentile, long firstCatch, boolean caughtGolden, boolean perfectCatch, boolean hasGuideNotification)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<FishCaughtCounter> static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, FishCaughtCounter> -
Constructor Summary
ConstructorsConstructorDescriptionFishCaughtCounter(int count, int fastestTicks, float averageTicks, int size, int weight, float percentile, long firstCatch, boolean caughtGolden, boolean perfectCatch, boolean hasGuideNotification) Creates an instance of aFishCaughtCounterrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatReturns the value of theaverageTicksrecord component.static voidawardFishCaughtCounter(FishProperties fpCaught, net.minecraft.resources.ResourceLocation rl, net.minecraft.world.entity.player.Player player, int ticks, int size, int weight, float percentile, boolean perfectCatch, boolean awardToTeam, boolean golden) static voidawardFishCaughtCounter(FishProperties fpCaught, net.minecraft.world.entity.player.Player player, int ticks, int size, int weight, float percentile, boolean perfectCatch, boolean awardToTeam, boolean golden) static booleancanCatchGolden(FishProperties fp, net.minecraft.server.level.ServerPlayer player) booleanReturns the value of thecaughtGoldenrecord component.intcount()Returns the value of thecountrecord component.static FishCaughtCountercreate(int ticks, int size, int weight, float percentile, boolean perfectCatch, boolean golden, boolean hasGuideNotification) static FishCaughtCounterfinal booleanIndicates whether some other object is "equal to" this one.intReturns the value of thefastestTicksrecord component.longReturns the value of thefirstCatchrecord component.static FishCaughtCounterget(net.minecraft.world.entity.player.Player player, FishProperties loc) static FishCaughtCounterget(net.minecraft.world.entity.player.Player player, net.minecraft.resources.ResourceLocation loc) getUpdated(int ticks, int size, int weight, float percentile, boolean perfectCatch, boolean goldenCatch, boolean hasGuideNotification) booleanReturns the value of thehasGuideNotificationrecord component.final inthashCode()Returns a hash code value for this object.floatReturns the value of thepercentilerecord component.booleanReturns the value of theperfectCatchrecord component.intsize()Returns the value of thesizerecord component.final StringtoString()Returns a string representation of this record class.intweight()Returns the value of theweightrecord component.
-
Field Details
-
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,FishCaughtCounter> STREAM_CODEC
-
-
Constructor Details
-
FishCaughtCounter
public FishCaughtCounter(int count, int fastestTicks, float averageTicks, int size, int weight, float percentile, long firstCatch, boolean caughtGolden, boolean perfectCatch, boolean hasGuideNotification) Creates an instance of aFishCaughtCounterrecord class.- Parameters:
count- the value for thecountrecord componentfastestTicks- the value for thefastestTicksrecord componentaverageTicks- the value for theaverageTicksrecord componentsize- the value for thesizerecord componentweight- the value for theweightrecord componentpercentile- the value for thepercentilerecord componentfirstCatch- the value for thefirstCatchrecord componentcaughtGolden- the value for thecaughtGoldenrecord componentperfectCatch- the value for theperfectCatchrecord componenthasGuideNotification- the value for thehasGuideNotificationrecord component
-
-
Method Details
-
get
public static FishCaughtCounter get(net.minecraft.world.entity.player.Player player, FishProperties loc) -
get
public static FishCaughtCounter get(net.minecraft.world.entity.player.Player player, net.minecraft.resources.ResourceLocation loc) -
createHacked
-
canCatchGolden
public static boolean canCatchGolden(FishProperties fp, net.minecraft.server.level.ServerPlayer player) -
removeNotification
-
create
@Nonnull public static FishCaughtCounter create(int ticks, int size, int weight, float percentile, boolean perfectCatch, boolean golden, boolean hasGuideNotification) -
getUpdated
public FishCaughtCounter getUpdated(int ticks, int size, int weight, float percentile, boolean perfectCatch, boolean goldenCatch, boolean hasGuideNotification) -
awardFishCaughtCounter
public static void awardFishCaughtCounter(FishProperties fpCaught, net.minecraft.world.entity.player.Player player, int ticks, int size, int weight, float percentile, boolean perfectCatch, boolean awardToTeam, boolean golden) -
awardFishCaughtCounter
public static void awardFishCaughtCounter(FishProperties fpCaught, net.minecraft.resources.ResourceLocation rl, net.minecraft.world.entity.player.Player player, int ticks, int size, int weight, float percentile, boolean perfectCatch, boolean awardToTeam, boolean golden) -
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 '=='. -
count
public int count()Returns the value of thecountrecord component.- Returns:
- the value of the
countrecord component
-
fastestTicks
public int fastestTicks()Returns the value of thefastestTicksrecord component.- Returns:
- the value of the
fastestTicksrecord component
-
averageTicks
public float averageTicks()Returns the value of theaverageTicksrecord component.- Returns:
- the value of the
averageTicksrecord component
-
size
public int size()Returns the value of thesizerecord component.- Returns:
- the value of the
sizerecord component
-
weight
public int weight()Returns the value of theweightrecord component.- Returns:
- the value of the
weightrecord component
-
percentile
public float percentile()Returns the value of thepercentilerecord component.- Returns:
- the value of the
percentilerecord component
-
firstCatch
public long firstCatch()Returns the value of thefirstCatchrecord component.- Returns:
- the value of the
firstCatchrecord component
-
caughtGolden
public boolean caughtGolden()Returns the value of thecaughtGoldenrecord component.- Returns:
- the value of the
caughtGoldenrecord component
-
perfectCatch
public boolean perfectCatch()Returns the value of theperfectCatchrecord component.- Returns:
- the value of the
perfectCatchrecord component
-
hasGuideNotification
public boolean hasGuideNotification()Returns the value of thehasGuideNotificationrecord component.- Returns:
- the value of the
hasGuideNotificationrecord component
-