Class StudyItemListener

java.lang.Object
net.neoforged.neoforge.resource.ContextAwareReloadListener
net.minecraft.server.packs.resources.SimplePreparableReloadListener<Map<net.minecraft.resources.ResourceLocation,com.google.gson.JsonElement>>
net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener
com.minecolonies.core.datalistener.BaseDataListener<StudyItem>
com.minecolonies.core.datalistener.StudyItemListener
All Implemented Interfaces:
net.minecraft.server.packs.resources.PreparableReloadListener

public class StudyItemListener extends BaseDataListener<StudyItem>
Loads and listens to study items for the BuildingLibrary.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener

    net.minecraft.server.packs.resources.PreparableReloadListener.PreparationBarrier
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final StudyItemListener
    Singleton instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected @NotNull MappingResult<StudyItem>
    mapEntry(net.minecraft.resources.ResourceLocation key, com.google.gson.JsonObject object)
    Parsed an individual entry from it's input json element.

    Methods inherited from class com.minecolonies.core.datalistener.BaseDataListener

    apply, getEntries

    Methods inherited from class net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener

    getPreparedPath, prepare, scanDirectory

    Methods inherited from class net.minecraft.server.packs.resources.SimplePreparableReloadListener

    reload

    Methods inherited from class net.neoforged.neoforge.resource.ContextAwareReloadListener

    getContext, getRegistryLookup, injectContext, makeConditionalOps

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener

    getName
  • Field Details

  • Method Details

    • mapEntry

      @NotNull protected @NotNull MappingResult<StudyItem> mapEntry(net.minecraft.resources.ResourceLocation key, com.google.gson.JsonObject object)
      Description copied from class: BaseDataListener
      Parsed an individual entry from it's input json element.
      Specified by:
      mapEntry in class BaseDataListener<StudyItem>
      Parameters:
      key - the resource key.
      object - the resource value.
      Returns:
      the mapping result.