Skip to content
LIUKRAST edited this page Sep 5, 2024 · 6 revisions

FrozenLib adds many new events fired in different situations, so that other mods do not need any mixins.

AdvancementEvent

Package: net.frozenblock.lib.advancement.api

INIT

Invoked for each AdvancementHolder registered on the server. Allows modifications to them

Config event

Package: net.frozenblock.lib.config.api.registry

  • Events for listening to the save/load of a config. Consist in two classes ConfigSaveEvent & ConfigLoadEvent and their sub-classes Client for specific client only event

Frozen Entry Point

Package: net.frozenblock.lib.entrypoint.api

FrozenClientEntrypoint.EVENT

Invoked when a frozen mod is initializing the client

FrozenMainEntrypoint.EVENT

Invoked when a frozen mod is initializing

PlayerJoinEvent

Package: net.frozenblock.lib.event.api

  • A class representing the player join event.

ON_JOIN_SERVER

The event that is triggered when a player joins the server.

ON_PLAYER_ADDED_TO_LEVEL

The event that is triggered when a player joins a world.

RegistryFreezeEvent

Package: net.frozenblock.lib.event.api

START_REGISTRY_FREEZE

An event indicating the start of a Registry's freeze. The registry will not be frozen when this is invoked.

END_REGISTRY_FREEZE

An event indicating the end of a Registry's freeze. The registry will be frozen when this is invoked.

Gravity API

Package: net.frozenblock.lib.gravity.api

MODIFICATIONS

Invoked when a gravity modification is applied through GravityAPI

SurfaceRuleEvent

Package: net.frozenblock.lib.worldgen.surface.api

  • Events that allows adding surface rules to dimensions. Defined with the frozenlib:events key in fabric.mod.json. Compatible with TerraBlender.

MODIFY_OVERWORLD

Lets you modify the Surface Rules of Overworld-based world presets.

MODIFY_OVERWORLD_NO_PRELIMINARY_SURFACE

Lets you modify the Surface Rules of Overworld-based world presets without checking the preliminary surface.

MODIFY_NETHER

Lets you modify the Surface Rules of Nether-based world presets.

MODIFY_END

Lets you modify the Surface Rules of End-based world presets.

MODIFY_GENERIC

Lets you modify the Surface Rules of custom world presets.

Registry Event

Package: org.quiltmc.qsl.frozenblock.core.registry.api.event

  • Events for listening to the manipulation of Minecraft's content registries. The events are to be used for very low-level purposes, and callbacks are only called on registry manipulations occurring after the event registration. This means that mod load order can affect what is picked up by these events. For more high-level monitoring of registries, including methods to ease the inconvenience of mod load order, use RegistryMonitor. Modified to work on Fabric

getEntryAddEvent(net.minecraft.core.Registry<V>)

Gets the entry added event for a specific Minecraft registry. The event is invoked upon the addition or assignment of an entry in the specified registry. Params: registry – the Registry for this event to listen for. Must be an instance of MappedRegistry. Returns: the entry added event for the specified registry, which can have callbacks registered to it Throws: ClassCastException – if the registry is not a MappedRegistry

DYNAMIC_REGISTRY_SETUP

This event gets triggered when a new RegistryAccess gets created, but before it gets filled. This event can be used to register callbacks to dynamic registries, or to pre-fill some values. Important Note: The passed dynamic registry manager might not contain the registry, as this event is invoked for each layer of the combined registry manager, and each layer holds different registries. Use RegistryAccess.registry to prevent crashes.

DYNAMIC_REGISTRY_LOADED

This event gets triggered when a new RegistryAccess gets created, after it has been filled with the registry entries specified by data packs. This event can be used to register callbacks to dynamic registries, or to inspect values. Important Note: The passed dynamic registry manager might not contain the registry, as this event is invoked for each layer of the combined registry manager, and each layer holds different registries. Use RegistryAccess.registry to prevent crashes.

ModProtocol

Package: org.quiltmc.qsl.frozenblock.core.registry.api.sync

LOAD_MOD_PROTOCOL

Invoked when a mod protocol is loading

ResourceLoaderEvent

Package: org.quiltmc.qsl.frozenblock.resource.loader.api

  • Events related to the resource loader. Modified to work on Fabric

START_DATA_PACK_RELOAD

An event indicating the start of the reloading of data packs on a Minecraft server. This event should not be used to load resources.

END_DATA_PACK_RELOAD

An event indicating the end of the reloading of data packs on a Minecraft server. This event should not be used to load resources.