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

Hi,

 

i want to perform some modifications for my mod but don't really know how to apply them, if you can give me some hints please ;) ...

 

I want to :

 

1) disable mob & animals spawning. So, it's more than simply set mode to peacefull (I'm afraid of sheep's xD). I don't know if it can be achieved thanks to an  extension of IWorldGenerator ?

 

2) Register a creature such that the chunks around it will continue to be updated instead of being unloaded. This creature should never be unload.

 

3) Make a creature uncollidable with other creatures. Meaning for now if the player is on the entity path, it will collide while i would like to avoid this by going through the player (like a ghost mob).

 

My current version is 1.6.2.

Thanks.

1) use EntityJoinWorldEvent, check for the corresponding mob and kill it.

2) AFAIK there is a way to force a chunk to stay loaded, but it has limitations (there's a max number of possible loaded forced chunks at the same time defined in the forge.cfg)

3) override those and return false for both:

public boolean canBeCollidedWith()
public boolean canBePushed()

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

  • 2 weeks later...
  • Author

I tried to overwrite the 2 methods but the entity still collides with the player. Is there other methods to implement ?

  • Author

I just found another issue with this method. I have an method wich was called on right clic on the entity. I suppose the raycast issued by a clic doesn't collide anymore because now the method isn't called anymore.

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.