Package net.frozenblock.lib.wind.api
Interface WindManagerExtension
public interface WindManagerExtension
Used to add custom logic to the
WindManager.-
Method Summary
Modifier and TypeMethodDescriptionvoidbaseTick(net.minecraft.server.level.ServerLevel level) Runs before the regular tick method.net.minecraft.resources.ResourceLocationvoidload(net.minecraft.nbt.CompoundTag compoundTag) Loads custom data.booleanUsed to reset defined values in the rare case of an overflow.voidsave(net.minecraft.nbt.CompoundTag compoundTag) Saves custom data.net.minecraft.network.protocol.common.custom.CustomPacketPayloadsyncPacket(WindSyncPacket packet) Appends custom data to theWindSyncPacket.voidtick(net.minecraft.server.level.ServerLevel level) Runs after the baseTick method.
-
Method Details
-
extensionID
net.minecraft.resources.ResourceLocation extensionID() -
tick
void tick(net.minecraft.server.level.ServerLevel level) Runs after the baseTick method. -
baseTick
void baseTick(net.minecraft.server.level.ServerLevel level) Runs before the regular tick method. -
runResetsIfNeeded
boolean runResetsIfNeeded()Used to reset defined values in the rare case of an overflow.Please both check and trigger the resets in this method.
- Returns:
- whether a reset was needed and run.
-
syncPacket
Appends custom data to theWindSyncPacket.- Parameters:
packet- The providedWindSyncPacketto be sent to the client.- Returns:
- the updated
CustomPacketPayloadwith this extension's data.
-
load
void load(net.minecraft.nbt.CompoundTag compoundTag) Loads custom data.- Parameters:
compoundTag- TheCompoundTagto read from.
-
save
void save(net.minecraft.nbt.CompoundTag compoundTag) Saves custom data.- Parameters:
compoundTag- TheCompoundTagto write to.
-