Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package thaumcraftextras.items.foci.entities;
- import net.minecraft.entity.Entity;
- import net.minecraft.entity.EntityLiving;
- import net.minecraft.entity.EntityLivingBase;
- import net.minecraft.entity.projectile.EntityThrowable;
- import net.minecraft.potion.Potion;
- import net.minecraft.potion.PotionEffect;
- import net.minecraft.util.MovingObjectPosition;
- import net.minecraft.world.World;
- public class ProjectileFreeze extends EntityThrowable
- {
- public ProjectileFreeze(World par1World)
- {
- super(par1World);
- }
- public ProjectileFreeze(World par1World, EntityLivingBase par2EntityLivingBase)
- {
- super(par1World, par2EntityLivingBase);
- }
- public ProjectileFreeze(World par1World, double par2, double par4, double par6)
- {
- super(par1World, par2, par4, par6);
- }
- protected void onImpact(MovingObjectPosition mop)
- {
- if (mop.entityHit != null)
- {
- Entity hit = mop.entityHit;
- System.out.print(hit.posX + "\n");
- System.out.print(hit.posY + "\n");
- System.out.print(hit.posZ + "\n");
- int i = 0;
- while(i < 100)
- {
- hit.posX = hit.prevPosX;
- hit.posY = hit.posY;
- hit.posZ = hit.prevPosZ;
- i++;
- }
- }
- if (!this.worldObj.isRemote)
- {
- this.setDead();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment