Package net.nullved.pmweatherapi.storage
Interface IStorage<D extends IStorageData>
- All Known Subinterfaces:
IClientStorage<D>,IServerStorage<D>,ISyncServerStorage<D>
- All Known Implementing Classes:
MetarClientStorage,MetarServerStorage,MetarStorage,PMWStorage,RadarClientStorage,RadarServerStorage,RadarStorage,WSRClientStorage,WSRServerStorage,WSRStorage
public interface IStorage<D extends IStorageData>
The interface defining a Storage such as
On the server-side, there is a
To add or remove
Optionally, Storages can be numerically versioned, however, you must write you own version mismatch handler
For method definitions, see
RadarStorage
On the server-side, there is a
IServerStorage for each dimension of a world.
On the client-side, there is one IClientStorage for each player on a world.
To add or remove
BlockPos, use add(D) and remove(D).
To get all BlockPos use getAll() or getInChunk(ChunkPos)
Optionally, Storages can be numerically versioned, however, you must write you own version mismatch handler
For method definitions, see
PMWStorage- Since:
- 0.15.3.3
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidvoidadd(Collection<D> datum) voidclean()voidvoidforAllWithinRange(net.minecraft.core.BlockPos base, double radius, Consumer<D> consumer) voidforInAdjacentChunks(net.minecraft.world.level.ChunkPos pos, Consumer<D> consumer) voidforInChunk(net.minecraft.world.level.ChunkPos pos, Consumer<D> consumer) getAll()getAllWithinRange(net.minecraft.core.BlockPos base, double radius) net.minecraft.resources.ResourceLocationgetId()getInAdjacentChunks(net.minecraft.world.level.ChunkPos pos) getInChunk(net.minecraft.world.level.ChunkPos pos) net.minecraft.world.level.LevelgetLevel()voidread()voidvoidremove(net.minecraft.core.BlockPos pos) voidremoveByData(Collection<D> datum) voidremoveByPos(Collection<net.minecraft.core.BlockPos> pos) net.minecraft.nbt.CompoundTagsave(net.minecraft.nbt.CompoundTag tag) booleanshouldRecalculate(net.minecraft.world.level.ChunkPos pos) intversion()
-
Method Details
-
getLevel
net.minecraft.world.level.Level getLevel() -
getId
net.minecraft.resources.ResourceLocation getId() -
version
int version() -
clean
void clean() -
getAll
-
getAllWithinRange
-
getInChunk
-
getInAdjacentChunks
-
forAll
-
forAllWithinRange
-
forInChunk
-
forInAdjacentChunks
-
shouldRecalculate
boolean shouldRecalculate(net.minecraft.world.level.ChunkPos pos) -
add
-
add
-
remove
-
removeByData
-
remove
void remove(net.minecraft.core.BlockPos pos) -
removeByPos
-
save
net.minecraft.nbt.CompoundTag save(net.minecraft.nbt.CompoundTag tag) -
read
void read()
-