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 TypeMethodDescriptionvoidprotected Stringstatic LabelsWorldStoragegetInstance(org.cyclops.cyclopscore.init.ModBase mod) getLabel(int variableId) Get a onLabelPacket by variable id.voidonPlayerLoggedIn(net.minecraftforge.event.entity.player.PlayerEvent.PlayerLoggedInEvent event) voidPut a onLabelPacket mapping for a variable id getting a onLabelPacket.voidPut a onLabelPacket mapping for a variable id getting a onLabelPacket.voidremove(int variableId) Remove a onLabelPacket mapping by variable id.voidremoveUnsafe(int variableId) Remove a onLabelPacket mapping by variable id.voidreset()Methods inherited from class org.cyclops.cyclopscore.persist.world.WorldStorage
beforeSave, onAboutToStartEvent, onStartedEvent, onStoppingEvent, readFromNBT, readGeneratedFieldsFromNBT, writeGeneratedFieldsToNBT, writeToNBT
-
Method Details
-
getInstance
-
reset
public void reset()- Specified by:
resetin classorg.cyclops.cyclopscore.persist.world.WorldStorage
-
getDataId
- Specified by:
getDataIdin classorg.cyclops.cyclopscore.persist.world.WorldStorage
-
putUnsafe
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
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
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:
afterLoadin classorg.cyclops.cyclopscore.persist.world.WorldStorage
-