Jump to content

Tonygue

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by Tonygue

  1. hello , I tried to reduce the speed and is same, and no error in the console i don't understand !!!
  2. Hello I would like to create a kart, so I made one entity everything works, I added the code to get into it and direct it. everything is set apart a bug .... when I move I returned to the same place after a second or more, as a lag here is the code of the entity if anyone has had is the problem: package minecraftkart.common; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World; public class EntityKart extends EntityLiving { private int i; public EntityKart(World model) { super(model); stationary = false; // TODO Auto-generated constructor stub } public boolean interact(EntityPlayer entityplayer) { if(riddenByEntity == null || riddenByEntity == entityplayer) { entityplayer.mountEntity(this); return true; } else { return false; } } public boolean stationary; protected boolean isMovementCeased() { return stationary; } public void moveEntity(double d, double d1, double d2) { if(riddenByEntity != null) { stationary = true; motionX += riddenByEntity.motionX*5; // * 0.20000000000000001D; motionZ += riddenByEntity.motionZ*5; // * 0.20000000000000001D; if(isCollidedHorizontally) { isJumping = true; } super.moveEntity(motionX, motionY, motionZ); }else { super.moveEntity(d, d1, d2); stationary = true; } } public double getMountedYOffset() { return 0.2D; } } }
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.