▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
Моды/Random Item Generator Resurrected
Random Item Generator Resurrected

Random Item Generator Resurrected

Break regenerating blocks for random items, entities, enchanted books, or chest loot, with filters for modded content.

Оцените первым
1.5K
2
Все версии→Random Item Generator Resurrected 2.0.1

Random Item Generator Resurrected 2.0.1

Release04.07.2026

Список изменений

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 via FMLJavaModLoadingContext.get().getModEventBus().
  • DeferredHolder → RegistryObject.
  • DeferredRegister.createBlocks(MODID) / .createItems(MODID) (NeoForge sugar methods) → explicit DeferredRegister.create(ForgeRegistries.BLOCKS, MODID) / create(ForgeRegistries.ITEMS, MODID).
  • Config registration moved from the injected ModContainer to ModLoadingContext.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, build all unchanged).
  • isEnchantAllowed(Holder<Enchantment>) → isEnchantAllowed(Enchantment). In 1.20.1 enchantments aren't a Holder-wrapped dynamic registry entry; ID lookup now goes through ForgeRegistries.ENCHANTMENTS.getKey(ench).
  • Legacy alias methods isEnchantBlacklisted/isEnchantModBlacklisted updated to match the new Enchantment parameter type.

ItemBlock.java

  • Removed the Holder<Enchantment> registry-lookup dance for Silk Touch/Fortune. In 1.20.1, Enchantments.SILK_TOUCH and Enchantments.BLOCK_FORTUNE are plain Enchantment objects usable directly with EnchantmentHelper.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 explicit bus = Mod.EventBusSubscriber.Bus.MOD.
    • Bug fix: Forge's default bus for @Mod.EventBusSubscriber is the Forge/game bus, not the mod bus. FMLCommonSetupEvent only fires on the mod bus, so without this the listener silently never ran, RANDOM_ENTITIES stayed permanently empty, and — because both the mob-spawn branch and the Silk Touch drop branch were nested inside if (!RANDOM_ENTITIES.isEmpty()) — neither mob spawning nor Silk Touch drops ever worked.
  • Same Holder<Enchantment> → plain Enchantment simplification as ItemBlock, in both onDestroyedByPlayer and getDrops.
  • Enchantments.FORTUNE → Enchantments.BLOCK_FORTUNE.

EnchantsBlock.java

  • net.minecraft.tags.EnchantmentTags doesn't exist in 1.20.1 (curse tagging is a later-version feature). Curse filtering now uses Enchantment#isCurse().
  • Enchantment pool no longer comes from level.registryAccess().registryOrThrow(Registries.ENCHANTMENT) (a dynamic/datapack registry in 1.21). It's now sourced from ForgeRegistries.ENCHANTMENTS.getValues(), since enchantments are a static Forge registry in 1.20.1.
  • EnchantmentInstance now built directly from Enchantment, not Holder<Enchantment>.
  • Same Silk Touch/Fortune simplification and rename as the other blocks.

LootBlock.java

  • Registries.LOOT_TABLE doesn'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's LootDataManager API).
  • Pool type changed from List<ResourceKey<LootTable>> to List<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 explicit bus = Mod.EventBusSubscriber.Bus.MOD — RegisterEvent is a mod-bus event, same underlying issue as EntityBlock. Left un-fixed, ITEM_BLOCK_USES etc. would have stayed null, risking an NPE on sp.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.

Файлы

random_item_generator_resurrected-2.0.1.jar(57.73 KiB)
Основной
Скачать

Метаданные

Канал релиза

Release

Номер версии

2.0.1

Загрузчики

Forge

Версии игры

1.20.1–1.20.6

Загрузок

102

Дата публикации

04.07.2026

Загрузил

ID версии

Главная