Kernel Extension​

Author:

dsdekhm

Source code:

https://www.github.com...

CHANGELOG

RELEASE 1.0 (EARLY ALPHA)
- Item.createFoodItem method patch to specify lots of new params (all listed in declarations)
- ToolAPI module fully rewritten to native code and vanilla tool classes. You can still use ToolAPI to register tools, but in order not to make KEX use a little crutch many times, consider using ToolsModule.register[Sword/Axe/Pickaxe/Shovel/Hoe/CustomTool] or Item.create[([Sword/Axe/Pickaxe/Shovel/Hoe]Item)/CustomTool] (instead of normal Item.createItem).
- ToolAPI.ToolParams interface now has new method int getAttackDamageBonus(ItemInstance item), to override default damage to be applied to item depending on the stack contents (example of use: Nano Saber from IC2)
- ItemsModule with 8 new methods for items (will increase in future updates)
- LootModule to modify vanilla loot tables (dungeon chests, entities drops and fishing loot, NOT trading)
- Actor, Mob, Slime, MobEffect, MobEffectInstance API (experimental, not tested)

BETA 1.1
- Small fix in Item.createFoodItem patch
- Fixed all errors called by tools logics
- Restructured and refactored LootModule

BETA 1.2
- Added methods to the LootModifier class: addJSModifyCallback, addJSONModifyCallback, addJSPostModifyCallback, addJSONPostModifyCallback.
- The first pair is used to change the JSON object of the loot table directly after all programmatical modifications.
- The other pair is used to work with the JSON object of the loot table after all types of modifications. In these callbacks all the provided objects are copies and shouldn't be modified.
- Added method LootModule.addPiglinBarteringItem to add new items to the piglin bartering list. This method takes no parameters and returns LootEntry interface.
- Added function getKEXVersion(), returns array containing three integers of the current mod version (now it's [1, 2, 0]).

BETA 1.3
- AddonUtils class is now exported by the shared API.
- Added function getKEXVersionCode(), which can be used for more convenient version checks.
- Added callback \"KEX-InnerCoreIdsCached\", provides no parameters.
- Fixed LootModifier methods addJSModifyCallback, addJSPostModifyCallback crashing.

BETA 1.4
- Fixed food creation method patch
- Food parameters API.
- Food parameters object can be accessed by ItemsModule.getFood(id), returns null if given item is not a food.
- There is also ItemsModule.isFood(id) method, to check if the item is edible or not.
- Added method ItemsModule.newFoodSaturationModifier(name, value), to register custom string food saturation modifiers, that are specified in JSON components. Vanilla has only 6 pre-defined modifiers: poor, low, normal, good, max and supernatural.
- Added method ItemsModule.saturationModifierFromString(name), which returns the numeric saturation modifier value defined by the given name, or 0.6 if the saturation modifier with given name does not exist (0.6 is the value for normal modifier).
- Added method Actor.isElytraFlying().
- Fixed destroyBlockHook function in ToolsModule not taking BlockState as a block object. Now this function and other ones using the block objects are universal for both FullBlock and BlockState objects.

RELEASE 2.0
- Now ToolsModule.destroyBlockHook function is completely universal and can take any JS objects containing id and data fields, not only FullBlock instances.
- Small fix in food saturation logics.
- Added ESaturationModifier enum.
- Added Player, LocalPlayer, MoveInputHandler and LootTableContext native classes.
- Added GlobalContext module, currently has only one method, getLocalPlayer().
- Added callbacks module.
- First new callbacks are PlayerJump and GameModeChanged.
- Pre-defined EntityHurt callback is now also fired at magic damage.
- Added new methods to the Actor class:
- void removeEffects(boolean harmful, boolean harmless)
- boolean isOnGround()
- A bunch of methods connected with breathable component
- Added method LootModule.addOnDropCallbackFor to modify the list of items every time they are being chosen randomly, to be dropped from the mob or to be put into the chest. Function interface for the callback provides you with the list of items itself, and the LootTableContext object, to get additional data about the entity death / chest filling moment.

BETA 2.0.1
- Fixed some of ToolAPI method patches returning Java strings instead of JS ones, improved TypeScript declarations in terms of string types.

BETA 2.0.2
- Fixed Player.openSign method crashing, and reworked it, for it to create sign GUI screen with the text that had already been written on the sign before.

BETA 2.0.3
- Small fix in tool levels logics

BETA 2.0.4
- Some important fixes in tools logics

BETA 2.1
- Useful additions to the Callback module (by 80LK)
- Callback.on(name, handler, priority?) - analogue of Callback.addCallback
- Callback.once(name, handler, priority?) - same as on, but the event handler will be called only once
- Callback.off(name, handler) - removes the given event handler

BETA 2.2
- Added method ItemsModule.setMaxUseDurationDynamic
- Made InnerCore-defined EItemAnimation enum full, added DRINK, BLOCK, CAMERA, SPEAR, CROSSBOW
- Fixed conflict with very old versions of ToolLib library (tested with ToolLib V14 in Nocube's Wilderness mod)
- Fixed conflict with HarvestCraft mod
- Added new tool types to the ToolsModule - shears and flint-and-steel
- Adapted one internal feature to the future version of InnerCore pack

BETA 2.2.1
- Fixed custom tools crashing on last InnerCore Test pack update
- Fixed ToolAPI.getDestroyTimeViaTool method patch
- Some more ToolAPI backward compatibility fixes

BETA 2.2.2
- Fixed custom tools not breaking

Kernel Extension​ [2.2.2​]



A library mod that adds small, but useful features, not exported by InnerCore itself.

Comments

Log in to be able to leave comments

Add-ons

Watch

Avaritia [0.9.0]

Avaritia adds various extremely powerful items with very expensive recipes to create them.

Watch

SignEdit [1.1]

Click on sign to edit.

Watch

Piglin Bartering Viewer [1.0]

Addon for Recipe Viewer mod to see list of items you can obtain by bartering with piglins.

You should also try

Watch

ThirstMod [1.2]

This mod adds thirst scale as well as possibility to drink some water from the bottle

Watch

Dev Editor [Alpha Preview 0.3.5]

Develop your mods with in-game tools.

Watch

Instant Runner [devtool] [1.1]

A mod to easily run test scripts without restarting Inner Core

Watch

TreeCapitator [1.4.1]

Destroy all tree by breaking one block!

More