Restore the pre-1.8 behavior where enchanting tables are automatically populated with lapis and players cannot remove it, so enchantments work without consuming lapis and the table never exposes a removable lapis stack.
Use the supplied OldCombatMechanics example as the behavioral reference and include the required MPL 2.0 header for the adapted logic.
Description
Added an MPL 2.0 license header and new lapis-handling logic in OldEnchantOG.java to synthesize a 64-stack of lapis in the enchanting table secondary slot.
Populate the table on InventoryOpenEvent and after an enchant (EnchantItemEvent), and clear it on InventoryCloseEvent using EnchantingInventory.setSecondary(...) so nothing is left behind.
Block all common extraction/manipulation paths in the enchanting GUI by cancelling direct clicks on slot 1, double-click collection, MOVE_TO_OTHER_INVENTORY (shift-click), and relevant drag interactions, and schedule a next-tick refill to ensure the lapis stack is restored.
Added helper utilities: getLapis(), isLapis(...), fillUpEnchantingTable(...), and refillEnchantingTableNextTick(...), and switched to EnchantingInventory APIs for secondary-slot access.
Testing
Attempted ./gradlew spotlessApply compileJava, which failed in this environment because Gradle initially launched on Java 25 and errored with the runtime mismatch; this prevented a full build in the first run. (failed)
Retried with JAVA_HOME=/root/.local/share/mise/installs/java/17.0.2 ./gradlew compileJava --stacktrace, which started Gradle on Java 17 but failed dependency resolution because the com.diffplug.spotless plugin could not be resolved from the plugin repository in this environment; compilation could not be completed. (failed)
The code changes were validated by static inspection and committed locally; runtime verification on a properly configured development environment or CI (with plugin resolution enabled) is recommended to confirm behavior on a running server.
### Motivation
- Restore the pre-1.8 behavior where enchanting tables are automatically populated with lapis and players cannot remove it, so enchantments work without consuming lapis and the table never exposes a removable lapis stack.
- Use the supplied OldCombatMechanics example as the behavioral reference and include the required MPL 2.0 header for the adapted logic.
### Description
- Added an MPL 2.0 license header and new lapis-handling logic in `OldEnchantOG.java` to synthesize a 64-stack of lapis in the enchanting table secondary slot.
- Populate the table on `InventoryOpenEvent` and after an enchant (`EnchantItemEvent`), and clear it on `InventoryCloseEvent` using `EnchantingInventory.setSecondary(...)` so nothing is left behind.
- Block all common extraction/manipulation paths in the enchanting GUI by cancelling direct clicks on slot 1, double-click collection, `MOVE_TO_OTHER_INVENTORY` (shift-click), and relevant drag interactions, and schedule a next-tick refill to ensure the lapis stack is restored.
- Added helper utilities: `getLapis()`, `isLapis(...)`, `fillUpEnchantingTable(...)`, and `refillEnchantingTableNextTick(...)`, and switched to `EnchantingInventory` APIs for secondary-slot access.
### Testing
- Attempted `./gradlew spotlessApply compileJava`, which failed in this environment because Gradle initially launched on Java 25 and errored with the runtime mismatch; this prevented a full build in the first run. (failed)
- Retried with `JAVA_HOME=/root/.local/share/mise/installs/java/17.0.2 ./gradlew compileJava --stacktrace`, which started Gradle on Java 17 but failed dependency resolution because the `com.diffplug.spotless` plugin could not be resolved from the plugin repository in this environment; compilation could not be completed. (failed)
- The code changes were validated by static inspection and committed locally; runtime verification on a properly configured development environment or CI (with plugin resolution enabled) is recommended to confirm behavior on a running server.
------
[Codex Task](https://chatgpt.com/codex/tasks/task_e_69c1240a2464832f956f4f03133a14c1)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Motivation
Description
OldEnchantOG.javato synthesize a 64-stack of lapis in the enchanting table secondary slot.InventoryOpenEventand after an enchant (EnchantItemEvent), and clear it onInventoryCloseEventusingEnchantingInventory.setSecondary(...)so nothing is left behind.MOVE_TO_OTHER_INVENTORY(shift-click), and relevant drag interactions, and schedule a next-tick refill to ensure the lapis stack is restored.getLapis(),isLapis(...),fillUpEnchantingTable(...), andrefillEnchantingTableNextTick(...), and switched toEnchantingInventoryAPIs for secondary-slot access.Testing
./gradlew spotlessApply compileJava, which failed in this environment because Gradle initially launched on Java 25 and errored with the runtime mismatch; this prevented a full build in the first run. (failed)JAVA_HOME=/root/.local/share/mise/installs/java/17.0.2 ./gradlew compileJava --stacktrace, which started Gradle on Java 17 but failed dependency resolution because thecom.diffplug.spotlessplugin could not be resolved from the plugin repository in this environment; compilation could not be completed. (failed)Codex Task