Package net.nullved.pmweatherapi.storage
Interface IServerStorage<D extends IStorageData>
- All Superinterfaces:
IStorage<D>
- All Known Subinterfaces:
ISyncServerStorage<D>
- All Known Implementing Classes:
MetarServerStorage,RadarServerStorage,WSRServerStorage
The Server Storage interface.
There is a
You should only create a
IServerStorage for each dimension of a save
You should only create a
IServerStorage for a level once, instead, use PMWStorages if built-in or a custom storage handler.- Since:
- 0.15.3.3
-
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.server.level.ServerLevelgetLevel()Gets the level associated with thisIServerStorageS2CStoragePacket<? extends IClientStorage<D>> packet(net.minecraft.nbt.CompoundTag tag) Generates aS2CStoragePacketto be sent to the clientdefault voidSyncs newIStorageDatato all clientsdefault voidsyncAdd(Collection<D> datum) Syncs multiple newIStorageDatato all clientsdefault voidSyncs allIStorageDatato all playersdefault voidsyncAllToPlayer(net.minecraft.world.entity.player.Player player) Syncs allIStorageDatafrom the storage to the given playerdefault voidsyncRemove(D data) Syncs aIStorageDataremoval to all clientsdefault voidsyncRemove(net.minecraft.core.BlockPos pos) Syncs aBlockPosremoval to all clientsdefault voidsyncRemoveByData(Collection<D> datum) Syncs multipleIStorageDataremovals to all clientsdefault voidsyncRemoveByPos(Collection<net.minecraft.core.BlockPos> posList) Syncs multipleBlockPosremovals to all clientsMethods inherited from interface net.nullved.pmweatherapi.storage.IStorage
add, add, clean, getAll, getAllWithinRange, getId, getInAdjacentChunks, getInChunk, read, remove, remove, removeByData, removeByPos, save, shouldRecalculate, version
-
Method Details
-
getLevel
net.minecraft.server.level.ServerLevel getLevel()Gets the level associated with thisIServerStorage- Specified by:
getLevelin interfaceIStorage<D extends IStorageData>- Returns:
- A
ServerLevel - Since:
- 0.15.3.3
-
packet
Generates aS2CStoragePacketto be sent to the client- Parameters:
tag- TheCompoundTagto be sent- Returns:
- A
S2CStoragePacketinstance - Since:
- 0.15.3.3
-
syncAllToAll
default void syncAllToAll()Syncs allIStorageDatato all players- Since:
- 0.15.3.3
-
syncAllToPlayer
default void syncAllToPlayer(net.minecraft.world.entity.player.Player player) Syncs allIStorageDatafrom the storage to the given player- Parameters:
player- ThePlayerto sync all data to- Since:
- 0.15.3.3
-
syncAdd
Syncs newIStorageDatato all clients- Parameters:
data- The newIStorageData- Since:
- 0.15.3.3
-
syncAdd
Syncs multiple newIStorageDatato all clients- Parameters:
datum- ACollectionofIStorageDatato sync- Since:
- 0.15.3.3
-
syncRemove
default void syncRemove(net.minecraft.core.BlockPos pos) Syncs aBlockPosremoval to all clients- Parameters:
pos- TheBlockPosof the radar to remove- Since:
- 0.15.3.3
-
syncRemoveByPos
Syncs multipleBlockPosremovals to all clients- Parameters:
posList- ACollectionofBlockPosto sync- Since:
- 0.15.3.3
-
syncRemove
Syncs aIStorageDataremoval to all clients- Parameters:
data- TheIStorageDataof the radar to remove- Since:
- 0.15.3.3
-
syncRemoveByData
Syncs multipleIStorageDataremovals to all clients- Parameters:
datum- ACollectionofIStorageDatato sync- Since:
- 0.15.3.3
-