Key Features
- Dynamic Entity Registry: Easily register custom entities and define their attributes and behaviors using JavaScript.
- Entity Modification: Modify existing entity methods with the entity modification event for further customization.
- Full Animation Support: Enjoy smooth and lifelike animations for your entities, utilizing LioLib, a Geckolib 4 fork backporting many fixes to the unsupported 1.19.2 version
(EntityJS 1.20.1+ Use Geckolib as a direct dependency because it is a supported version)
- Spawn Control: Take full control over entity spawning by specifying spawn conditions, rates, and locations.
- Attribute Modification: Fine-tune entity attributes such as health, speed, damage, and more to suit your gameplay needs.
- Full AI Support: Access a comprehensive set of AI behaviors and functions to create intelligent and interactive entities.
Getting Started
To start using EntityJS, simply install the addon alongside KubeJS and begin creating your custom entities and animations. Refer to the documentation for detailed instructions and examples.
Special Compatibility
KubeJS Iron's Spells
Visit KubeJS Iron's Spells Mod Page
- Spellcasting Mobs: You can make any Mob cast spells by using the Goal event to attach spellcasting behavior.
- Custom Spellcasters: Create fully custom spellcasting mobs with tailored AI, spell sets, and behaviors.
- Spell Projectiles: Define and control custom spell projectiles for advanced combat and visual effects.
Community
Join the official KubeJS Discord community to connect with other users, share your creations, and get help with any questions or issues you encounter while using EntityJS. Alternatively, you can click the Discord icon below:
Youtube Tutorials
All Versions
+ Add Version| Name | Game version | Platforms | Published | Downloads | Actions |
|---|---|---|---|---|---|
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 | ||||
| 12h ago | 1 |
- Fixed tamable entity StackOverflowError when no food predicate is set and is fed
- Fixed another wrapper cache issue with
createCustomentity builder
- Fixed tamable entity StackOverflowError when no food predicate is set and is fed
- Fixed another wrapper cache issue with
createCustomentity builder
- Fixed tamable entity StackOverflowError when no food predicate is set and is fed
- Fixed another wrapper cache issue with
createCustomentity builder
- Fixed crash involving non-living entity builder and failed caching
- Fixed crash involving non-living entity builder and failed caching
- Fixed crash involving non-living entity builder and failed caching
- Added missing
isAlliedToimplementation to modify builder
- Added missing
isAlliedToimplementation to modify builder
- Added missing
isAlliedToimplementation to modify builder
builder.attributes()method tocreate()&createCustom()entity_type builders
# Fixed
isMultipartEntity()method always returning true even with no `builder.addPartEntity()overrides- Dedicated server crash when using setRendererClass()` string overload
- Startup crash from duplicate unique mixin methods
.attributes(attributes => {})to living entity builders, allowing scripts to add or replace attributes during entity attribute creation- Added inherited dynamic override method suggestions so ProbeJS includes valid methods declared by parent entity classes
## Fixed
isMultipartEntity()method always returning true even with no `builder.addPartEntity()overrides- Improved ProbeJS type inference for nested classes used with createCustom()
,modify(), andJava.loadClass() - Dedicated server crash when using the new event.createCustom().setRendererClass()` method
## Added
- Added
.override(methodKey, callback)and callback controls such assuperCall(),cancel(), andsetReturnValue() - Added nonliving entity support and custom model or renderer support to
createCustom() - Added custom synced entity data support
- Added GeckoLib projectile, trident, slime, skeleton, and wolf entity builders
- Added additional entity, rendering, movement-control, collision, riding, and modification callbacks
- Added improved ProbeJS suggestions for
createCustom(),modify(),Java.loadClass(), renderer classes, and dynamic overrides
## Fixed
- Improved vanilla fallback behavior across builder and modification callbacks
- Improved synced data handling for UUID and
Vec3values - Fixed projectiles failing to save when created without an item
- Fixed dedicated-server crashes caused by client-only model and renderer APIs
- Fixed missing default movement speed and several entity-specific callbacks
- Improved ProbeJS type inference for inherited methods and nested entity classes
- Fixed dedicated server crash when using the new
event.createCustom().setRendererClass()method - Fixed isMultipartEntity() method always returning true even with no `
builder.addPartEntity()` overrides
- Fixed synced entity data client check causing variables to always be null
- Fixed synced entity data client check causing variables to always be null
- Fixed goal events not firing due to extra id not being parsed correctly
- Added
.override("someMethod()", callback)toevent.createCustom()entities, letting scripts override supported Java entity methods directly. .override()works with public and protected vanilla or modded entity methods when they are safe to override.- Added dynamic override context values like
context.entity,context.args,context.get("arg0"),context.arg0, andcontext.arg1. - Added named override arguments from Parchment mappings when available, so
customBuilder.override()callbacks can use names likecontext.partialTickswhile still keepingarg0,arg1, etc. as fallback - Added
context.superCall()for dynamic overrides, includingcontext.superCall(...args)to call the original method with replacement arguments. - Added
EntityJSUtils.superCall()for supported builder and modify callbacks where acontextobject may not be available. - Added
EntityJSUtils.getCallbackInfo()formodifyEntitycallbacks. - Added callback control helpers on supported contexts:
context.cancel(),context.setReturnValue(value),context.returnValue(), andcontext.superCall(). - Added
setRenderer(context => ...)toevent.createCustom()for custom renderer factories. - Added
setRendererClass(...)toevent.createCustom()for using an existing renderer class. - Added
setModel(context => ...)toevent.createCustom()for custom model factories. - Added support for
event.createCustom()with non-living entities. - Added support for rendering custom non-living entities with GeckoLib or existing renderer classes.
- Added
playStepSound,playMuffledStepSound, andplayCombinationStepSoundsto EntityJS entity builders. - Added
playStepSound,playMuffledStepSound, andplayCombinationStepSoundstoEntityJSEvents.modifyEntity(). - Added fallback overrides for methods often needed on final entity classes:
playSwimSound,doWaterSplashEffect,processFlappingMovement, andcanBeHitByProjectile.
### ProbeJS / Typing Improvements
- Added better ProbeJS support for
event.createCustom()builders. - Added ProbeJS suggestions for
.override()method keys. - Added typed override contexts, so
context.entitymatches the custom entity class when possible. - Added typed
setRendererClass("")string suggestions of viable renderer class strings setRendererClass("")now suggests real renderer classes that can actually load and pass EntityJS renderer checks.setRendererClass("some.class.Name")still accepts custom strings even when they are not in the suggestion list.- Improved dedicated server safety for ProbeJS typing generation so client-only renderer classes are not loaded on servers.
- Replaced
constwithletin some ProbeJS typing examples
### Changes
- Removed
setModelClass(...). Most Minecraft model classes need constructor arguments, so scripts should usesetModel(context => new MyModel(...))instead. setRendererClass(...)is now the class-based shortcut for existing renderer classes.setModel(...)is now the correct model API for custom models.- Changed
canThrowdefault totrueinProjectileItemBuilder.
### Improvements
- Improved busy callback performance by caching faster Rhino callback invocation paths when using any EntityJS script facing callback. (30% performance increase profiled on over 500k test iterations)
- Expanded cached callback handling across GeckoLib, AI behavior helpers, spawn placement predicates, vanilla goals, setup callbacks, and modify callbacks.
- Added callback argument initialization so common entity arguments are ready before server-side logic runs.
- Added callback profiling tools for debugging callback setup, JS calls, super calls, return conversion, and context creation.
- Changed most boolean callbacks to use EntityJS’s new
BooleanCallbackinterface. - Improved wrapped custom entity behavior by defaulting synced values to the original entity values.
### Fixes
- Fixed Forge remapping issues caused by methods using
remap = trueincorrectly. - Fixed
PiglinEntityJSnot wiringisConvertingandfinishConversion. - Fixed custom and tameable entity builders missing default movement speed values.
- Fixed
ProjectileAnimatableJSandProjectileEntityJSworld-save errors when summoned without an item.
- Added
.override("someMethod()", callback)toevent.createCustom()entities, letting scripts override supported Java entity methods directly. .override()works with public and protected vanilla or modded entity methods when they are safe to override.- Added dynamic override context values like
context.entity,context.args,context.get("arg0"),context.arg0, andcontext.arg1. - Added named override arguments from Parchment mappings when available, so
customBuilder.override()callbacks can use names likecontext.partialTickswhile still keepingarg0,arg1, etc. as fallback - Added
context.superCall()for dynamic overrides, includingcontext.superCall(...args)to call the original method with replacement arguments. - Added
EntityJSUtils.superCall()for supported builder and modify callbacks where acontextobject may not be available. - Added
EntityJSUtils.getCallbackInfo()formodifyEntitycallbacks. - Added callback control helpers on supported contexts:
context.cancel(),context.setReturnValue(value),context.returnValue(), andcontext.superCall(). - Added
setRenderer(context => ...)toevent.createCustom()for custom renderer factories. - Added
setRendererClass(...)toevent.createCustom()for using an existing renderer class. - Added
setModel(context => ...)toevent.createCustom()for custom model factories. - Added support for
event.createCustom()with non-living entities. - Added support for rendering custom non-living entities with GeckoLib or existing renderer classes.
- Added
playStepSound,playMuffledStepSound, andplayCombinationStepSoundsto EntityJS entity builders. - Added
playStepSound,playMuffledStepSound, andplayCombinationStepSoundstoEntityJSEvents.modifyEntity(). - Added fallback overrides for methods often needed on final entity classes:
playSwimSound,doWaterSplashEffect,processFlappingMovement, andcanBeHitByProjectile.
### ProbeJS / Typing Improvements
- Added better ProbeJS support for
event.createCustom()builders. - Added ProbeJS suggestions for
.override()method keys. - Added typed override contexts, so
context.entitymatches the custom entity class when possible. - Added typed
setRendererClass("")string suggestions of viable renderer class strings setRendererClass("")now suggests real renderer classes that can actually load and pass EntityJS renderer checks.setRendererClass("some.class.Name")still accepts custom strings even when they are not in the suggestion list.- Improved dedicated server safety for ProbeJS typing generation so client-only renderer classes are not loaded on servers.
- Replaced
constwithletin some ProbeJS typing examples
### Changes
- Removed
setModelClass(...). Most Minecraft model classes need constructor arguments, so scripts should usesetModel(context => new MyModel(...))instead. setRendererClass(...)is now the class-based shortcut for existing renderer classes.setModel(...)is now the correct model API for custom models.- Changed
canThrowdefault totrueinProjectileItemBuilder.
### Improvements
- Improved busy callback performance by caching faster Rhino callback invocation paths when using any EntityJS script facing callback. (30% performance increase profiled on over 500k test iterations)
- Expanded cached callback handling across GeckoLib, AI behavior helpers, spawn placement predicates, vanilla goals, setup callbacks, and modify callbacks.
- Added callback argument initialization so common entity arguments are ready before server-side logic runs.
- Added callback profiling tools for debugging callback setup, JS calls, super calls, return conversion, and context creation.
- Changed most boolean callbacks to use EntityJS’s new
BooleanCallbackinterface. - Improved wrapped custom entity behavior by defaulting synced values to the original entity values.
### Fixes
- Fixed Forge remapping issues caused by methods using
remap = trueincorrectly. - Fixed
PiglinEntityJSnot wiringisConvertingandfinishConversion. - Fixed custom and tameable entity builders missing default movement speed values.
- Fixed
ProjectileAnimatableJSandProjectileEntityJSworld-save errors when summoned without an item.
- Changed
canThrowdefault totrueinProjectileItemBuilder - Implemented
setModelandsetModelClassinCustomEntityBuilder - Added
setRendererandsetRendererClassmethods toCustomEntityBuilder - Fixed remapping issues caused by setting remap to
trueon Forge methods event.createCustom()now supports non-living entities, optionally rendering with GeckoLib or through an existing model class- Fixed desync issues in wrapped custom entity classes by defaulting to original entity values
- Added
playMuffledStepSound,playCombinationStepSounds, andplayStepSoundto EntityJS entity builders - Added fallback overrides for methods commonly overridden in final entity classes:
playSwimSound,doWaterSplashEffect,processFlappingMovement, andcanBeHitByProjectile - Added
playStepSound,playMuffledStepSound, andplayCombinationStepSoundstoEntityJSEvents.modifyEntity() - Replaced all instances of
constwithletin ProbeJS typings - Fixed
ProjectileAnimatableJSandProjectileEntityJSworld-save errors when summoned without an item
- Changed
canThrowdefault totrueinProjectileItemBuilder - Implemented
setModelandsetModelClassinCustomEntityBuilder - Added
setRendererandsetRendererClassmethods toCustomEntityBuilder - Fixed remapping issues caused by setting remap to
trueon Forge methods event.createCustom()now supports non-living entities, optionally rendering with GeckoLib or through an existing model class- Fixed desync issues in wrapped custom entity classes by defaulting to original entity values
- Added
playMuffledStepSound,playCombinationStepSounds, andplayStepSoundto EntityJS entity builders - Added fallback overrides for methods commonly overridden in final entity classes:
playSwimSound,doWaterSplashEffect,processFlappingMovement, andcanBeHitByProjectile - Added
playStepSound,playMuffledStepSound, andplayCombinationStepSoundstoEntityJSEvents.modifyEntity() - Replaced all instances of
constwithletin ProbeJS typings - Fixed
ProjectileAnimatableJSandProjectileEntityJSworld-save errors when summoned without an item
- Fixed attribute modification ordering
- Fixed attribute modification ordering
- Fix rare entity modification event crash due to computation timing of
eventMap
- Fix rare entity modification event crash due to computation timing of
eventMap
- Fixed server crash from using
newGeoLayer&newGlowingGeoLayeron a dedicated server - Scripters can now directly input a UUID while setting entity synced data with
entity.setSyncedData()instead of needing to wrap in an Optional - Fixed crash from UUID being cast to Optional<UUID> when saving 'uuid' synced data
- Fixed server crash from using
newGeoLayer&newGlowingGeoLayeron a dedicated server - Scripters can now directly input a UUID while setting entity synced data with
entity.setSyncedData()instead of needing to wrap in an Optional - Fixed crash from UUID being cast to Optional<UUID> when saving 'uuid' synced data
- Fixed summoning error with BetterTrims mod
- Fixed entity attribute event not working on custom mobs
- Fixed another server-side issue where in some cases custom entity attribute builders are null on the client
- Prevent modification builder map from holding onto level in memory
- Prevent modification builder map from holding onto level in memory
- Fixed entity attributes being null on the client side while on a dedicated server
- Fixed a "casting to T" error when creating new move control/look control in entities
