Minecraftforge: [1.12] Can't register new ICriterionTrigger

Created on 30 Jun 2017  路  12Comments  路  Source: MinecraftForge/MinecraftForge

I want to register new ICriterionTrigger with CriteriaTriggers to use it in advancement-json, but ICriterionTrigger.REGISTRY and ICriterionTrigger.register is private so I can't do it.

1.12

Most helpful comment

"extensive" meaning what?

Let's just focus on the singular issue at hand: can't register triggers. Solution? Make the method public. Done. Anything else can go in another ticket or PR

All 12 comments

Try using the registry events
RegistryEvent.Register<ICriterionTrigger>

RegistryEvent.Register can't use for registering ICriterionTrigger because ICriterionTrigger do not extend(implement) IForgeRegistryEntry

@Alpvax It is not in forge registries yet. Use reflections for now, or Access Transformers.

Ah, my mistake

Advancements are still being looked at, there is a lot to consider still. Forge does not have full support for modded advancements yet.

This issue has been automatically marked as stale because it has not had activity in a long time, and will be closed if no further activity occurs. If this issue was overlooked, forgotten, or should remain open for any other reason, please reply here to call attention to it and remove the stale status. Thank you for your contributions.

I am shocked that we haven't dealt with this yet

Yeah, I have to use reflection in Trophy Slots to add my own criterion trigger. A non-hacky method would be nice.

@Lomeli12 since you already know how to do it for Trophy Slots, can you make a PR to Forge to make a clean way of doing it?

I mean, this should just be adding the relevant method to the forge AT right?

I think we need a more extensive api for the future.

"extensive" meaning what?

Let's just focus on the singular issue at hand: can't register triggers. Solution? Make the method public. Done. Anything else can go in another ticket or PR

Was this page helpful?
0 / 5 - 0 ratings