mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-12-17 23:48:00 +01:00
Render the correct itemstack for thrown spells
This commit is contained in:
parent
28e294803e
commit
903e2462aa
1 changed files with 4 additions and 1 deletions
|
@ -5,6 +5,7 @@ import com.minelittlepony.unicopia.init.UItems;
|
|||
import com.minelittlepony.unicopia.tossable.ITossable;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.world.World;
|
||||
|
@ -21,7 +22,9 @@ public interface ITossedEffect extends IMagicEffect, ITossable<ICaster<?>> {
|
|||
if (!world.isRemote) {
|
||||
EntityProjectile projectile = new EntityProjectile(world, caster.getOwner());
|
||||
|
||||
projectile.setItem(new ItemStack(UItems.spell));
|
||||
Item item = this.getAffinity() == SpellAffinity.BAD ? UItems.curse : UItems.spell;
|
||||
|
||||
projectile.setItem(SpellRegistry.instance().enchantStack(new ItemStack(item), getName()));
|
||||
projectile.setThrowDamage(getThrowDamage(caster));
|
||||
projectile.setOwner(caster.getOwner());
|
||||
projectile.setEffect(this);
|
||||
|
|
Loading…
Reference in a new issue