Change the appearance and sound for the changeling ability

This commit is contained in:
Sollace 2019-03-08 22:55:52 +02:00
parent a3995ece46
commit 734fa9d140

View file

@ -1,5 +1,6 @@
package com.minelittlepony.unicopia.spell; package com.minelittlepony.unicopia.spell;
import com.minelittlepony.unicopia.init.USounds;
import com.minelittlepony.unicopia.player.IPlayer; import com.minelittlepony.unicopia.player.IPlayer;
import com.minelittlepony.unicopia.player.PlayerSpeciesList; import com.minelittlepony.unicopia.player.PlayerSpeciesList;
import com.minelittlepony.util.WorldEvent; import com.minelittlepony.util.WorldEvent;
@ -8,19 +9,20 @@ import com.minelittlepony.util.vector.VecHelper;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks; import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.init.MobEffects; import net.minecraft.init.MobEffects;
import net.minecraft.init.SoundEvents; import net.minecraft.init.SoundEvents;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTUtil; import net.minecraft.nbt.NBTUtil;
import net.minecraft.potion.PotionEffect; import net.minecraft.potion.PotionEffect;
import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.EnumParticleTypes;
import net.minecraft.util.SoundEvent;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World; import net.minecraft.world.World;
public class SpellChangelingTrap extends AbstractSpell implements ITossedEffect, IAttachedEffect { public class SpellChangelingTrap extends AbstractSpell implements ITossedEffect, IAttachedEffect {
private BlockPos previousTrappedPosition; private BlockPos previousTrappedPosition;
private int struggleCounter = 10; private int struggleCounter = 10;
@ -40,6 +42,16 @@ public class SpellChangelingTrap extends AbstractSpell implements ITossedEffect,
return false; return false;
} }
@Override
public SoundEvent getThrowSound(ICaster<?> caster) {
return USounds.SLIME_RETRACT;
}
@Override
public ItemStack getCastAppearance(ICaster<?> caster) {
return new ItemStack(Items.SLIME_BALL);
}
@Override @Override
public boolean updateOnPerson(IPlayer caster) { public boolean updateOnPerson(IPlayer caster) {
EntityPlayer entity = caster.getOwner(); EntityPlayer entity = caster.getOwner();