Electroblob77 / Wizardry

Source code for Electroblob's Wizardry, a Minecraft mod about magic, exploration and adventure. Open-source so other aspiring wizards (a.k.a. programmers 😎) can see the real magic! ✨ Just want to download and play? Head over to the CurseForge page via the link below:
https://minecraft.curseforge.com/projects/electroblobs-wizardry
Other
200 stars 106 forks source link

[Suggestion] Cast Command - With Vector #516

Open Xarmat-GitHub opened 4 years ago

Xarmat-GitHub commented 4 years ago

Minecraft versions: 1.12.2 Other mods involved: CustomNPC (Mainly), Spell Packs (from other Mod Authors)

Expand Functonality of "/cast" commands

I am working on a Adventure Modpack and want to make nice balanced Boss fights with different Boss Stages (like in many MMORPGs).

To accomplish this, I use NPC Scripting, Command Blocks and the "/execute" command with Electroblobs (EW).

How it Works: Both commands works fine: /execute @s ~ ~ ~ cast tfspellpack:fire_jets @s <- command used by CustomNPCs (works like a command block) /execute @e[type=zombie] ~ ~ ~ cast tfspellpack:fire_jets @s <- command used in a command block

Lack of Functionality: But "/cast ebwizardry:dart" and many other spells don't work. I think that the main reason is that the command can not get any Vector based informations. So it can not know where the "Dart" (ebwizardry:dart) will fly. Or the Fire Trap will be placed. Because it don't the direction the mob is looking.

Suggestion: So my suggestion would be, to get the vector of the mob when the command get executed and use this information to cast the spell like it regular would, when a player cast it with /cast SPELL

/execute @e[type=zombie] ~ ~ ~ cast ebwizardry:dart @s

Stay in Contact: Xarmat #7574

Electroblob77 commented 4 years ago

Interesting. The way spells work when cast by wizards is they use the AI target, not the direction the entity is looking. I do have a plan to add the @e selector to the /cast command so in theory that would be able to achieve what you're suggesting.

Xarmat-GitHub commented 4 years ago

That would be great. This mod has a huge potential for boss fights and other uses. I will be amazed when this works. 🙌

233Neon commented 1 year ago

Bumping, It would be great if the @e feature was added soon! That way we could use spells on armor stands, thanks!