Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

When I spawn an entity and immediately add velocity to it, it bugs up client-side. What happens is the entity ends up half sunken into the ground once it lands and continues to be like that until I reconnect. If there's no block under the block it landed on, it goes all the way through. It looks exactly like vanilla mobs when they glitch up and go through blocks.

 

Also, this only happens when I add velocity in the y-axis.

 

For example:

EntityPig ep = new EntityPig(world)
ep.setLocationAndAngles(x, y, z, yaw, pitch);
ep.rotationYawHead = yaw;
ep.renderYawOffset = yaw;
ep.motionX = 0.5D;

//If this line is taken out, the bug won't occur
ep.motionY = 0.5D;

ep.motionZ = 0.5D;
ep.isAirBorne = true;
ep.initCreature();

world.spawnEntityInWorld(ep);

 

I've tried it out in different situations and it always ends up the same. I've tried editing the ItemMonsterPlacer class by adding y-velocity to whatever it spawns to see if it acts the same way and it does.

 

Other things to note:

- If the entity is an EntityItem, the bug doesn't occur; it behaves like normal.

- Doesn't matter if "initCreature()" is called before adding velocity

 

So, am I doing something wrong or is this an MC thing?

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.