Backport Random Loot 2 to Minecraft 1.12.2#22
Open
TheMarstonConnell wants to merge 5 commits into1.21.xfrom
Open
Backport Random Loot 2 to Minecraft 1.12.2#22TheMarstonConnell wants to merge 5 commits into1.21.xfrom
TheMarstonConnell wants to merge 5 commits into1.21.xfrom
Conversation
- Convert from NeoForge 1.21.11 to Forge 1.12.2 (14.23.5.2860) - Replace DataComponents with NBT-based storage (LootNBT.java) - Port all 39 modifiers with 1.12.2 API translations - Implement dynamic texture system with ItemPropertyGetter - Add anvil recipe handler for trait modification (30 XP cost) - Add loot table injection for dungeon chests - Update build system to RetroFuturaGradle 1.4.1 - Fix stat tracking for goodness progression - Convert lang files from JSON to .lang format
Use HarvestDropsEvent to intercept drops before they spawn instead of trying to find dropped items after the fact. This ensures consistent smelting behavior.
Add @Mod.EventBusSubscriber annotation and make methods static so the event handler is properly registered with Forge.
Corrected tagNames: - teleportuse -> void_touched - torchplace -> torch_place - dirtplace -> dirt_place - fireplace -> fire_place - fireball -> flame_thrower - charging -> charged - orefinder -> detecting - spawnerfinder -> spawner - draining -> necrotic Added missing recipes for absorption and soulbound.
Code reviewIssue found: Potential NullPointerException in Soulbound.isOwner() The Impact: This will cause a NullPointerException crash whenever a tool with the Soulbound modifier is used and does not have an ownerUUID set in its NBT data. Suggested fix: Change line 115 to check for null: if (ownerUUID == null || ownerUUID.isEmpty()) { |
Register old item IDs (tools, cases, armor) so they don't disappear when players upgrade from the original 1.12 mod. When held in hand, legacy items convert to a case with a thank you message.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Backports Random Loot 2 from NeoForge 1.21.11 to Forge 1.12.2.
Changes
LootNBT.java)ItemPropertyGetterfor 91 tool texturesLootTableLoadEventHarvestDropsEventfor reliable auto-smeltingRemoved (1.12.2 incompatible)
Testing
Tested on Apple Silicon Mac via Rosetta with x86_64 Java 8. Core functionality verified:
Build
./gradlew build # Output: build/libs/randomloot-1.0.0-1.12.2.jar