Chicken Transformation Spell

Planning
Step 1
In this lesson you are going to use what you've learned to create a spell that transforms entities into chickens!

It is recommended that you complete The Wand and the Vanishing Spell lessons before attempting this challenge unless you have prior experience with:

  • Custom items
  • Crafting recipes
  • The entityDamageByEntity event.
Temp1477521727
Challenge
Step 2
Create a new custom item `magicWand_Chicken` of (Chickenator)

This wand can be crafted using a magicWand and whatever other ingredients you choose.

Here I used rawChicken and feather

Temp1477521488

Feel free to name the spell whatever you want in the lore.

My lore read "Pullus Transverto" which is Latin for "transform into chicken"

Challenge
Step 3
Use `world.spawnEntity()` described below to spawn a chicken when an enemy vanishes due to the Chickenator

Here is what the reference manual says about world.spawnEntity()

This is very similar to world.spawnParticle()

Temp1498246550

Questions:

  • How can you get the location data from the entity?

  • You can get the type parameter using entityType.nameOfEntity

Check Your Work
Step 4
The result

If you have completed this challenge successfully you should be able to cast this spell while holding a magicWand_Chicken

Try one of these lessons next:

Chicken Transformation Spell Info

Account

MVCode Clubs

Created By

Mvcc logo new aaron

Course:

Wand World

Access Level

premium

For Teachers and Schools

Teach coding to your students with MVCode Teach

MVCode offers an integrated product designed to teach coding to students.

Learn more about MVCode Teach