Class RarityCountRestriction
java.lang.Object
com.wdiscute.starcatcher.registry.fishrestrictions.AbstractFishRestriction
com.wdiscute.starcatcher.registry.fishrestrictions.RarityCountRestriction
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.wdiscute.starcatcher.registry.fishrestrictions.AbstractFishRestriction
AbstractFishRestriction.Context -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<RarityCountRestriction> Fields inherited from class com.wdiscute.starcatcher.registry.fishrestrictions.AbstractFishRestriction
ABSTRACT_PROCESSOR_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionRarityCountRestriction(RarityCountRestriction.RarityCount... rarityCount) RarityCountRestriction(List<RarityCountRestriction.RarityCount> rarityCount, String translationOverride) -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<? extends AbstractFishRestriction> codec()net.minecraft.network.chat.ComponentgetDescription(net.minecraft.world.level.Level level, FishProperties fp, @NotNull net.minecraft.world.entity.player.Player player, AbstractFishRestriction.Context context) intgetFishChance(int currentChance, net.minecraft.world.level.Level level, FishProperties trophyFp, @NotNull net.minecraft.world.entity.Entity entity1, net.minecraft.world.item.ItemStack rod, AbstractFishRestriction.Context context) List<net.minecraft.network.chat.Component> getHover(net.minecraft.world.level.Level level, FishProperties fp, @NotNull net.minecraft.world.entity.player.Player player, AbstractFishRestriction.Context context) List<net.minecraft.network.chat.Component> getIndexHover(net.minecraft.world.level.Level level, FishProperties fp, @NotNull net.minecraft.world.entity.player.Player player, AbstractFishRestriction.Context context) net.neoforged.neoforge.registries.DeferredHolder<AbstractFishRestriction, AbstractFishRestriction> booleanisRarityCountRequirementMet(RarityCountRestriction.RarityCount rarityCount, net.minecraft.world.entity.Entity entity, Map<net.minecraft.resources.ResourceLocation, FishCaughtCounter> fishesCaught) Methods inherited from class com.wdiscute.starcatcher.registry.fishrestrictions.AbstractFishRestriction
getBlacklist, getCodecOrThrow, getRegistryHolderOrThrow, isEnabled, render
-
Field Details
-
CODEC
-
-
Constructor Details
-
RarityCountRestriction
public RarityCountRestriction() -
RarityCountRestriction
-
RarityCountRestriction
public RarityCountRestriction(List<RarityCountRestriction.RarityCount> rarityCount, String translationOverride)
-
-
Method Details
-
getRarityCount
-
getTranslationOverride
-
codec
- Specified by:
codecin classAbstractFishRestriction
-
getRegistryHolder
public net.neoforged.neoforge.registries.DeferredHolder<AbstractFishRestriction,AbstractFishRestriction> getRegistryHolder()- Specified by:
getRegistryHolderin classAbstractFishRestriction
-
getFishChance
public int getFishChance(int currentChance, net.minecraft.world.level.Level level, FishProperties trophyFp, @NotNull @NotNull net.minecraft.world.entity.Entity entity1, net.minecraft.world.item.ItemStack rod, AbstractFishRestriction.Context context) - Specified by:
getFishChancein classAbstractFishRestriction
-
isRarityCountRequirementMet
public boolean isRarityCountRequirementMet(RarityCountRestriction.RarityCount rarityCount, net.minecraft.world.entity.Entity entity, Map<net.minecraft.resources.ResourceLocation, FishCaughtCounter> fishesCaught) -
getIndexHover
public List<net.minecraft.network.chat.Component> getIndexHover(net.minecraft.world.level.Level level, FishProperties fp, @NotNull @NotNull net.minecraft.world.entity.player.Player player, AbstractFishRestriction.Context context) - Overrides:
getIndexHoverin classAbstractFishRestriction
-
getDescription
public net.minecraft.network.chat.Component getDescription(net.minecraft.world.level.Level level, FishProperties fp, @NotNull @NotNull net.minecraft.world.entity.player.Player player, AbstractFishRestriction.Context context) - Overrides:
getDescriptionin classAbstractFishRestriction
-
getHover
public List<net.minecraft.network.chat.Component> getHover(net.minecraft.world.level.Level level, FishProperties fp, @NotNull @NotNull net.minecraft.world.entity.player.Player player, AbstractFishRestriction.Context context) - Overrides:
getHoverin classAbstractFishRestriction
-