Jump to content

How to ? Various operations


Recommended Posts



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.


Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 2 weeks later...

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.

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

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

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