Package net.nullved.pmweatherapi.radar
Class RadarServerStorage
java.lang.Object
net.nullved.pmweatherapi.radar.RadarStorage
net.nullved.pmweatherapi.radar.RadarServerStorage
A Radar Storage for the server side.
There is a
You should not create a
RadarServerStorage for each dimension of a save
You should not create a
RadarServerStorage, instead, use PMWStorages.getRadar(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level>).- Since:
- 0.14.15.3
-
Constructor Summary
ConstructorsConstructorDescriptionRadarServerStorage(net.minecraft.server.level.ServerLevel level) DO NOT CALL THIS CONSTRUCTOR!!!
Get a radar storage fromPMWStorages.getRadar(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level>) -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.server.level.ServerLevelgetLevel()Gets the level associated with thisRadarServerStoragevoidsyncAdd(Collection<net.minecraft.core.BlockPos> posList) Syncs multiple new radars to all clientsvoidsyncAdd(net.minecraft.core.BlockPos pos) Syncs a new radar to all clientsvoidsyncAllToPlayer(net.minecraft.world.entity.player.Player player) Syncs all radars to the given playervoidsyncRemove(Collection<net.minecraft.core.BlockPos> posList) Syncs multiple radar removals to all clientsvoidsyncRemove(net.minecraft.core.BlockPos pos) Syncs a radar removal to all clientsMethods inherited from class net.nullved.pmweatherapi.radar.RadarStorage
addRadar, addRadars, getAllRadars, getRadarsInChunk, read, removeRadar, removeRadars, save, shouldRecalculate
-
Constructor Details
-
RadarServerStorage
public RadarServerStorage(net.minecraft.server.level.ServerLevel level) DO NOT CALL THIS CONSTRUCTOR!!!
Get a radar storage fromPMWStorages.getRadar(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level>)- Parameters:
level- The level to create this storage for- Since:
- 0.14.15.3
-
-
Method Details
-
getLevel
public net.minecraft.server.level.ServerLevel getLevel()Gets the level associated with thisRadarServerStorage- Specified by:
getLevelin classRadarStorage- Returns:
- A
ServerLevel - Since:
- 0.14.15.3
-
syncAllToPlayer
public void syncAllToPlayer(net.minecraft.world.entity.player.Player player) Syncs all radars to the given player- Parameters:
player- ThePlayerto sync all radars to- Since:
- 0.14.15.3
-
syncAdd
public void syncAdd(net.minecraft.core.BlockPos pos) Syncs a new radar to all clients- Parameters:
pos- TheBlockPosof the new radar- Since:
- 0.14.15.3
-
syncAdd
Syncs multiple new radars to all clients- Parameters:
posList- ACollectionofBlockPosto sync- Since:
- 0.14.15.3
-
syncRemove
public void syncRemove(net.minecraft.core.BlockPos pos) Syncs a radar removal to all clients- Parameters:
pos- TheBlockPosof the radar to remove- Since:
- 0.14.15.3
-
syncRemove
Syncs multiple radar removals to all clients- Parameters:
posList- ACollectionofBlockPosto sync- Since:
- 0.14.15.3
-