### Register Fabric After Setup Event Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/README.md Register event listeners for the Fabric after setup event. This event is client-only. ```javascript FabricAddedEvents.afterSetup(event => { console.log('After Setup event fired!'); console.log(event); }); ``` -------------------------------- ### FabricEventsJS.AFTER_SETUP Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/fabric/index-all.html A static variable indicating an event that occurs after the initial setup phase. ```APIDOC ## FabricEventsJS.AFTER_SETUP ### Description Represents an event that fires after the initial setup phase of rendering. ### Method N/A (Static variable) ### Endpoint N/A ### Parameters None ### Request Example None ### Response N/A (Constant value) ``` -------------------------------- ### Register Fabric Start Render Event Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/README.md Register event listeners for the Fabric start render event. This event is client-only. ```javascript FabricAddedEvents.startRender(event => { console.log('Start Render event fired!'); console.log(event); }); ``` -------------------------------- ### WorldRenderContextEventJS afterSetupHandle Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/fabric/pie/ilikepiefoo/fabric/events/worldrender/WorldRenderContextEventJS.html Called after view Frustum is computed and all render chunks to be rendered are identified and rebuilt but before chunks are uploaded to GPU. Use for setup of state that depends on view frustum. ```java public static void afterSetupHandle(net.fabricmc.fabric.api.client.rendering.v1.WorldRenderContext context) ``` -------------------------------- ### startHandler Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/fabric/pie/ilikepiefoo/fabric/events/sleep/SleepingEventJS.html Called when an entity starts to sleep. ```APIDOC ## startHandler ### Description Called when an entity starts to sleep. ### Method static void ### Parameters * **entity** (net.minecraft.world.entity.LivingEntity) - The sleeping entity. * **sleepingPos** (net.minecraft.core.BlockPos) - The sleeping position of the entity. ``` -------------------------------- ### getBedState Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/fabric/pie/ilikepiefoo/fabric/events/sleep/SetBedOccupationStateEventJS.html Gets the block state of the bed. ```APIDOC ## getBedState ### Description Gets the block state of the bed. ### Method ``` public net.minecraft.world.level.block.state.BlockState getBedState() ``` ### Returns * (net.minecraft.world.level.block.state.BlockState) - The block state of the bed. ``` -------------------------------- ### WorldRenderContextEventJS startHandle Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/fabric/pie/ilikepiefoo/fabric/events/worldrender/WorldRenderContextEventJS.html Called before world rendering executes. Use this event instead of injecting to the HEAD of LevelRenderer.renderLevel to avoid compatibility problems. Use for setup of state that is needed during the world render call that does not depend on the view frustum. ```java public static void startHandle(net.fabricmc.fabric.api.client.rendering.v1.WorldRenderContext context) ``` -------------------------------- ### Register Fabric Event Listener Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/README.md Registers a Fabric event for listening. This setup runs at startup and requires a server restart to modify. ```javascript const SERVER_MESSAGES = Java.loadClass('net.fabricmc.fabric.api.message.v1.ServerMessageEvents'); FabricEvents.registry(event => { event.register('chat messages', SERVER_MESSAGES, 'CHAT_MESSAGE'); }); ``` -------------------------------- ### Register Architectury Event Listener Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/README.md Registers a common Architectury event for listening. This setup runs at startup and requires a server restart to modify. ```javascript const LIFE_CYCLE_EVENTS = Java.loadClass('dev.architectury.event.events.common.LifecycleEvent'); ArchEvents.registry(event => { event.register('server starting', LIFE_CYCLE_EVENTS, 'SERVER_BEFORE_START'); }); ``` -------------------------------- ### handler Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/fabric/pie/ilikepiefoo/fabric/events/sleep/AllowSleepingEventJS.html Checks whether a player can start sleeping in a bed-like block. Returns null if the player can sleep, or a failure reason if they cannot. ```APIDOC ## handler ### Description Checks whether a player can start sleeping in a bed-like block. ### Method static net.minecraft.world.entity.player.Player.BedSleepingProblem ### Parameters * **player** (net.minecraft.world.entity.player.Player) - The sleeping player. * **sleepingPos** (net.minecraft.core.BlockPos) - The future sleeping position of the entity. ### Returns `null` if the player can sleep, or a failure reason if they cannot. ### See Also * `Player.startSleepInBed(BlockPos)` ``` -------------------------------- ### initStartup Method Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/common/pie/ilikepiefoo/AdditionsPlugin.html Initializes the startup sequence for the plugin. This method overrides the one from the parent KubeJSPlugin class. ```APIDOC ## initStartup() ### Description Initializes the startup sequence for the plugin. This method overrides the one from the parent KubeJSPlugin class. ### Method `public void initStartup()` ### Overrides `initStartup` in class `dev.latvian.mods.kubejs.KubeJSPlugin` ``` -------------------------------- ### FabricPlugin.initStartup() Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/fabric/index-all.html Handles the startup initialization for the Fabric plugin. This method is part of the plugin's lifecycle management. ```APIDOC ## initStartup() ### Description Handles the startup initialization for the Fabric plugin. ### Method Instance Method ### Endpoint N/A (Method Call) ### Parameters None ### Request Example ```java fabricPluginInstance.initStartup(); ``` ### Response N/A ``` -------------------------------- ### Register Fabric Start Sleeping Event Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/README.md Register event listeners for the Fabric start sleeping event. This event is server-only. ```javascript FabricAddedEvents.startSleeping(event => { console.log('Start Sleeping event fired!'); console.log(event); }); ``` -------------------------------- ### initStartup() Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/fabric/pie/ilikepiefoo/fabric/FabricPlugin.html Initializes the startup process for the Fabric plugin. This method overrides the initStartup method from the parent KubeJSPlugin class. ```APIDOC ## initStartup() ### Description Initializes the startup process for the Fabric plugin. This method overrides the initStartup method from the parent KubeJSPlugin class. ### Method `void initStartup()` ### Overrides `initStartup` in class `dev.latvian.mods.kubejs.KubeJSPlugin` ``` -------------------------------- ### EventHandler Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/common/pie/ilikepiefoo/EventHandler.html Initializes the event handling system. This method should be called during the server startup process. ```APIDOC ## init ### Description Initializes the event handling system. This method should be called during the server startup process. ### Method `static void` ### Parameters None ### Response None ``` -------------------------------- ### getSleepingDirection Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/fabric/pie/ilikepiefoo/fabric/events/sleep/ModifySleepingDirectionEventJS.html Gets the current sleeping direction. ```APIDOC ## Method getSleepingDirection ### Description Retrieves the current sleeping direction of the entity. ### Returns * (net.minecraft.core.Direction | null) - The sleeping direction, or null if not set. ``` -------------------------------- ### KubeJSAdditions Static Methods Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/common/index-all.html Static methods for initializing KubeJS Additions. ```APIDOC ## KubeJSAdditions Static Methods ### Description Provides static methods for initializing the KubeJS Additions mod. ### Methods - **init()**: Initializes KubeJS Additions. ``` -------------------------------- ### SleepingEventJS Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/fabric/pie/ilikepiefoo/fabric/events/sleep/package-summary.html An event that is called when an entity starts to sleep. ```APIDOC ## SleepingEventJS ### Description An event that is called when an entity starts to sleep. ### Method Not applicable (JavaScript Event) ### Endpoint Not applicable (JavaScript Event) ### Parameters Not specified in source. ### Request Example Not specified in source. ### Response Not specified in source. ``` -------------------------------- ### init Method Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/fabric/pie/ilikepiefoo/fabric/FabricEventHandler.html Initializes the fabric event handling system. This is a static method and can be called directly. ```APIDOC ## init() ### Description Initializes the fabric event handling system. ### Method `static void init()` ### Parameters This method does not take any parameters. ``` -------------------------------- ### getSleepingPos Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/fabric/pie/ilikepiefoo/fabric/events/sleep/SetBedOccupationStateEventJS.html Gets the block position where the entity is sleeping. ```APIDOC ## getSleepingPos ### Description Gets the block position where the entity is sleeping. ### Method ``` public net.minecraft.core.BlockPos getSleepingPos() ``` ### Returns * (net.minecraft.core.BlockPos) - The block position of the sleeping entity. ``` -------------------------------- ### getState Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/fabric/pie/ilikepiefoo/fabric/events/sleep/AllowBedEventJS.html Gets the block state at the sleeping position. ```APIDOC ## getState() ### Description Gets the block state at the sleeping position. ### Returns - **net.minecraft.world.level.block.state.BlockState** - The block state. ``` -------------------------------- ### JEIEvents.REGISTER_VANILLA_CATEGORY_EXTENSIONS Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/common/pie/ilikepiefoo/compat/jei/JEIEvents.html An event handler for extending vanilla JEI recipe categories. ```APIDOC ## JEIEvents.REGISTER_VANILLA_CATEGORY_EXTENSIONS ### Description An event handler for extending vanilla JEI recipe categories. This allows you to add custom recipe types to existing vanilla categories. ### Type `static final dev.latvian.mods.kubejs.event.EventHandler` ``` -------------------------------- ### getSleepingPos Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/fabric/pie/ilikepiefoo/fabric/events/sleep/AllowSettingSpawnEventJS.html Gets the position where the player is attempting to sleep. ```APIDOC ## getSleepingPos ### Description Gets the position where the player is attempting to sleep. ### Returns * net.minecraft.core.BlockPos - The sleeping position. ``` -------------------------------- ### JEIPlugin Constructor Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/common/pie/ilikepiefoo/compat/jei/JEIPlugin.html Constructs a new JEIPlugin instance. ```APIDOC ## JEIPlugin() ### Description Constructs a new JEIPlugin instance. ### Constructor `JEIPlugin()` ``` -------------------------------- ### of Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/common/pie/ilikepiefoo/events/PlayerRespawnEventJS.html Static factory method to create a PlayerRespawnEventJS instance. ```APIDOC ## of ### Description Static factory method to create a PlayerRespawnEventJS instance. ### Parameters * **player** (net.minecraft.server.level.ServerPlayer) - The player involved in the event. * **conqueredEnd** (boolean) - Indicates if the End dimension was conquered. ### Returns * **PlayerRespawnEventJS** - A new instance of PlayerRespawnEventJS. ``` -------------------------------- ### PlayerCloneEventJS.getOldPlayer Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/common/pie/ilikepiefoo/events/PlayerCloneEventJS.html Gets the original player entity that was cloned. ```APIDOC ## getOldPlayer() ### Description Gets the original player entity that was cloned. ### Returns (net.minecraft.world.entity.player.Player) The original player entity. ``` -------------------------------- ### getPos Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/fabric/pie/ilikepiefoo/fabric/events/sleep/SetBedOccupationStateEventJS.html Gets the container block position for the sleeping position. ```APIDOC ## getPos ### Description Gets the container block position for the sleeping position. ### Method ``` public dev.latvian.mods.kubejs.level.BlockContainerJS getPos() ``` ### Returns * (dev.latvian.mods.kubejs.level.BlockContainerJS) - The block container JS object for the sleeping position. ``` -------------------------------- ### PlayerCloneEventJS.of Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/common/pie/ilikepiefoo/events/PlayerCloneEventJS.html Static factory method to create a PlayerCloneEventJS instance. This is the recommended way to instantiate the event. ```APIDOC ## static PlayerCloneEventJS of(ServerPlayer oldPlayer, ServerPlayer newPlayer, boolean conqueredEnd) ### Description Static factory method to create a PlayerCloneEventJS instance. ### Parameters #### Path Parameters * **oldPlayer** (ServerPlayer) - The player entity that is being cloned. * **newPlayer** (ServerPlayer) - The new player entity created from the clone. * **conqueredEnd** (boolean) - Indicates if the End dimension has been conquered. ### Returns - PlayerCloneEventJS - A new instance of PlayerCloneEventJS. ``` -------------------------------- ### getSleepingPos Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/fabric/pie/ilikepiefoo/fabric/events/sleep/AllowBedEventJS.html Gets the block position where the entity is trying to sleep. ```APIDOC ## getSleepingPos() ### Description Gets the block position where the entity is trying to sleep. ### Returns - **net.minecraft.core.BlockPos** - The sleeping position. ``` -------------------------------- ### AllowSettingSpawnEventJS Constructor Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/fabric/pie/ilikepiefoo/fabric/events/sleep/AllowSettingSpawnEventJS.html Constructs a new AllowSettingSpawnEventJS event. ```APIDOC ## AllowSettingSpawnEventJS ### Description Constructs a new AllowSettingSpawnEventJS event. ### Parameters * `player` (net.minecraft.world.entity.player.Player) - The player attempting to sleep. * `sleepingPos` (net.minecraft.core.BlockPos) - The position where the player is attempting to sleep. ``` -------------------------------- ### getPos Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/fabric/pie/ilikepiefoo/fabric/events/sleep/AllowSettingSpawnEventJS.html Gets the block container position associated with this event. ```APIDOC ## getPos ### Description Gets the block container position associated with this event. ### Returns * dev.latvian.mods.kubejs.level.BlockContainerJS - The block container position. ``` -------------------------------- ### Get Sleeping Position Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/fabric/pie/ilikepiefoo/fabric/events/sleep/ModifySleepingDirectionEventJS.html Retrieves the block position where the entity is sleeping. ```java public net.minecraft.core.BlockPos getSleepingPos() ``` -------------------------------- ### PlayerRespawnEventJS Constructor Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/common/pie/ilikepiefoo/events/PlayerRespawnEventJS.html Constructs a new PlayerRespawnEventJS instance. ```APIDOC ## PlayerRespawnEventJS Constructor ### Description Constructs a new PlayerRespawnEventJS instance. ### Parameters * **player** (net.minecraft.server.level.ServerPlayer) - The player involved in the event. * **conqueredEnd** (boolean) - Indicates if the End dimension was conquered. ``` -------------------------------- ### Get Bed State Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/fabric/pie/ilikepiefoo/fabric/events/sleep/ModifyWakeUpPositionEventJS.html Retrieves the BlockState of the bed the entity is sleeping on. ```java public net.minecraft.world.level.block.state.BlockState getBedState() ``` -------------------------------- ### Get Sleeping Position Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/fabric/pie/ilikepiefoo/fabric/events/sleep/ModifyWakeUpPositionEventJS.html Retrieves the BlockPos of the block the entity is sleeping on. ```java public net.minecraft.core.BlockPos getSleepingPos() ``` -------------------------------- ### AdditionsPlugin Constructor Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/common/pie/ilikepiefoo/AdditionsPlugin.html Initializes a new instance of the AdditionsPlugin class. ```APIDOC ## AdditionsPlugin() ### Description Initializes a new instance of the AdditionsPlugin class. ### Constructor `public AdditionsPlugin()` ``` -------------------------------- ### Get Entity Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/fabric/pie/ilikepiefoo/fabric/events/sleep/ModifyWakeUpPositionEventJS.html Retrieves the LivingEntity associated with this event. Inherited from LivingEntityEventJS. ```java public net.minecraft.world.entity.LivingEntity getEntity() ``` -------------------------------- ### FabricPlugin Constructor Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/fabric/pie/ilikepiefoo/fabric/FabricPlugin.html Initializes a new instance of the FabricPlugin class. ```APIDOC ## FabricPlugin() ### Description Initializes a new instance of the FabricPlugin class. ### Constructor `FabricPlugin()` ``` -------------------------------- ### WorldRenderContextEventJS.afterSetupHandle(WorldRenderContext) Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/fabric/index-all.html Handles events after the view frustum is computed and render chunks are identified. This method is called after the view frustum is computed and all render chunks to be rendered are identified and rebuilt but before chunks are uploaded to the GPU. ```APIDOC ## WorldRenderContextEventJS.afterSetupHandle(WorldRenderContext) ### Description Called after view Frustum is computed and all render chunks to be rendered are identified and rebuilt but before chunks are uploaded to GPU. ### Method Static method ### Endpoint N/A ### Parameters * **WorldRenderContext** (net.fabricmc.fabric.api.client.rendering.v1.WorldRenderContext) - The context of the world render event. ### Request Example None ### Response None ``` -------------------------------- ### Get Wake-Up Position Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/fabric/pie/ilikepiefoo/fabric/events/sleep/ModifyWakeUpPositionEventJS.html Retrieves the current wake-up position for the event. ```java @Nullable public @Nullable net.minecraft.world.phys.Vec3 getWakeUpPos() ``` -------------------------------- ### FabricEventHandler.init() Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/fabric/index-all.html Initializes the Fabric event handling system. This is a static method that should be called once during the mod's initialization phase. ```APIDOC ## init() ### Description Initializes the Fabric event handling system. ### Method Static ### Endpoint N/A (Method Call) ### Parameters None ### Request Example ```java FabricEventHandler.init(); ``` ### Response N/A ``` -------------------------------- ### PlayerCloneEventJS.getNewPlayer Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/common/pie/ilikepiefoo/events/PlayerCloneEventJS.html Gets the new player entity created after the clone event. ```APIDOC ## getNewPlayer() ### Description Gets the new player entity created after the clone event. ### Returns (net.minecraft.world.entity.player.Player) The new player entity. ``` -------------------------------- ### AllowSleepingEventJS Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/fabric/pie/ilikepiefoo/fabric/events/sleep/AllowSleepingEventJS.html An event that checks whether a player can start to sleep in a bed-like block. This event only applies to sleeping using `Player.startSleepInBed(BlockPos)`. If this event returns a `Player.BedSleepingProblem`, it is used as the return value of `Player.startSleepInBed(BlockPos)` and sleeping fails. A `null` return value means that the player will start sleeping. ```APIDOC ## AllowSleepingEventJS ### Description An event that checks whether a player can start to sleep in a bed-like block. This event only applies to sleeping using `Player.startSleepInBed(BlockPos)`. If this event returns a `Player.BedSleepingProblem`, it is used as the return value of `Player.startSleepInBed(BlockPos)` and sleeping fails. A `null` return value means that the player will start sleeping. ### Methods #### `getEntity()` Returns the player associated with this event. - **Returns**: `net.minecraft.world.entity.player.Player` #### `getPos()` Returns the block container associated with this event. - **Returns**: `dev.latvian.mods.kubejs.level.BlockContainerJS` #### `getSleepingPos()` Returns the block position where the player is trying to sleep. - **Returns**: `net.minecraft.core.BlockPos` #### `getSleepingProblem()` Gets the current sleeping problem, if any. - **Returns**: `net.minecraft.world.entity.player.Player.BedSleepingProblem` #### `handler(player, sleepingPos)` Checks whether a player can start sleeping in a bed-like block. - **Parameters**: - **player** (`net.minecraft.world.entity.player.Player`) - The player attempting to sleep. - **sleepingPos** (`net.minecraft.core.BlockPos`) - The position of the bed. - **Returns**: `net.minecraft.world.entity.player.Player.BedSleepingProblem` (or null if sleeping is allowed) #### `setSleepingProblem(sleepingProblem)` Sets the sleeping problem for this event. - **Parameters**: - **sleepingProblem** (`net.minecraft.world.entity.player.Player.BedSleepingProblem`) - The sleeping problem to set. ``` -------------------------------- ### KubeJSAdditions Class Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/common/pie/ilikepiefoo/KubeJSAdditions.html Documentation for the KubeJSAdditions class, including its fields, constructors, and methods. ```APIDOC ## Class KubeJSAdditions ### Description Provides access to KubeJS additions and initialization. ### Fields #### MOD_ID - **MOD_ID** (String) - The mod ID for KubeJSAdditions. ### Constructors #### KubeJSAdditions() - **KubeJSAdditions**() - Default constructor for KubeJSAdditions. ### Methods #### init() - **init**() - Initializes KubeJSAdditions. ``` -------------------------------- ### EventHandler Static Methods Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/common/index-all.html Static methods for initializing the event handler. ```APIDOC ## EventHandler Static Methods ### Description Provides static methods for event handling initialization. ### Methods - **init()**: Initializes the event handler. ``` -------------------------------- ### AllowSleepingEventJS Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/fabric/pie/ilikepiefoo/fabric/events/sleep/package-summary.html An event that checks whether a player can start to sleep in a bed-like block. ```APIDOC ## AllowSleepingEventJS ### Description An event that checks whether a player can start to sleep in a bed-like block. ### Method Not applicable (JavaScript Event) ### Endpoint Not applicable (JavaScript Event) ### Parameters Not specified in source. ### Request Example Not specified in source. ### Response Not specified in source. ``` -------------------------------- ### handle Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/common/pie/ilikepiefoo/AdditionsPlugin.EmptyHandler.html This method is intended to be implemented by classes that need to handle specific events within the AdditionsPlugin. ```APIDOC ## handle() ### Description This method is intended to be implemented by classes that need to handle specific events within the AdditionsPlugin. ### Method void ### Endpoint N/A ### Parameters None ### Request Example None ### Response #### Success Response void #### Response Example None ``` -------------------------------- ### Get Sleep Position (BlockContainerJS) Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/fabric/pie/ilikepiefoo/fabric/events/sleep/ModifyWakeUpPositionEventJS.html Retrieves the sleeping position as a BlockContainerJS object. ```java public dev.latvian.mods.kubejs.level.BlockContainerJS getSleepPos() ``` -------------------------------- ### of Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/common/pie/ilikepiefoo/events/EntityTameEventJS.html Static factory method to create an EntityTameEventJS instance. ```APIDOC ## of ### Description Creates and returns a new EntityTameEventJS instance. ### Parameters * **animal** (net.minecraft.world.entity.animal.Animal) - The animal involved in the taming event. * **player** (net.minecraft.world.entity.player.Player) - The player involved in the taming event. ### Returns * **EntityTameEventJS** - A new instance of EntityTameEventJS. ``` -------------------------------- ### getVanillaResult Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/fabric/pie/ilikepiefoo/fabric/events/sleep/AllowSleepTimeEventJS.html Gets the vanilla result indicating if sleeping is allowed at the current time. ```APIDOC ## getVanillaResult ### Description Gets the vanilla result indicating if sleeping is allowed at the current time. ### Method public boolean ``` -------------------------------- ### EntityEnterChunkEventJS Methods Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/common/index-all.html Methods to get the previous coordinates of an entity entering a chunk. ```APIDOC ## EntityEnterChunkEventJS Methods ### Description Provides information about an entity entering a chunk, including its previous position. ### Methods - **getPrevX()**: Retrieves the previous X-coordinate of the entity. - **getPrevY()**: Retrieves the previous Y-coordinate of the entity. - **getPrevZ()**: Retrieves the previous Z-coordinate of the entity. ``` -------------------------------- ### JEI Register Recipes Event (Client Only) Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/README.md Callback for registering JEI recipes. This is a client-side event. ```javascript JEIAddedEvents.registerRecipes(event => { console.log('Register Recipes event fired!'); console.log(event); }); ``` -------------------------------- ### PlayerCloneEventJS.getEntity Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/common/pie/ilikepiefoo/events/PlayerCloneEventJS.html Gets the player entity associated with this event. This method is inherited from PlayerEventJS. ```APIDOC ## Player getEntity() ### Description Gets the player entity associated with this event. ### Specified by: `getEntity` in class `dev.latvian.mods.kubejs.player.PlayerEventJS` ### Returns - Player - The player entity. ``` -------------------------------- ### Register Fabric Allow Setting Spawn Event Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/README.md Register event listeners for the Fabric allow setting spawn event. This event is server-only. ```javascript FabricAddedEvents.allowSettingSpawn(event => { console.log('Allow Setting Spawn event fired!'); console.log(event); }); ``` -------------------------------- ### registerVanillaCategoryExtensions Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/common/pie/ilikepiefoo/compat/jei/JEIPlugin.html Registers extensions to vanilla crafting recipe categories. ```APIDOC ## registerVanillaCategoryExtensions(IVanillaCategoryExtensionRegistration registration) ### Description Register custom extensions to the vanilla crafting recipe category. This allows you to add modded recipes to existing vanilla JEI categories. ### Method `registerVanillaCategoryExtensions(mezz.jei.api.registration.IVanillaCategoryExtensionRegistration registration)` ### Parameters #### Parameters - **registration** (mezz.jei.api.registration.IVanillaCategoryExtensionRegistration) - The registration object for vanilla category extensions. ``` -------------------------------- ### PlayerCloneEventJS.getEntity Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/common/pie/ilikepiefoo/events/PlayerCloneEventJS.html Gets the player entity associated with this event. This method is inherited from EntityEventJS. ```APIDOC ## getEntity() ### Description Gets the player entity associated with this event. This method is inherited from EntityEventJS. ### Returns (net.minecraft.world.entity.player.Player) The player entity. ``` -------------------------------- ### Get Entity Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/fabric/pie/ilikepiefoo/fabric/events/sleep/ModifySleepingDirectionEventJS.html Retrieves the living entity associated with this event. This method is inherited from LivingEntityEventJS. ```java public net.minecraft.world.entity.LivingEntity getEntity() ``` -------------------------------- ### custom Method Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/common/pie/ilikepiefoo/player/CustomDamageSourceJS.html Creates a custom damage source with the given ID. ```APIDOC ## custom(String id) ### Description Creates and returns a new CustomDamageSourceJS instance with the specified ID. ### Parameters #### Path Parameters - **id** (String) - Required - The identifier for the custom damage source. ### Returns - **CustomDamageSourceJS** - A new instance of CustomDamageSourceJS. ``` -------------------------------- ### SleepingEventJS Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/fabric/index-all.html Handles events related to entity sleeping. Includes methods for when an entity starts or stops sleeping. ```APIDOC ## Class SleepingEventJS ### Description Handles events related to entity sleeping. Includes methods for when an entity starts or stops sleeping. ### Methods #### `startHandler(LivingEntity, BlockPos)` - **Description**: Called when an entity starts to sleep. - **Parameters**: - `entity` (LivingEntity) - The entity that is starting to sleep. - `pos` (BlockPos) - The position where the entity is sleeping. - **Class**: `pie.ilikepiefoo.fabric.events.sleep.SleepingEventJS` #### `stopHandler(LivingEntity, BlockPos)` - **Description**: Called when an entity stops sleeping and wakes up. - **Parameters**: - `entity` (LivingEntity) - The entity that is stopping to sleep. - `pos` (BlockPos) - The position where the entity was sleeping. - **Class**: `pie.ilikepiefoo.fabric.events.sleep.SleepingEventJS` ``` -------------------------------- ### JEIEvents.REGISTER_ADVANCED Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/common/pie/ilikepiefoo/compat/jei/JEIEvents.html An event handler for registering advanced JEI configurations. ```APIDOC ## JEIEvents.REGISTER_ADVANCED ### Description An event handler for registering advanced JEI configurations. Use this for more complex JEI customizations. ### Type `static final dev.latvian.mods.kubejs.event.EventHandler` ``` -------------------------------- ### Get Sleeping Direction Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/fabric/pie/ilikepiefoo/fabric/events/sleep/ModifySleepingDirectionEventJS.html Retrieves the current sleeping direction of the entity. Returns null if the direction is not determined. ```java @Nullable public net.minecraft.core.Direction getSleepingDirection() ``` -------------------------------- ### PlayerCloneEventJS Methods Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/common/index-all.html Methods for handling player cloning events, allowing access to the old and new player instances. ```APIDOC ## PlayerCloneEventJS Methods ### Description Provides information related to player cloning events. ### Methods - **getNewPlayer()**: Retrieves the new player instance after cloning. - **getOldPlayer()**: Retrieves the old player instance before cloning. ``` -------------------------------- ### SetBedOccupationStateEventJS Constructor Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/fabric/pie/ilikepiefoo/fabric/events/sleep/SetBedOccupationStateEventJS.html Constructs a new SetBedOccupationStateEventJS event. ```APIDOC ## SetBedOccupationStateEventJS Constructor ### Description Constructs a new SetBedOccupationStateEventJS event. ### Parameters * **entity** (net.minecraft.world.entity.LivingEntity) - The living entity. * **sleepingPos** (net.minecraft.core.BlockPos) - The position where the entity is sleeping. * **bedState** (net.minecraft.world.level.block.state.BlockState) - The current block state of the bed. * **occupied** (boolean) - A boolean indicating whether the bed is occupied. ``` -------------------------------- ### Get Direction Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/fabric/pie/ilikepiefoo/fabric/events/sleep/ModifySleepingDirectionEventJS.html Retrieves the current direction. This might refer to the sleeping direction or another directional property depending on context. ```java @Nullable public net.minecraft.core.Direction getDirection() ``` -------------------------------- ### PlayerChangeDimensionEventJS.of Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/common/pie/ilikepiefoo/events/PlayerChangeDimensionEventJS.html Static factory method to create a PlayerChangeDimensionEventJS instance. This is the preferred way to create event instances. ```APIDOC ## PlayerChangeDimensionEventJS.of ### Description Creates a new PlayerChangeDimensionEventJS instance. ### Method static PlayerChangeDimensionEventJS ### Parameters * **player** (net.minecraft.server.level.ServerPlayer) - The player experiencing the dimension change. * **oldLevel** (net.minecraft.resources.ResourceKey) - The key of the world the player is leaving. * **newLevel** (net.minecraft.resources.ResourceKey) - The key of the world the player is entering. ### Returns A new PlayerChangeDimensionEventJS instance. ``` -------------------------------- ### registerRecipeCatalysts Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/common/pie/ilikepiefoo/compat/jei/JEIPlugin.html Registers recipe catalysts, which are essential ingredients required for crafting other items. Examples include the Crafting Table and Furnace. ```APIDOC ## registerRecipeCatalysts ### Description Register recipe catalysts. Recipe Catalysts are ingredients that are needed in order to craft other things. Vanilla examples of Recipe Catalysts are the Crafting Table and Furnace. ### Method public void registerRecipeCatalysts ### Parameters #### registration - **registration** (mezz.jei.api.registration.IRecipeCatalystRegistration) - Description not provided ``` -------------------------------- ### Listen to Entity Enter Chunk Event (Server Only) Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/README.md Register a callback for when an entity enters a chunk. This event is server-only. ```javascript CommonAddedEvents.entityEnterChunk(event => { console.log('Entity Enter Chunk event fired!'); console.log(event); }); ``` -------------------------------- ### PlayerCloneEventJS Constructor Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/common/pie/ilikepiefoo/events/PlayerCloneEventJS.html Constructs a new PlayerCloneEventJS instance. This is typically used internally by the system. ```APIDOC ## PlayerCloneEventJS(ServerPlayer oldPlayer, ServerPlayer newPlayer, boolean conqueredEnd) ### Description Constructs a new PlayerCloneEventJS instance. ### Parameters #### Path Parameters * **oldPlayer** (ServerPlayer) - The player entity that is being cloned. * **newPlayer** (ServerPlayer) - The new player entity created from the clone. * **conqueredEnd** (boolean) - Indicates if the End dimension has been conquered. ``` -------------------------------- ### Get Position (BlockContainerJS) Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/fabric/pie/ilikepiefoo/fabric/events/sleep/ModifySleepingDirectionEventJS.html Retrieves the position of the sleeping block as a BlockContainerJS object. This provides a more convenient way to interact with block positions. ```java public dev.latvian.mods.kubejs.level.BlockContainerJS getPos() ``` -------------------------------- ### JEI Register Ingredients Event (Client Only) Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/README.md Callback for registering JEI ingredients. This is a client-side event. ```javascript JEIAddedEvents.registerIngredients(event => { console.log('Register Ingredients event fired!'); console.log(event); }); ``` -------------------------------- ### OnRuntimeAvailableEventJS Constructor Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/common/pie/ilikepiefoo/compat/jei/events/OnRuntimeAvailableEventJS.html Initializes a new instance of the OnRuntimeAvailableEventJS class with the provided JEI runtime data. ```APIDOC ## OnRuntimeAvailableEventJS(IJeiRuntime data) ### Description Constructs an OnRuntimeAvailableEventJS object, providing access to the JEI runtime. ### Constructor `public OnRuntimeAvailableEventJS(mezz.jei.api.runtime.IJeiRuntime data)` ### Parameters #### Path Parameters * None #### Query Parameters * None #### Request Body * None ### Parameters * **data** (mezz.jei.api.runtime.IJeiRuntime) - Required - The JEI runtime instance. ``` -------------------------------- ### SleepingEventJS Handlers Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/fabric/pie/ilikepiefoo/fabric/events/sleep/SleepingEventJS.html These static methods are called by the system when an entity starts or stops sleeping. They serve as entry points for custom event handling logic. ```APIDOC ## startHandler ### Description Called when an entity starts to sleep. ### Method static void ### Parameters * **entity** (net.minecraft.world.entity.LivingEntity) - The entity that is starting to sleep. * **sleepingPos** (net.minecraft.core.BlockPos) - The position where the entity is sleeping. ## stopHandler ### Description Called when an entity stops sleeping and wakes up. ### Method static void ### Parameters * **entity** (net.minecraft.world.entity.LivingEntity) - The entity that is waking up. * **sleepingPos** (net.minecraft.core.BlockPos) - The position where the entity was sleeping. ``` -------------------------------- ### Render Recipe Description in JEI Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/README.md Draws a text description above the input slot in JEI recipes using the Minecraft GuiGraphics class. Ensure the Client binding is available to access the Minecraft font. ```javascript global["renderPainfulBlocks"] = (jeiHelpers, recipe, recipeSlotsView, guiGraphics, mouseX, mouseY) => { // By using the Client binding we can get the Minecraft font. // Next we can draw the description of the recipe above the input slot. // The first argument is the font, the second is the FormattedText, the third is the x position, // the fourth is the y position, the fifth is the width of the text, and I have no clue what the last argument does. // Probably z-index if I had to guess. guiGraphics.drawWordWrap(Client.font, Text.of(recipe.data.description), 0, 10, 100, 0); } ``` -------------------------------- ### clear() Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/fabric/pie/ilikepiefoo/fabric/events/hud/HudRenderEventJS.html Clears the current rendering state. ```APIDOC ## clear() ### Description Clears the current rendering state. ### Method `clear()` ### Returns `boolean` - Indicates if the clear operation was successful. ``` -------------------------------- ### Handle JEI Recipe Lookups Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/README.md Defines how JEI understands recipe information, including slot types and their positions. Use this to specify input, output, and catalyst slots for different recipe data types. ```javascript global["handleLookup"] = (jeiHelpers, builder, recipe, focuses) => { switch (recipe.data.type) { case "item": case "block": // Add an input slot to the recipe that is 35 pixels from the left and 20 pixels from the top. // Name the slot "input" so that if we want to reference it in the draw handler, we can. builder.addSlot("INPUT", 35, 20).addItemStack(Item.of(recipe.data.name)).setSlotName("input"); // Add an invisible output slot so that if you look at how the item is made, it shows this recipe. builder.addInvisibleIngredients("OUTPUT").addItemStack(Item.of(recipe.data.name)) break; case "fluid": // Add an input slot to the recipe that is 35 pixels from the left and 20 pixels from the top. // This one is slightly different as we are adding a fluid to the slot instead of an Item. // you can chain these as much as you'd like and add as many different ingredients // as you'd like. builder.addSlot("INPUT", 35, 20).addFluidStack(recipe.data.name, 1000).setSlotName("input") // Add an invisible output slot so that if you look at how the item is made, it shows this recipe. builder.addInvisibleIngredients("OUTPUT").addFluidStack(recipe.data.name, 1000) break; } } ``` -------------------------------- ### WorldRenderContextEventJS afterEntitiesHandle Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/fabric/pie/ilikepiefoo/fabric/events/worldrender/WorldRenderContextEventJS.html Called after entities are rendered and solid entity layers have been drawn to the main frame buffer target, before block entity rendering begins. Use for global block entity render setup or to append block-related quads. ```java public static void afterEntitiesHandle(net.fabricmc.fabric.api.client.rendering.v1.WorldRenderContext context) ``` -------------------------------- ### JEI Register Recipe Catalysts Event (Client Only) Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/README.md Callback for registering JEI recipe catalysts. This is a client-side event. ```javascript JEIAddedEvents.registerRecipeCatalysts(event => { console.log('Register Recipe Catalysts event fired!'); console.log(event); }); ``` -------------------------------- ### PlayerRespawnEventJS Methods Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/common/pie/ilikepiefoo/events/PlayerRespawnEventJS.html Provides information about the PlayerRespawnEventJS class and its methods. ```APIDOC ## PlayerRespawnEventJS ### Description Represents an event that occurs when a player respawns. This class provides methods to determine the circumstances of the respawn. ### Methods * **getEntity()** * Description: Returns the player entity associated with this event. * Returns: `net.minecraft.world.entity.player.Player` - The player entity. * **leavingEnd()** * Description: Checks if the player is respawning after leaving the End dimension. * Returns: `boolean` - True if the player is leaving the End, false otherwise. * **returningFromEnd()** * Description: Checks if the player is respawning after returning from the End dimension. * Returns: `boolean` - True if the player is returning from the End, false otherwise. * **causedByPortal()** * Description: Checks if the respawn was caused by a portal. * Returns: `boolean` - True if the respawn was caused by a portal, false otherwise. * **causedByDeath()** * Description: Checks if the respawn was caused by the player's death. * Returns: `boolean` - True if the respawn was caused by death, false otherwise. ``` -------------------------------- ### WorldRenderContextEventJS Constructor Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/fabric/pie/ilikepiefoo/fabric/events/worldrender/WorldRenderContextEventJS.html Constructs a new WorldRenderContextEventJS instance with the provided world render context. ```APIDOC ## WorldRenderContextEventJS Constructor ### Description Initializes a new instance of the `WorldRenderContextEventJS` class. ### Method `WorldRenderContextEventJS(net.fabricmc.fabric.api.client.rendering.v1.WorldRenderContext context)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response None ``` -------------------------------- ### JEI Register Advanced Recipe Event (Client Only) Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/README.md Callback for registering advanced JEI recipes. This is a client-side event. ```javascript JEIAddedEvents.registerAdvanced(event => { console.log('Register Advanced event fired!'); console.log(event); }); ``` -------------------------------- ### handle(PoseStack matrixStack, float tickDelta) Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/fabric/pie/ilikepiefoo/fabric/events/hud/HudRenderEventJS.html Static method to handle HUD rendering. Called after rendering the whole HUD in the game world. ```APIDOC ## handle(PoseStack matrixStack, float tickDelta) ### Description Called after rendering the whole hud, which is displayed in game, in a world. ### Method `static void handle(com.mojang.blaze3d.vertex.PoseStack matrixStack, float tickDelta)` ### Parameters * **matrixStack** (com.mojang.blaze3d.vertex.PoseStack) - The matrix stack used for rendering. * **tickDelta** (float) - The time delta for the current tick. ``` -------------------------------- ### JEIEvents.REGISTER_INGREDIENTS Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/common/pie/ilikepiefoo/compat/jei/JEIEvents.html An event handler for registering custom ingredients in JEI. ```APIDOC ## JEIEvents.REGISTER_INGREDIENTS ### Description An event handler for registering custom ingredients in JEI. This is useful for making custom items or fluids searchable and usable in JEI. ### Type `static final dev.latvian.mods.kubejs.event.EventHandler` ``` -------------------------------- ### PlayerCloneEventJS.of Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/common/pie/ilikepiefoo/events/PlayerCloneEventJS.html Static factory method to create a PlayerCloneEventJS instance. This is typically used internally by the KubeJS framework. ```APIDOC ## of(net.minecraft.server.level.ServerPlayer oldPlayer, net.minecraft.server.level.ServerPlayer newPlayer, boolean conqueredEnd) ### Description Static factory method to create a PlayerCloneEventJS instance. ### Parameters * **oldPlayer** (net.minecraft.server.level.ServerPlayer) - The player entity that is being cloned. * **newPlayer** (net.minecraft.server.level.ServerPlayer) - The new player entity created after cloning. * **conqueredEnd** (boolean) - Indicates if the End dimension has been conquered. ### Returns (PlayerCloneEventJS) A new instance of PlayerCloneEventJS. ``` -------------------------------- ### JEIEvents.REGISTER_RECIPE_CATALYSTS Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/common/pie/ilikepiefoo/compat/jei/JEIEvents.html An event handler for registering recipe catalysts in JEI. ```APIDOC ## JEIEvents.REGISTER_RECIPE_CATALYSTS ### Description An event handler for registering recipe catalysts in JEI. This allows you to specify items that act as catalysts for certain recipes. ### Type `static final dev.latvian.mods.kubejs.event.EventHandler` ``` -------------------------------- ### PlayerCloneEventJS Constructor Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/common/pie/ilikepiefoo/events/PlayerCloneEventJS.html Constructs a new PlayerCloneEventJS instance. This is typically used internally by the KubeJS framework. ```APIDOC ## PlayerCloneEventJS(net.minecraft.server.level.ServerPlayer oldPlayer, net.minecraft.server.level.ServerPlayer newPlayer, boolean conqueredEnd) ### Description Constructs a new PlayerCloneEventJS instance. ### Parameters * **oldPlayer** (net.minecraft.server.level.ServerPlayer) - The player entity that is being cloned. * **newPlayer** (net.minecraft.server.level.ServerPlayer) - The new player entity created after cloning. * **conqueredEnd** (boolean) - Indicates if the End dimension has been conquered. ``` -------------------------------- ### Listen to Player Clone Event (Server Only) Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/README.md Register a callback for when a player is cloned (e.g., respawning). This event is server-only. ```javascript CommonAddedEvents.playerClone(event => { console.log('Player Clone event fired!'); console.log(event); }); ``` -------------------------------- ### AllowBedEventJS Constructor Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/fabric/pie/ilikepiefoo/fabric/events/sleep/AllowBedEventJS.html Constructs a new AllowBedEventJS instance. ```APIDOC ## AllowBedEventJS(entity, sleepingPos, state, vanillaResult) ### Description Constructs a new AllowBedEventJS instance. ### Parameters #### Path Parameters - **entity** (net.minecraft.world.entity.LivingEntity) - The sleeping entity. - **sleepingPos** (net.minecraft.core.BlockPos) - The position of the block. - **state** (net.minecraft.world.level.block.state.BlockState) - The block state to check. - **vanillaResult** (boolean) - `true` if vanilla allows the block, `false` otherwise. ``` -------------------------------- ### Set Wake-Up Position (x, y, z) Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/fabric/pie/ilikepiefoo/fabric/events/sleep/ModifyWakeUpPositionEventJS.html Sets the wake-up position using individual x, y, and z coordinates. ```java public void setWakeUpPos(double x, double y, double z) ``` -------------------------------- ### JEIEvents.REGISTER_RECIPES Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/common/pie/ilikepiefoo/compat/jei/JEIEvents.html An event handler for registering custom recipes in JEI. ```APIDOC ## JEIEvents.REGISTER_RECIPES ### Description An event handler for registering custom recipes in JEI. This is the primary way to add your mod's recipes to JEI. ### Type `static final dev.latvian.mods.kubejs.event.EventHandler` ``` -------------------------------- ### pushPose() Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/fabric/pie/ilikepiefoo/fabric/events/hud/HudRenderEventJS.html Pushes the current matrix onto the stack. ```APIDOC ## pushPose() ### Description Pushes the current matrix onto the stack, saving the current transformation. ### Method `void pushPose()` ``` -------------------------------- ### AllowSleepTimeEventJS Constructor Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/fabric/pie/ilikepiefoo/fabric/events/sleep/AllowSleepTimeEventJS.html Initializes a new instance of the AllowSleepTimeEventJS class. ```APIDOC ## AllowSleepTimeEventJS Constructor ### Description Initializes a new instance of the AllowSleepTimeEventJS class. ### Parameters * **player** (net.minecraft.world.entity.player.Player) - The player attempting to sleep. * **sleepingPos** (net.minecraft.core.BlockPos) - The position where the player is attempting to sleep. * **vanillaResult** (boolean) - Indicates whether the vanilla game logic allows sleeping at the current time. ``` -------------------------------- ### ProxyEventJS Constructor Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/common/pie/ilikepiefoo/events/ProxyEventJS.html Constructs a new ProxyEventJS instance with the given method and arguments. ```APIDOC ## ProxyEventJS Constructor ### Description Constructs a new ProxyEventJS instance. ### Method Signature public ProxyEventJS(Method method, Object[] args) ### Parameters * **method** (Method) - The method associated with the event. * **args** (Object[]) - The arguments passed to the method. ``` -------------------------------- ### EntityTameEventJS Constructor Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/common/pie/ilikepiefoo/events/EntityTameEventJS.html Constructs a new EntityTameEventJS instance. ```APIDOC ## EntityTameEventJS Constructor ### Description Constructs a new EntityTameEventJS instance with the specified animal and player. ### Parameters * **animal** (net.minecraft.world.entity.animal.Animal) - The animal involved in the taming event. * **player** (net.minecraft.world.entity.player.Player) - The player involved in the taming event. ``` -------------------------------- ### Listen to Entity Tamed Event (Server Only) Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/README.md Register a callback for when an entity is tamed. This event is server-only. ```javascript CommonAddedEvents.entityTame(event => { console.log('Entity Tame event fired!'); console.log(event); }); ``` -------------------------------- ### JEIPlugin Constructor Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/common/pie/ilikepiefoo/compat/jei/JEIPlugin.html The default constructor for the JEIPlugin class. ```APIDOC ## JEIPlugin public JEIPlugin() ### Description The default constructor for the JEIPlugin class. ``` -------------------------------- ### EntityEnterChunkEventJS.of Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/common/pie/ilikepiefoo/events/EntityEnterChunkEventJS.html Static factory method to create an EntityEnterChunkEventJS instance. This is the preferred way to instantiate the event. ```APIDOC ## EntityEnterChunkEventJS.of ### Description Creates a new EntityEnterChunkEventJS instance using the provided entity and chunk coordinates. ### Method static ### Parameters * **entity** (net.minecraft.world.entity.Entity) - The entity that entered the chunk. * **chunkX** (int) - The X-coordinate of the chunk. * **chunkY** (int) - The Y-coordinate of the chunk. * **chunkZ** (int) - The Z-coordinate of the chunk. * **prevX** (int) - The previous X-coordinate of the entity. * **prevY** (int) - The previous Y-coordinate of the entity. * **prevZ** (int) - The previous Z-coordinate of the entity. ### Returns * (EntityEnterChunkEventJS) - A new instance of EntityEnterChunkEventJS. ``` -------------------------------- ### EventAdapter Constructor Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/common/pie/ilikepiefoo/util/EventAdapter.html Constructs an EventAdapter with the specified event class, event name, and a variable number of event handlers. ```APIDOC ## EventAdapter Constructor ### Description Constructs an EventAdapter with the specified event class, event name, and a variable number of event handlers. ### Constructor Signature `EventAdapter(Class eventClass, String eventName, EventHandler... handlers)` ### Parameters * **eventClass** (Class) - The class of the event. * **eventName** (String) - The name of the event. * **handlers** (EventHandler...) - A variable number of event handlers to be associated with this adapter. ``` -------------------------------- ### Listen to Player Change Dimension Event (Server Only) Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/README.md Register a callback for when a player changes dimensions. This event is server-only. ```javascript CommonAddedEvents.playerChangeDimension(event => { console.log('Player Change Dimension event fired!'); console.log(event); }); ``` -------------------------------- ### registerVanillaCategoryExtensions Source: https://github.com/hunter19823/kubejsadditions/blob/1.20.1/docs/common/pie/ilikepiefoo/compat/jei/JEIPlugin.html Registers modded extensions to the vanilla crafting recipe category, allowing custom crafting recipes to be integrated with JEI. ```APIDOC ## registerVanillaCategoryExtensions public void registerVanillaCategoryExtensions(mezz.jei.api.registration.IVanillaCategoryExtensionRegistration registration) ### Description Register modded extensions to the vanilla crafting recipe category. Custom crafting recipes for your mod should use this to tell JEI how they work. Specified by: `registerVanillaCategoryExtensions` in interface `mezz.jei.api.IModPlugin` ### Parameters * `registration` - The vanilla category extension registration helper. ```