Files
DupeAlias/Ideas.md
2025-07-09 21:34:08 -04:00

37 lines
10 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
Infinite Item - one that always stays at max stack size.
| Action (Event Handler) | Blocks Protected? | Blocks Final? | Notes / Hand Nuance |
|--------------------------------------------------------------|---------------------------------|------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **onCraftItem**<br/>(`CraftItemEvent`) | ✅ result | ✅ ingredients when modifying | Only cancels crafting **Protected** results. For **Final** ingredients it uses a heuristic (`isModifyingCraft`) to see if the recipe would alter the item. |
| **onSmithingTableUse**<br/>(`PrepareSmithingEvent`) | ✅ result | ✅ base or addition | Smithing always “modifies” the base; both base and addition are checked for **Final**. |
| **onEnchantItem**<br/>(`EnchantItemEvent`) | ❌ (Protected can be enchanted) | ✅ item | Only checks the single item in the enchanting slot (no off-hand concept). |
| **onPrepareEnchant**<br/>(`PrepareItemEnchantEvent`) | ❌ | ✅ item | Prevents placing a **Final** item into the table; no hand distinction. |
| **onAnvilUse**<br/>(`PrepareAnvilEvent`) | ✅ result | ✅ first/second if modifying | Heuristic same as crafting. Cancels creation of **Protected** results and any **Final** input being “modified.” |
| **onBrew**<br/>(`BrewEvent`) | ✅ ingredient & results | ✅ bottles | Checks the single “ingredient” slot for **Protected**, then all bottle slots for **Final**. |
| **onBrewingStandFuel**<br/>(`BrewingStandFuelEvent`) | ✅ fuel | ❌ | Only checks the one fuel slot. |
| **onFurnaceBurn**<br/>(`FurnaceBurnEvent`) | ❌ | ✅ fuel | Only the one fuel slot. |
| **onFurnaceSmelt**<br/>(`FurnaceSmeltEvent`) | ✅ result | ✅ source | Checks both source (no fuel here) for **Final** and result for **Protected**. |
| **onSpecialCraft**<br/>(`PrepareItemCraftEvent`) | ✅ result | ✅ various inputs | Covers Loom, Cartography, Grindstone, Stonecutter. Only the specific input slots per inventory type are checked for **Final**. |
| **onCauldron**<br/>(`CauldronLevelChangeEvent`) | ❌ | ✅ main & off | Explicitly checks both `getItemInMainHand()` **and** `getItemInOffHand()` for **Final**. |
| **onCommand**<br/>(`PlayerCommandPreprocessEvent`) | ❌ | ✅ main & off | Checks both hands items against configured command-regex; if the command could modify a **Final** item in either hand, its cancelled. |
| **onPickUp**<br/>(`EntityPickupItemEvent`) | ✅ non-player only | ❌ | Only blocks non-players from picking up **Protected** items. |
| **onBlockPlace**<br/>(`BlockPlaceEvent`) | ✅ in-hand item | ❌ | Uses `event.getItemInHand()` (the hand used) to prevent placing **Protected** items. |
| **onPlayerInteract**<br/>(`PlayerInteractEvent`) | ✅ item | ✅ only when filling bottles | Blocks any use of **Protected** items. For **Final**, only blocks filling a bottle/bucket (checks both material and water target), using `event.getItem()` (hand-sensitive). |
| **onBucketEmpty**<br/>(`PlayerBucketEmptyEvent`) | ✅ hand item | ✅ hand item | Uses `event.getHand()` to locate the bucket (main vs. off) and blocks emptying either **Protected** or **Final** buckets. |
| **onBucketFill**<br/>(`PlayerBucketFillEvent`) | ✅ hand item | ✅ hand item | Same as empty: checks bucket in the hand specified by `event.getHand()`. |
| **onBucketFish**<br/>(`PlayerBucketEntityEvent`) | ✅ original bucket | ✅ original bucket | Uses `event.getOriginalBucket()`, so it covers the bucket used to capture an entity (no main/off distinction here). |
| **onPlayerInteractEntity**<br/>(`PlayerInteractEntityEvent`) | ✅ hand item | ❌ | Uses `event.getHand()`, but only blocks **Protected** items. |
| **onItemConsume**<br/>(`PlayerItemConsumeEvent`) | ✅ item | ❌ | Single `event.getItem()`, blocks **Protected** consumables only. |
| **onBowShoot**<br/>(`EntityShootBowEvent`) | ✅ bow or ammo | ✅ bow | Checks both the bow (main hand item) and the ammo for **Protected**, and stops any **Final** bow use. |
| **onProjectileLaunch**<br/>(`ProjectileLaunchEvent`) | ✅ held item (incl. projectiles) | ❌ | Looks at `ItemStack` in hand or from the projectiles `getItem()`. |
| **onAttack**<br/>(`EntityDamageByEntityEvent`) | ✅ main hand item | ❌ | Only checks `player.getInventory().getItemInMainHand()`. |
| **onBreakBlock**<br/>(`BlockBreakEvent`) | ✅ main hand item | ❌ | Same: only the main hand tool is checked. |
| **onDispense**<br/>(`BlockDispenseEvent`) | ✅ dispensed item | ❌ | Does not consider any player hand. |
| **onItemDamage**<br/>(`PlayerItemDamageEvent`) | ❌ | ✅ item | Prevents durability loss on **Final** items (single item context). |
| **onItemMend**<br/>(`PlayerItemMendEvent`) | ❌ | ✅ item | Prevents XP-mending of **Final** items. |
| **onBlockDrop**<br/>(`BlockDropItemEvent`) | ✅ world drops | ❌ | Filters out **Protected** item drops from any block. |
| **onItemSpawn**<br/>(`ItemSpawnEvent`) | ✅ world spawns | ❌ | Cancels spawning of **Protected** items from non-player sources. |
| **onInventoryClick**<br/>(`InventoryClickEvent`) | ✅ protected in trade result | ❌ | Only blocks taking **Protected** items from a villager “RESULT” slot (no check on **Final**). |
| **onInventoryMove**<br/>(`InventoryMoveItemEvent`) | ✅ item | ❌ | Prevents hoppers/droppers from moving **Protected** items only. |