Mods
Resource Packs
Data Packs
Modpacks
Shaders
Plugins
Mods Resource Packs Data Packs Plugins Shaders Modpacks
Sign in
ModsPluginsData PacksShadersResource PacksModpacks
Sign in
Settings
LootJS: KubeJS Addon

LootJS: KubeJS Addon

A Minecraft mod for packdevs to easily modify the loot system with KubeJS.

1.81M
43
Utility
AboutChangelogVersions
All versionsLootJS-NeoForge-1.21-3.0.0

LootJS-NeoForge-1.21-3.0.0

Download
Report

Changelog

Changes

  • New wiki https://docs.almostreliable.com/lootjs/
  • Now on neoforge
  • Added LootJS.loot_tables event for direct loot table modification
  • Add LootBucket as wrapper class for loot for easier execute some helper functions
  • LootEntry does not only represent single items anymore. It now represents all different loot entries vanilla minecraft has.
    • LootEntry.of(item): Single item
    • LootEntry.empty(): Empty entry
    • LootEntry.tag(tag): Tag entry
    • LootEntry.reference(lootTable): Reference to another loot table. For example, LootEntry.reference("minecraft:chests/abandoned_mineshaft")
    • LootEntry.alternative(lootEntries...): Alternative loot
    • LootEntry.sequence(lootEntries...): Sequence loot
    • LootEntry.group(lootEntries...): Grouped loot
  • Changes to LootJS.modifiers event:
    • Loot modifiers are not executed in order anymore. It will now work like a loot table. First check for conditions and if it contains matching loot, then apply all actions and then apply loot functions.
    • addLootTableModifier, addLootTypeModifier, addBlockLootModifier, addEntityLootModifier renamed into addTableModifier, addTypeModifier, addBlockModifier, addEntityModifier
    • .functions(itemFilter, (f) => {}) removed. Better to just use group now
    • Added .group((group) => {...}) or .group(itemFilter, (item) => {...}). Second one will pre-filter current loot for further modifications.
      • .group() can use .rolls(numberprovider) to execute the group multiple times
    • .pool() now actually consumes a vanilla LootPool
    • Removed addWeightedLoot(), use .pool() instead now
    • matchLoot renamed into containsLoot
    • .dropExperience can now use a number provider instead of a fixed amount
    • LootContextJS wrapper removed. Using LootContext instead but added all helper methods from LootContextJS too
  • Renamed some loot functions
  • Renamed some loot conditions
  • Changes to ItemFilter:
    • .hasEnchantments(...) only works for item enchantments now. For stored enchantments use .hasStoredEnchantments(...)
    • Removed some filters as they are no longer needed with the new data components.
    • Renamed ALWAYS_TRUE into ALL and ALWAYS_FALSE into NONE
  • Added vault, block_use and shearing LootType
  • And probably more stuff I may missed, sorry! :D Feel free to ask in our discord.

Dependencies

dependency-iconKubeJSrequired

Files

lootjs-neoforge-1.21-3.0.0.jar(219.97 KiB) Primary
Download

90% of ad revenue goes to creators

Support creators and Modrinth ad-free with Modrinth+

Metadata

Release channel

Release

Version number

1.21-3.0.0+neoforge

Loaders

NeoForge

Game versions

1.21

Downloads

49

Publication date

July 6, 2024 at 9:17 PM

Publisher

Lytho

Lytho

Owner

Version ID

Modrinth is open source.

main@aaf125c

© Rinth, Inc.

Company

TermsPrivacyRulesCareers

Resources

SupportBlogDocsStatus

Interact

Discord X (Twitter) Mastodon Crowdin
Get Modrinth App Settings
NOT AN OFFICIAL MINECRAFT SERVICE. NOT APPROVED BY OR ASSOCIATED WITH MOJANG OR MICROSOFT.