Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility issues with ProbeJS #2

Open
Rimevel opened this issue Feb 13, 2024 · 1 comment
Open

Compatibility issues with ProbeJS #2

Rimevel opened this issue Feb 13, 2024 · 1 comment

Comments

@Rimevel
Copy link

Rimevel commented Feb 13, 2024

Forge 1.19.2
Mod version: 1.0

Using the /probejs dump command to generate typings errors out consistently with Sortilage in the same pack. This seem to be related to Sortilege antidotes.

See link for more info: Prunoideae/ProbeJS#56

@Prunoideae
Copy link

Prunoideae commented Feb 13, 2024

This can be fixed on the ProbeJS side by adding a try-catch here. But I noticed that in your code

return Component.translatable(PotionUtils.getPotion(itemstack).getEffects().get(0).getDescriptionId())

has an assertion of the Potion must have at least one effect, where the potion can actually have none considering intermediate potions like Potions.WATER or Potions.AWKWARD:

	EMPTY = register(EMPTY_ID, new Potion(new MobEffectInstance[0]));
	WATER = register("water", new Potion(new MobEffectInstance[0]));
	MUNDANE = register("mundane", new Potion(new MobEffectInstance[0]));
	THICK = register("thick", new Potion(new MobEffectInstance[0]));
	AWKWARD = register("awkward", new Potion(new MobEffectInstance[0]));

The default instance of a Potion item is the water bottle, so that's why an exception is thrown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants