Jump to content

Choonster

Moderators
  • Posts

    5147
  • Joined

  • Last visited

  • Days Won

    76

Choonster last won the day on April 21

Choonster had the most liked content!

Converted

  • Gender
    Undisclosed

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Choonster's Achievements

Reality Controller

Reality Controller (8/8)

1.7k

Reputation

  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.
×
×
  • Create New...

Important Information

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