I am currently working on a NPC mod and I need to know the following things
Q1. How do I make a NPC drop more then one item?
Q2. How do I make rare drops for NPCs?
Q3. How do I make a NPC place blocks around them?
Q4. How do I make a NPC destroy blocks around them?
Q5. How do I make a NPC follow you if you hold a specific item?
Q6. How do I make a NPC spawn in randomly generated structures?
Q7. How do I make a NPC spawn in player build structures?
Q8. How do I make it so a NPC spawns rare in one biome but common in a another?
just add that line of text to your biome you want and change the mob, the numbers at the end define the spawn rate, the 4 and the other 4 is the min/max, im unsure about the 10, just play around with it i gues
Q3. How do I make a NPC place blocks around them?
Q4. How do I make a NPC destroy blocks around them?
This would depend on what you're trying to do. It's simple enough to generate blocks around a creature by getting the coordinates of the blocks around them and setting them to whatever block you're wanting. If you're wanting them to slowly build a house or something, that's a bit more complex.
It's essentially the same thingy for destroying blocks, just setting them to air blocks. Unless you want the animation as well, in which it becomes more difficult.
What is it you're hoping to do?
Q5. How do I make a NPC follow you if you hold a specific item?
I'd take a look at the Entity codes for Animals and/or chicken/cow/pig to see that. I used to know this, but now I can only point you in the right direction.
Q6. How do I make a NPC spawn in randomly generated structures?
Do you mean in the same way villagers are? If not then I currently don't know a way to, except for checking in the entity's getCanSpawnHere method with a check around the coordinates to see if all the blocks match up with the structure shape.
Alternatively you can do it the same way villagers are, which is spawning them in the construction of the structures.
Q3. How do I make a NPC place blocks around them?
Q4. How do I make a NPC destroy blocks around them?
This would depend on what you're trying to do. It's simple enough to generate blocks around a creature by getting the coordinates of the blocks around them and setting them to whatever block you're wanting. If you're wanting them to slowly build a house or something, that's a bit more complex.
It's essentially the same thingy for destroying blocks, just setting them to air blocks. Unless you want the animation as well, in which it becomes more difficult.
What is it you're hoping to do?
Q5. How do I make a NPC follow you if you hold a specific item?
I'd take a look at the Entity codes for Animals and/or chicken/cow/pig to see that. I used to know this, but now I can only point you in the right direction.
Q6. How do I make a NPC spawn in randomly generated structures?
Do you mean in the same way villagers are? If not then I currently don't know a way to, except for checking in the entity's getCanSpawnHere method with a check around the coordinates to see if all the blocks match up with the structure shape.
Alternatively you can do it the same way villagers are, which is spawning them in the construction of the structures.
Q3. I want NPC's to simply place blocks, not build anything specific. (Example would be one of my NPC's are suppose to plant saplings around them)
Q4. (IK, I'm insane) I would like the NPC to only destroy things created by the player.
Q5. Danke ^^
Q6. I do mean like villagers but the first bit might come in handy later ^^ Thanks.
As some people have said,I would consider making the villagers follow you,using the animal code,but changing to something the villagers would most likely need,such as an apple,or an emerald,but if you want to make it more complicated,I would make it,where if the villager has something for trade,he will follow the item he wants,and just stands there,until you hide the item.
Rollback Post to RevisionRollBack
Although my name may be FlareRocker I am a firm hater of FireRockerzStudios,since 2012.
My name is not derived of the same orgin as his.
Q1. How do I make a NPC drop more then one item?
Q2. How do I make rare drops for NPCs?
Q3. How do I make a NPC place blocks around them?
Q4. How do I make a NPC destroy blocks around them?
Q5. How do I make a NPC follow you if you hold a specific item?
Q6. How do I make a NPC spawn in randomly generated structures?
Q7. How do I make a NPC spawn in player build structures?
Q8. How do I make it so a NPC spawns rare in one biome but common in a another?
Q2. How do I make rare drops for NPCs?
Q8. How do I make it so a NPC spawns rare in one biome but common in a another?
Go into BiomeGen**** (**** = specific biome) and you should see this texxt
That above is from desert, now if you look int he end biome you should see this
just add that line of text to your biome you want and change the mob, the numbers at the end define the spawn rate, the 4 and the other 4 is the min/max, im unsure about the 10, just play around with it i gues
Q4. How do I make a NPC destroy blocks around them?
It's essentially the same thingy for destroying blocks, just setting them to air blocks. Unless you want the animation as well, in which it becomes more difficult.
What is it you're hoping to do?
Q5. How do I make a NPC follow you if you hold a specific item?
Q6. How do I make a NPC spawn in randomly generated structures?
Alternatively you can do it the same way villagers are, which is spawning them in the construction of the structures.
Q3. I want NPC's to simply place blocks, not build anything specific. (Example would be one of my NPC's are suppose to plant saplings around them)
Q4. (IK, I'm insane) I would like the NPC to only destroy things created by the player.
Q5. Danke ^^
Q6. I do mean like villagers but the first bit might come in handy later ^^ Thanks.
sorry if I'm asking for a lot.
http://www.minecraftforum.net/topic/1237692-125-lordofcatss-mods-defenders-of-steve-and-more/page__fromsearch__1
My name is not derived of the same orgin as his.