Tags
Creators
Details
Licensed ARR
Published 2 years ago
Updated 3 months ago
All versions
2.0.1
Release
Random Item Generator Resurrected 2.0.14 months ago 176
Compatibility
Minecraft: Java Edition
1.20.1–1.20.6
Platform
Forge
Supported environments
Client and server
Changes
Random Item Generator Resurrected — NeoForge 1.21.1 → Forge 1.20.1 Port
RIGR.java (main mod class)
net.neoforged.*→net.minecraftforge.*package roots throughout.- Removed constructor-injected
IEventBus/ModContainer(a NeoForge-only pattern). Mod constructor is now no-arg; the event bus is retrieved viaFMLJavaModLoadingContext.get().getModEventBus(). DeferredHolder→RegistryObject.DeferredRegister.createBlocks(MODID)/.createItems(MODID)(NeoForge sugar methods) → explicitDeferredRegister.create(ForgeRegistries.BLOCKS, MODID)/create(ForgeRegistries.ITEMS, MODID).- Config registration moved from the injected
ModContainertoModLoadingContext.get().registerConfig(...).
RIGConfig.java
net.neoforged.neoforge.common.ModConfigSpec→net.minecraftforge.common.ForgeConfigSpec(Forge's original, pre-rename class — API is otherwise identical:Builder,push/pop,defineList,buildall unchanged).isEnchantAllowed(Holder<Enchantment>)→isEnchantAllowed(Enchantment). In 1.20.1 enchantments aren't aHolder-wrapped dynamic registry entry; ID lookup now goes throughForgeRegistries.ENCHANTMENTS.getKey(ench).- Legacy alias methods
isEnchantBlacklisted/isEnchantModBlacklistedupdated to match the newEnchantmentparameter type.
ItemBlock.java
- Removed the
Holder<Enchantment>registry-lookup dance for Silk Touch/Fortune. In 1.20.1,Enchantments.SILK_TOUCHandEnchantments.BLOCK_FORTUNEare plainEnchantmentobjects usable directly withEnchantmentHelper.getItemEnchantmentLevel(...). Enchantments.FORTUNE→Enchantments.BLOCK_FORTUNE(renamed in 1.20.1).
EntityBlock.java
net.neoforged.bus.api.SubscribeEvent→net.minecraftforge.eventbus.api.SubscribeEvent.@EventBusSubscriber→@Mod.EventBusSubscriber, with explicitbus = Mod.EventBusSubscriber.Bus.MOD.- Bug fix: Forge's default bus for
@Mod.EventBusSubscriberis the Forge/game bus, not the mod bus.FMLCommonSetupEventonly fires on the mod bus, so without this the listener silently never ran,RANDOM_ENTITIESstayed permanently empty, and — because both the mob-spawn branch and the Silk Touch drop branch were nested insideif (!RANDOM_ENTITIES.isEmpty())— neither mob spawning nor Silk Touch drops ever worked.
- Bug fix: Forge's default bus for
- Same
Holder<Enchantment>→ plainEnchantmentsimplification asItemBlock, in bothonDestroyedByPlayerandgetDrops. Enchantments.FORTUNE→Enchantments.BLOCK_FORTUNE.
EnchantsBlock.java
net.minecraft.tags.EnchantmentTagsdoesn't exist in 1.20.1 (curse tagging is a later-version feature). Curse filtering now usesEnchantment#isCurse().- Enchantment pool no longer comes from
level.registryAccess().registryOrThrow(Registries.ENCHANTMENT)(a dynamic/datapack registry in 1.21). It's now sourced fromForgeRegistries.ENCHANTMENTS.getValues(), since enchantments are a static Forge registry in 1.20.1. EnchantmentInstancenow built directly fromEnchantment, notHolder<Enchantment>.- Same Silk Touch/Fortune simplification and rename as the other blocks.
LootBlock.java
Registries.LOOT_TABLEdoesn't exist in 1.20.1 — loot tables aren't a queryable registry until 1.21. Dynamic enumeration of all registered loot tables was removed entirely.server.getServer().reloadableRegistries().getLootTable(chosen)→server.getServer().getLootData().getLootTable(chosen)(1.20.1'sLootDataManagerAPI).- Pool type changed from
List<ResourceKey<LootTable>>toList<ResourceLocation>to match the above. - Known limitation: the loot pool is now built solely from the hardcoded vanilla fallback list (15 vanilla
chests/...tables). Modded loot tables are never included, since there's no public API in Forge 1.20.1 to enumerate them.
RIGStats.java
net.neoforged.*→net.minecraftforge.*package roots.@EventBusSubscriber→@Mod.EventBusSubscriber, also given explicitbus = Mod.EventBusSubscriber.Bus.MOD—RegisterEventis a mod-bus event, same underlying issue asEntityBlock. Left un-fixed,ITEM_BLOCK_USESetc. would have stayednull, risking an NPE onsp.awardStat(...).ResourceLocation.fromNamespaceAndPath(...)(1.21-only) →new ResourceLocation(...)constructor (deprecated-for-removal in 1.20.1 but functional; produces a compiler warning, not an error).
Cross-cutting notes
- Modded items, mobs, and enchantments are all picked up automatically (Item Block, Entity Block, Enchants Block all read from shared cross-mod registries).
- Modded loot tables are not picked up (Loot Block) — this is a hard limitation of Forge 1.20.1's loot table API, not a bug.
- File structure was kept as one class per block type (not merged) — standard practice, no functional difference.
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:ND9WenG8:Kzg08Iba"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:ND9WenG8:Kzg08Iba"
}

