You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 7, 2026. It is now read-only.
Lucraft edited this page Jan 17, 2023
·
1 revision
This page of the wiki will show you how to make a custom condition. Custom conditions are made using KubeJS scripts.
Make a file in the addon scripts directory.
Add the code to register the condition.
StartupEvents.registry('palladium:condition_serializer',(event)=>{// ID of the condition will be: 'kubejs:mycoolpack/mycoolcondition'event.create('mycoolpack/mycoolcondition')});
Add the condition handler.
StartupEvents.registry('palladium:condition_serializer',(event)=>{event.create('mycoolpack/mycoolcondition')// Handler for the condition, in this case, the condition will be fulfilled when the entity is crouching.test((entity)=>{returnentity.isCrouching();});});