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

Mishap for providing something other than an entity as Flay Mind's first argument has a broken lang key #831

Open
Robotgiggle opened this issue Jan 16, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@Robotgiggle
Copy link
Contributor

Robotgiggle commented Jan 16, 2025

Modloader

Forge, Fabric

Minecraft version

1.20.1

Hex Casting version

0.11.2

Issue description

If you pass Flay Mind something that isn't an entity in the place where it's expecting an entity, the function shown below causes a mishap:

Image

However, entity.mob is not a valid lang key, and thus you get a mishap message that looks something like this:

Image

This could be fixed in a variety of ways. A new lang entry could be added for entity.mob, but I don't think this is actually necessary. There's already one for entity.living, so the getMob() function could just be changed to use that instead.

Alternatively, getMob() could be removed entirely (it's only used for OpBrainsweep) and replaced with the nearly identical getLivingEntityButNotArmorStand() function which is currently used in OpPotionEffect. This would, however, require changing various bits of brainsweep-related code to expect a LivingEntity rather than a Mob.

Steps to reproduce

  1. Attempt to cast Flay Mind with something other than an entity as the first argument
  2. Observe broken mishap message
  3. Observe that the mishap.invalid_value.class.entity section of the lang file doesn't have an entry for mob
@Robotgiggle Robotgiggle added the bug Something isn't working label Jan 16, 2025
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Hex Casting Jan 16, 2025
@Robotgiggle Robotgiggle changed the title Mishap when giving Flay Mind something other than an entity gives a broken lang key Mishap for providing something other than an entity as Flay Mind's first argument has a broken lang key Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant