Posted May 13, 201312 yr Adding next code to onUpdate() helped me to make my wagons collide with each other, but only if they are empty. How do i make them collide with player inside? //taket from boat class if (!this.worldObj.isRemote) { List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.expand(0.20000000298023224D, 0.0D, 0.20000000298023224D)); if (list != null && !list.isEmpty()){ for (int l = 0; l < list.size(); ++l){ Entity entity = (Entity)list.get(l); if (entity != this.riddenByEntity && entity.canBePushed()){ entity.applyEntityCollision(this); this.applyEntityCollision(entity); // line added by me } } } } If i helped you, don't forget pressing "Thank You" button. Thanks for your time.
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.