Create

Create

86M Downloads

[1.18.2] Datagen of addon mods breaks when using AllTags class with blocks generation

Lgmrszd opened this issue ยท 2 comments

commented

Describe the Bug

When registering blocks using Create's CreateRegistrate and using static fields of com.simibubi.create.AllTags class (i.e. axeOrPickaxe() transformer or AllTags.AllBlockTags.SAFE_NBT.tag tag), Create's own Create Registrate is called on this step. I am not sure what's happening after that but looks like it tries to register Create's blocks in whatever mod context it has been called. It's mostly noticeable when using gradle runData task which fails because Create's datagen is getting called as well.

If I remove all mentions of AllTags in my mod's block registration section, this problem does not occur.

Reproduction Steps

  1. Make simple Create add-on mod utilising CreateRegistrate
  2. Have static calls to AllTags
  3. Attempt to runData
  4. Fail.

Expected Result

Being able to access tags and transformers without awakening Create's own registrate.

Screenshots and Videos

No response

Crash Report or Log

https://gist.github.com/Lgmrszd/afb3bec1f6bcac3565c78cc7983deb0d

Operating System

Linux

Mod Version

0.4.1

Minecraft Version

1.18.2

Forge Version

40.1.20

Other Mods

I had other mods in my dev environment but I don't think they are relevant:
Patchouli
PNC:R
JEI

Additional Context

I've encountered this problem on 0.4.1 version of Create, but it happens on 0.5.0c as well.

commented

Can confirm. This likely happens because of the CreateRegistrate#addDataGenerator calls in the various tag constructors.

commented

Fixed by 131c9a5.