Posted December 15, 201311 yr I have a few questions regarding a mod I'm making, and the mobs inside it. Question 1 Is there an event that fires on death of a mob? How can I access it? Question 2 How would I create a new entity at the location of the old one, when it dies? Question 3 How can I make an entity countdown, and at the end with a chance of, say, 1 in 3, spawn another mob/entity and destroy itself? Question 4 Is it possible for an entity to change into another entity when it’s RIGHT CLICKED Question 5 How would I add a custom task for a mob, for example sticking around another mob Question 6 How do I have mobs pick up blocks? Question 7 How do I have mobs place blocks? In a certain formation, like build a castle? That’s about it. Answer as many as you can. “Since when did you start modding?” “Last night"
December 15, 201311 yr 1) I believe so. May have to tie into the "Hurt" event and check to see if the entity would die 2) Yes! Most certainly. 3) Absolutely! 4) With finagling and magical voodoo it would be possible (read: yes, but tricky. Know what you're doing first) 5) You'd need to create a new AI event and know how to program it. You might be able to get away with the behavior that causes wolves to hunt sheep. 6) Look at the Enderman 7) See 6. As for formations, that would require a really good AI structure. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
December 15, 201311 yr Author How would I go about making 2 and 3? Could you explain it please? “Since when did you start modding?” “Last night"
December 15, 201311 yr The death even thats called in the vanilla mobs causes them to drop items. You can change that to spawn a mob, for the countdown you will probably need a tick handler and after so many ticks the death event can finish.
December 15, 201311 yr 1/LivingDeathEvent or EntityLivingBase#onDeath(DamageSource) 2/World#spawnEntityInWorld(Entity) 3/Entity.ticksExisted is an already existing countdown that you can use in Entity#onUpdate() 4/Entity#onInteractFirst for the right click 5/EntityLiving#targetTasks#addTask(int, EntityAI)
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.