Interface Research
- All Known Implementing Classes:
SimpleResearch
public interface Research
Most basic researchPack, providing functionality and data for both displaying and researchPack logic
The default researchPack implementation is SimpleResearch
which implements the methods listed here and should be suitable for most use-cases.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<Research> static final com.mojang.serialization.Codec<net.minecraft.resources.ResourceKey<Research>> static final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf, net.minecraft.resources.ResourceKey<Research>> static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, Research> -
Method Summary
Modifier and TypeMethodDescriptionstatic net.minecraft.network.chat.ComponentgetLangDesc(net.minecraft.resources.ResourceKey<Research> key) static net.minecraft.network.chat.ComponentgetLangName(net.minecraft.resources.ResourceKey<Research> key) parents()booleandefault net.minecraft.resources.ResourceLocation
-
Field Details
-
CODEC
-
STREAM_CODEC
static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,Research> STREAM_CODEC -
RESOURCE_KEY_CODEC
static final com.mojang.serialization.Codec<net.minecraft.resources.ResourceKey<Research>> RESOURCE_KEY_CODEC -
RESOURCE_KEY_STREAM_CODEC
static final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf,net.minecraft.resources.ResourceKey<Research>> RESOURCE_KEY_STREAM_CODEC
-
-
Method Details
-
researchIcon
ResearchIcon researchIcon()- Returns:
- The researchPack icon of this researchPack
-
researchMethod
ResearchMethod researchMethod()- Returns:
- The researchPack method that is required for this researchPack to be completed
-
researchEffect
ResearchEffect researchEffect()- Returns:
- The researchPack effect that happens after the researchPack is completed
-
parents
- Returns:
- A
ListofResourceKeypointing to the parent researchPacks of this researchPack
-
requiresParent
boolean requiresParent()- Returns:
- whether the parent researchPacks need to be completed to start this researchPack
-
researchPage
default net.minecraft.resources.ResourceLocation researchPage()- Returns:
- The
ResourceLocationid of the researchPack page this researchPack belongs to. Only root researches (without parents) should explicitly define this. Child researches inherit the page from their parents. Defaults toResearchPage.DEFAULT_PAGE_ID
-
getSerializer
ResearchSerializer<?> getSerializer()- Returns:
- serializer providing typed codecs for the Research
-
getLangName
static net.minecraft.network.chat.Component getLangName(net.minecraft.resources.ResourceKey<Research> key) -
getLangDesc
static net.minecraft.network.chat.Component getLangDesc(net.minecraft.resources.ResourceKey<Research> key)
-