Posted April 28, 201411 yr 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 ). 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.
April 28, 201411 yr 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.
May 7, 201411 yr Author I tried to overwrite the 2 methods but the entity still collides with the player. Is there other methods to implement ?
May 8, 201411 yr Author I tried, same result. I can walk through the entity but it's still pushed away when i stay close.
May 8, 201411 yr 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.