Skip to content

Instant loot framework#583

Merged
ImplementsLegend merged 2 commits into
mainfrom
ImplementsLegend/instant-loot
Feb 21, 2026
Merged

Instant loot framework#583
ImplementsLegend merged 2 commits into
mainfrom
ImplementsLegend/instant-loot

Conversation

@ImplementsLegend

Copy link
Copy Markdown
Contributor

Adds instant loot Data Component.

Any item with this data component will be consumed instantly when:

  • picked up
  • clicked in an inventory

Healing potions have been changed to an instant loot.

Closes #581

Future work:
Apply in AOE. (or cast an ability when instant loot is collected)
Add some new items with custom models.

Could be used for an alternate Item Objective.

feat: added HealReward and AbilityResourceReward
feat: added RewardInstantLootFunction and WrappingConditionalLootFunction
change: potions in wooden chests are now instant loot

Any item with InstantLoot component will be instantly consumed when picked up or interacted with in inventory

@immortius immortius left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Might want to add InstantLoot::tryConsume to some of the methods in ItemStackHandlerUtil which are used when players close a temporary inventory screen (like the reward screen) so they don't end up with InstantLoot items in their inventory from that mechanism.

refactor: simplified addOrGiveToPlayerOrDrop, changed ServerPlayer parameter of placeInPlayerInventoryOrDrop to Player
@ImplementsLegend
ImplementsLegend merged commit 4775a14 into main Feb 21, 2026
2 checks passed
@Attack8
Attack8 deleted the ImplementsLegend/instant-loot branch March 21, 2026 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Instant Loot

2 participants