Class LabelsWorldStorage

java.lang.Object
org.cyclops.cyclopscore.persist.world.WorldStorage
org.cyclops.integrateddynamics.core.persist.world.LabelsWorldStorage
All Implemented Interfaces:
org.cyclops.cyclopscore.persist.nbt.INBTProvider

public class LabelsWorldStorage extends org.cyclops.cyclopscore.persist.world.WorldStorage
World NBT storage for variable labels. Available client- and serverside and correctly synced.
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.cyclops.cyclopscore.persist.world.WorldStorage

    org.cyclops.cyclopscore.persist.world.WorldStorage.NBTDataHolder
  • Field Summary

    Fields inherited from class org.cyclops.cyclopscore.persist.world.WorldStorage

    mod
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    protected String
     
    getInstance(org.cyclops.cyclopscore.init.ModBase mod)
     
    getLabel(int variableId)
    Get a onLabelPacket by variable id.
    void
    onPlayerLoggedIn(net.minecraftforge.event.entity.player.PlayerEvent.PlayerLoggedInEvent event)
     
    void
    put(int variableId, String label)
    Put a onLabelPacket mapping for a variable id getting a onLabelPacket.
    void
    putUnsafe(int variableId, String label)
    Put a onLabelPacket mapping for a variable id getting a onLabelPacket.
    void
    remove(int variableId)
    Remove a onLabelPacket mapping by variable id.
    void
    removeUnsafe(int variableId)
    Remove a onLabelPacket mapping by variable id.
    void
     

    Methods inherited from class org.cyclops.cyclopscore.persist.world.WorldStorage

    beforeSave, onAboutToStartEvent, onStartedEvent, onStoppingEvent, readFromNBT, readGeneratedFieldsFromNBT, writeGeneratedFieldsToNBT, writeToNBT

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getInstance

      public static LabelsWorldStorage getInstance(org.cyclops.cyclopscore.init.ModBase mod)
    • reset

      public void reset()
      Specified by:
      reset in class org.cyclops.cyclopscore.persist.world.WorldStorage
    • getDataId

      protected String getDataId()
      Specified by:
      getDataId in class org.cyclops.cyclopscore.persist.world.WorldStorage
    • putUnsafe

      public void putUnsafe(int variableId, @Nonnull String label)
      Put a onLabelPacket mapping for a variable id getting a onLabelPacket. Should only be called from within packets.
      Parameters:
      variableId - The variable id.
      label - The onLabelPacket
    • removeUnsafe

      public void removeUnsafe(int variableId)
      Remove a onLabelPacket mapping by variable id. Should only be called from within packets.
      Parameters:
      variableId - The variable id.
    • put

      public void put(int variableId, @Nonnull String label)
      Put a onLabelPacket mapping for a variable id getting a onLabelPacket.
      Parameters:
      variableId - The variable id.
      label - The onLabelPacket
    • remove

      public void remove(int variableId)
      Remove a onLabelPacket mapping by variable id.
      Parameters:
      variableId - The variable id.
    • getLabel

      public String getLabel(int variableId)
      Get a onLabelPacket by variable id.
      Parameters:
      variableId - The variable id.
      Returns:
      The corresponding variable onLabelPacket or null.
    • onPlayerLoggedIn

      public void onPlayerLoggedIn(net.minecraftforge.event.entity.player.PlayerEvent.PlayerLoggedInEvent event)
    • afterLoad

      public void afterLoad()
      Overrides:
      afterLoad in class org.cyclops.cyclopscore.persist.world.WorldStorage