Posted December 10, 201411 yr 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; } } }
December 11, 201411 yr Your cart is probably to fast, this kind of glitches can happen if you go to fast. And check your console, there might be an error in it.
December 11, 201411 yr Author hello , I tried to reduce the speed and is same, and no error in the console i don't understand !!!
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.