Package com.minecolonies.api.research
Interface IResearchEffect
- All Known Implementing Classes:
GlobalResearchEffect
public interface IResearchEffect
The effect of research.
-
Method Summary
Modifier and TypeMethodDescriptiondoubleGet the absolute effect of the research.net.minecraft.resources.ResourceLocationgetId()Getter for the ID of the effect.net.minecraft.network.chat.contents.TranslatableContentsgetName()Human-readable effect description, or a translation key.Get theModResearchEffects.ResearchEffectEntryfor this Research Effect.net.minecraft.network.chat.contents.TranslatableContentsHuman-readable effect subtitle description, or a translation key.booleanoverrides(@NotNull IResearchEffect other) Does this effect override another effect with the same id?net.minecraft.nbt.CompoundTagWrite the ResearchEffect's traits to NBT, to simplify serialization for client-viewable data.
-
Method Details
-
getRegistryEntry
ModResearchEffects.ResearchEffectEntry getRegistryEntry()Get theModResearchEffects.ResearchEffectEntryfor this Research Effect.- Returns:
- a registry entry.
-
getId
net.minecraft.resources.ResourceLocation getId()Getter for the ID of the effect.- Returns:
- the effect id as a ResourceLocation.
-
getName
net.minecraft.network.chat.contents.TranslatableContents getName()Human-readable effect description, or a translation key.- Returns:
- the desc.
-
getSubtitle
net.minecraft.network.chat.contents.TranslatableContents getSubtitle()Human-readable effect subtitle description, or a translation key.- Returns:
- the Subtitle desc.
-
getEffect
double getEffect()Get the absolute effect of the research.- Returns:
- the effect.
-
overrides
Does this effect override another effect with the same id?- Parameters:
other- the effect to check.- Returns:
- true if so, generally meaning a higher magnitude effect.
-
writeToNBT
net.minecraft.nbt.CompoundTag writeToNBT()Write the ResearchEffect's traits to NBT, to simplify serialization for client-viewable data.- Returns:
- an NBT file containing at least the necessary traits to reassemble user-visible traits of the effect.
-