Jump to content

Choonster

Moderators
  • Posts

    5172
  • Joined

  • Last visited

  • Days Won

    78

Everything posted by Choonster

  1. You posted in an unrelated topic and triggered the anti-spam by posting your log directly, I've split your post into its own topic. Please read the FAQ.
  2. https://github.com/positivevibes123/MinecraftExplosiveMod/blob/3dfabe6cd67213db484737c8cce650583dd894f1/src/main/java/com/gmail/damoruso321/bomb/datacomponents/ModDataComponents.java#L19 This should be DATA_COMPONENT_TYPES.register(eventBus), not eventBus.register(DATA_COMPONENT_TYPES).
  3. Have you registered the DeferredRegister with the mod event bus? You can link your GitHub repo.
  4. Forge fires RegisterEvent (which is used internally by DeferredRegister) for each registry in a specific order, so changing the registration order in your code won't help. I haven't actually been able to run my mod since 1.20.6 because I'm waiting on Item Capabilities, so I haven't encountered this error myself. It looks like you can't use your DataComponentType during Item registration, so you probably need to get/add it on demand with getOrDefault and set, instead of in registration.
  5. I don't think there's any documentation on them yet, I mainly just looked at the Vanilla code when implementing mine. You can see a fairly simple example here: Registration: https://github.com/Choonster-Minecraft-Mods/TestMod3/blob/f3bea10d5f455fa0904056caafd8c844b6fd13ae/src/main/java/choonster/testmod3/init/ModDataComponents.java#L50-L58 Item Registration: https://github.com/Choonster-Minecraft-Mods/TestMod3/blob/f3bea10d5f455fa0904056caafd8c844b6fd13ae/src/main/java/choonster/testmod3/init/ModItems.java#L264-L266 Usage: https://github.com/Choonster-Minecraft-Mods/TestMod3/blob/f3bea10d5f455fa0904056caafd8c844b6fd13ae/src/main/java/choonster/testmod3/world/item/EntityCheckerItem.java
  6. The situation is the same in 1.20.6. Data Components were introduced in 1.20.5/1.20.6 and Item Capabilities haven't been re-implemented since then.
  7. Item Capabilities haven't been re-implemented in 1.21 yet, you can use Vanilla's Data Components system instead. See DataComponents and the related classes.
  8. These are the Forge forums, we don't support Fabric here.
  9. Use the static methods in ResourceLocation to create an instance.
  10. Try using 1.20.6-50.0.5, it just fixed an issue related to enchanting: https://github.com/MinecraftForge/MinecraftForge/commit/0e829630da67c91d2b5a91ea4b65eb033f868e76
  11. This has been released as 49.0.49.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.