Releases: AlmostReliable/lootjs
Releases · AlmostReliable/lootjs
v1.21.1-Neoforge-3.2.2
- Added
matchAnyInventorySlot(itemFilter)
andmatchAnyHotbarSlot(itemFilter)
v1.21.1-Neoforge-3.1.2
- Fix loot modification being skipped when loot table doesn't contain any entries
v1.21-Neoforge-3.1.1
- Fix
print
method for loot tables. Will now print the entries correctly. - Fix
matchCustomCondition
andjsonFunction
using wrong codec.
v1.21-Neoforge-3.1.0
- Remove
addItem
for loot pools. Prefer to useaddEntry
- Deprecate
addTypeModifier
inLootJS.modifiers
and will be removed in future updates, useaddTableModifier
with a
LootType instead. - Deprecate
modifyLootTypeTables
inLootJS.lootTables
and will be removed in future updates, usemodifyLootTables
with a LootType instead.
v1.21-Neoforge-3.0.4
- Fix
.create
in loot tables event
v1.21-Neoforge-3.0.3
- Bump kubejs version
v1.21-Neoforge-3.0.2
- Add quick way to negate simple
ItemFilter
s like tag or id filter by using!
, e.g.!#c:tools
- Fix regex handling with id filters
- Rename
removeGlobalModifier
toremoveGlobalModifiers
inLootJS.modifiers
event.
v1.21-Neoforge-3.0.1
Fixes
- Fix error
Tag does not exist
when using ItemPredicates with tags
v1.21-Neoforge-3.0.0
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 itemLootEntry.empty()
: Empty entryLootEntry.tag(tag)
: Tag entryLootEntry.reference(lootTable)
: Reference to another loot table. For
example,LootEntry.reference("minecraft:chests/abandoned_mineshaft")
LootEntry.alternative(lootEntries...)
: Alternative lootLootEntry.sequence(lootEntries...)
: Sequence lootLootEntry.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
intoaddTableModifier
,addTypeModifier
,addBlockModifier
,addEntityModifier
.functions(itemFilter, (f) => {})
removed. Better to just usegroup
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 vanillaLootPool
- Removed
addWeightedLoot()
, use.pool()
instead now matchLoot
renamed intocontainsLoot
.dropExperience
can now use a number provider instead of a fixed amountLootContextJS
wrapper removed. UsingLootContext
instead but added all helper methods fromLootContextJS
too
- Loot modifiers are not executed in order anymore. It will now work like a loot table. First check for conditions
- Renamed some loot functions
- Renamed some loot conditions
- Changes to
ItemFilter
:.hasEnchantments(...)
only works for item enchantments now. Forstored
enchantments
use.hasStoredEnchantments(...)
- Removed some filters as they are no longer needed with the new data components.
- Renamed
ALWAYS_TRUE
intoALL
andALWAYS_FALSE
intoNONE
- Added
vault
,block_use
andshearing
LootType - And probably more stuff I may missed, sorry! :D Feel free to ask in our discord.
v1.20.1-2.12.0
Added
- Added
randomTableBonus(enchantment, chances)
for vanillastable_bonus
condition