Interface ResearchEffect
- All Known Subinterfaces:
ResearchEffectList,ValueEffectModifierEffect
- All Known Implementing Classes:
AndResearchEffect,DecreaseValueEffect,DimensionUnlockEffect,DivideValueEffect,EmptyResearchEffect,IncreaseValueEffect,ItemUnlockEffect,MultiplyValueEffect,RecipeUnlockEffect,UnlockIEMultiblockEffect
public interface ResearchEffect
A Research Effect can be used to unlock content when researching
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<ResearchEffect> static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, ResearchEffect> -
Method Summary
Modifier and TypeMethodDescriptiondefault net.minecraft.network.chat.Componentnet.minecraft.resources.ResourceLocationid()voidonLock(net.minecraft.world.level.Level level, ResearchTeam team, net.minecraft.resources.ResourceKey<Research> research) voidonUnlock(net.minecraft.world.level.Level level, ResearchTeam team, net.minecraft.resources.ResourceKey<Research> research) type()
-
Field Details
-
CODEC
-
STREAM_CODEC
static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,ResearchEffect> STREAM_CODEC
-
-
Method Details
-
onUnlock
void onUnlock(net.minecraft.world.level.Level level, ResearchTeam team, net.minecraft.resources.ResourceKey<Research> research) -
onLock
void onLock(net.minecraft.world.level.Level level, ResearchTeam team, net.minecraft.resources.ResourceKey<Research> research) Inverse ofonUnlock(net.minecraft.world.level.Level, com.portingdeadmods.researchd.api.team.ResearchTeam, net.minecraft.resources.ResourceKey<com.portingdeadmods.researchd.api.research.Research>). Called when a previously-completed research is removed, and once per non-completed research at team-creation / datapack-reload time so the default "everything blocked" state is built up incrementally rather than from a separateinitDefaultpass. -
id
net.minecraft.resources.ResourceLocation id() -
type
ResearchEffectType type() -
getTranslation
default net.minecraft.network.chat.Component getTranslation() -
getSerializer
ResearchEffectSerializer<?> getSerializer()
-