Fixed mudball throwing
This commit is contained in:
parent
91dec0647c
commit
37fffaf09c
2 changed files with 8 additions and 2 deletions
|
@ -3,10 +3,12 @@ package biomesoplenty.common.entities.projectiles;
|
|||
import biomesoplenty.api.particle.BOPParticleTypes;
|
||||
import biomesoplenty.core.BiomesOPlenty;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.IProjectile;
|
||||
import net.minecraft.entity.projectile.EntityThrowable;
|
||||
import net.minecraft.init.MobEffects;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.datafix.DataFixer;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
@ -27,6 +29,11 @@ public class EntityMudball extends EntityThrowable
|
|||
{
|
||||
super(worldIn, x, y, z);
|
||||
}
|
||||
|
||||
public static void registerFixesMudball(DataFixer fixer)
|
||||
{
|
||||
EntityThrowable.registerFixesThrowable(fixer, "mudball");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onImpact(RayTraceResult hit)
|
||||
|
|
|
@ -41,8 +41,7 @@ public class ItemMudball extends Item
|
|||
if (!world.isRemote)
|
||||
{
|
||||
EntityMudball mudball = new EntityMudball(world, player);
|
||||
//TODO: replace this
|
||||
//mudball.func_184538_a(player, player.rotationPitch, player.rotationYaw, 0.0F, 1.5F, 1.0F);
|
||||
mudball.setHeadingFromThrower(player, player.rotationPitch, player.rotationYaw, 0.0F, 1.5F, 1.0F);
|
||||
world.spawnEntityInWorld(mudball);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue