Add dupe prevention mechanism and fix LiteProfiles menu edge case

This commit is contained in:
Rares Bozga
2026-03-21 13:33:28 +02:00
parent 44530c5edf
commit 6094306182
5 changed files with 33 additions and 3 deletions

View File

@@ -0,0 +1,26 @@
no_duping_custom_items:
debug: false
type: world
events:
on player clicks item in inventory:
- if <player.is_op>:
- stop
- if <player.gamemode> != creative:
- stop
- if <context.item.material.advanced_matches[iron_horse_armor|note_block].if_null[true]> && <context.cursor_item.material.advanced_matches[iron_horse_armor|note_block].if_null[true]>:
- stop
- if <context.item.has_custom_model_data.if_null[false]> || <context.cursor_item.has_custom_model_data.if_null[false]>:
- determine cancelled passively
- adjust <player> item_on_cursor:air
- inventory update
on player drags in inventory:
- if <player.is_op>:
- stop
- if <player.gamemode> != creative:
- stop
- if <context.item.material.advanced_matches[iron_horse_armor|note_block].if_null[true]> && <context.cursor_item.material.advanced_matches[iron_horse_armor|note_block].if_null[true]>:
- stop
- if <context.item.has_custom_model_data.if_null[false]> || <context.cursor_item.has_custom_model_data.if_null[false]>:
- determine cancelled passively
- adjust <player> item_on_cursor:air
- inventory update