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

PROBLEM SOLVED

The solution was changing it to setLocationAndPosition when spawning instead of posX = , posY = , etc. Thanks!

 

Hey everyone!

I'm having issues with an entity I'm trying to create. I made it's model with thechne: http://pastebin.com/M88tdb2D .

The entity is just falling through blocks into the void as soon as it spawns.

I'm not sure why or how it happens. I also asked for help in the minecraft forums (Not sure if I'm allowed to link the post). I got alot of help, but still nothing could solve it.

I tried looking at other people's code, deleting and changing my code, looking at the vanilla source code but nothing could help me.

 

Hopefully any of you can solve my problem :)

 

Thanks!

You have to call setSize() in your Entity's class, in game press f3+b to debug it. e.g after the super(world); setSize(x, z), where x is the width and z is the height of your mob

  • Author

Thanks for the reply :)

I already tried it earlier and tried it again now. It's still falling through blocks, but it shows a white box around all mob, including mine. Didn't know about that shortcut, thanks :)

 

Any more ideas?

use entity.setLocationAndAngles(x, y + 1, z, 0, 0);

 

instead of

 

entity.posX = x;

entity.posY = y + 1;

entity.posZ = z;

  • Author

WOW. It worked, I can't believe it xD Thank you so much!!

Can you maybe explain what's the issue with setting the coordinates individually?

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.