Oh well: 1. It doesn't zoom in close 2. He doesn't demonstrate it but already shows the finished result. And especially if I don't speak English, it's anything but a good tutorial for me. I don't even know how he created the "And" block" and how he created the entity block with "[] = []""
Hi, sorry about being this late but im trying to link the procedure up to the ai and i cant find it in the conditions box. Did i do something wrong? I'm using 2024.2 btw
There should be a block to test if there is direct sunlight (visible to the sky) under one of the tabs it may be under world. You would then need to add this to a IF statement and then if true set the entity on fire. I am not sure where all the blocks are off the top of my head but there should be one for getting direct sunlight. This can be run from a entity update tick and any time they go outside they will burn, you can also limit this to only if the time is day in that world too of course, just use a AND block to group both conditions.
press the plus button and click recipe. there you can make a recipe. i things called crafting recipe in mcreator tho. and after making your layout of the crafting you can also put what comes out of it. and you can make it shapeless but clicking the option for it. no procedures needed
Sadly you have to program each combination in for each alternate recipe. I have not come across any way to do it otherwise. Your best option for performance is to make a bunch of smaller procedures then just link them to one main procedure for your block, simply just call the procedure for the recipe.
If you set a variable to change via a right-click then it would be possible to use other triggers for sure. Just toggle the variable and test for the state of it in your AI condition.
Great tutorial, really do appreciate it. However, I made sure to follow every step by my entity will not follow me. Now of course this video was made two years ago and the newest version of MCreator may have had changes in the logic. I was wondering if you tested this procedure in later version of creator (currently using 2024.1) to see if this works?
Hi, sorry if I'm late but i am trying to make an entity which attacks players that are moving (it doesn't attack players who are standing still) and i have no idea how to do it. Can you please help me?
You could make a condition for your AI task for when it attacks players to make it so you test for the nearest player entity, store that entity type to a local variable to compact the code a bit more then test if the entity velocity's (delta movement) is greater not equal to 0 if one of the axis directions return true then you can return true for your AI task condition which will allow the entity to target the player. It may also be required to test for a small range, just incase there is some motion for the player you could test if the delta movement is something like below. D = Delta movement IF [D] => 0.1 [OR] [D] =< -0.1 You would add an OR block for your other axis ranges. The values when the player is fully running reaches 1.0 though falling may higher but most standard movement like jumping will not exceed 1.0 so this should work if you need to set a range if it does not work with testing not equal to 0.
@@NorthWestTreesMCreator A similar question: can i detect if any entities with a certain tag are near the entity and make my mob *not* attack them? For all i've tested, all attempts to define the type of target to NOT attack in the Attack Conditions result in those definitions being completely ignored and the mob attacking its own kind anyways, for example. Like, is there a way to make a procedure like "Check a creatures of NOT * creature type * in x radius -> set the attack target to the NOT nearest * creature type * in x radius"?
it may be a result of me working up late but for the life of me I can't figure out how to set procedures as conditions because no matter what I try it doesn't show up in the list
Conditions need to return true or false at the end of the procedure you can also return a value somewhere in the procedure to end it if a condition you want is true, alternatively you can also just drop your condition directly on the logic return block and it should return true or false based on the condition's outcome. Once you have a logic variable then it should show up in the additional conditions and even AI task conditions. Just keep in mind the dependencies for the triggers when working with return blocks as they still count in the place that they are being called from
You can use a global procedure when right-clicked on block then test for the block and if the player is holding bonemeal in the main hand. if both conditions are true then you can remove 1 item in the entities main hand and then run some kind of event you like to do for the block such as replace the block etc.
hello im trying to make a mob who attack players, and players get an effect when they are attacked by the mob... but i don't know how to do it, and im in version 2022.3
1. Use addition conditions for your AI task for attacking the player. 2. Test if nearest entity exists for the same entity type for that AI task (eg. Player or Server Player depending what one you use) 3. Test if the entity has the status effect but replace target/event entity with nearest player with the same radius as your test and same entity type as your test in #2. Return true in the IF statement then out side of it return false so it will not attack if the condition is not true.
Hey I am trying to make a gui that tells you a variable assigned to a player. Each player has a player persistent value of a 1 or 0. You enter the target entity in a text field in the gui, and it tells you if the value is 1 or 0. I used the "get" block for entity but it will not let me select the player name
getting the name of an entity is hard your best bet is to make a string variable and save the display name when the player joins the game using global procedure, this will help you target the entity's display name though variables but the name needs to be exact or it won't work.
Hey, I’m having a problem with a procedure, the problem is that the “mob-right-clicked” caller is activated multiple times per right click, which normally wouldn’t be too bad, but I’m trying to make it play audio, which messes it up quite bad, it also opens a gui, but I don’t know if there’s a way to activate a sound upon opening the gui. Do you have any idea on how I can fix this? It would be a life saver.
It sounds like you have to many things going on with right-click actions, inventories are a pain to work with because they open when you right-click so if possible I would try to drop support for this if you want to use right click for other actions however if you need it you may be able to chancel the event though a global procedure when you right click on that kind of entity, depending on if its tamed or not you may need to test for a few things to ensure its owned by the player if its tamed and the type of entity, also you can also hold items in main/off hand to also expand the right-click function so for example you can test if the player has a book or something in the main hand and if the entity being right-clicked on is owned by the player and the type of entity is the kind you want, if all of this is true you can cancel the right click and then run your script you want for when the inventory should not pop up. This has been the only way I could set things up for my own mod, it takes some trial and error to figure it out but using global triggers seems to be a valid work around.
Ok Ive got an entity that applies a potion effect on a target when it attacks, I need it to ignore entity's that have that effect active how would I seat up that condition? Ive been trying on my own with no success.
I would skip over the AI task and use a procedure based system for your entity as this is a bit more advanced for AI tasks. An example for what you will need is here. Just make sure to apply it to your custom entity's tick update procedure. imgur.com/a/9rNsn4a
hey i might be a little late and dont expect you to respond, but i cant get the message to disappear after a while, is there some sort of procedure for that?
hello i'm fairly new to modding but i can't figure out how to get an AI to walk to a block and then take certain items out of it if it's there. the mod i'm making is inspired by tektopia which is a advanced villager mod, i want certain parts of this mod, like the AI taking things from a block and an area designated to your store where the "Customer" AI spawns in and shop in your store.
Currently this is not possible, I have been pushing for more advanced AI but from what the devs say this is more advanced and will require a better system to implement or something, AI as you can imagine is a lot harder to work with and MCreator keeps to vanilla settings for the most part so nothing is coded in, all features are already in the game but the devs need to take the raw code or what is provided and find a way to make it into a configurable screen, which is way easier said than done.
For AI conditions I would say you would need to use a local logic variable and a couple other blocks. 1. Set your local logic variable to true 2. Use the block under world management that is called "for each entity as (entity iterator) at X Y Z in square cube with size 4" 3. Set the size of the cube for the distance you want to cancels the wandering for. 4. Next add a if statement 5. Get the block under logic that says "Is [Event/target entity] (sub)type of [no entry selected]" 6. Set the entity to player and then add this to your if statement. 7. In side the if statement set your variable to false so that if the player is around the entity it will turn to false. 8. Outside of your block that you added in step 2 use a logic return block and for the value return the local variable. What this should do is test if a player exists in the area around the entity if true set the variable and cancel the wander task as it will return false otherwise it will always return true which will allow the entity to wander. I hope this helps.
@@NorthWestTreesMCreator okay I think it works, but also how can I make the entity try to touch the player if it does have line of sight with the player, while with the continuous wandering? also thank you for your help!
Okay I'm back, with a question. I tested the limits of this on multiple entities and as it turns out if i click one entity all of the others follow suit. so if i'm followed by one i'm followed by all (EDIT) example I want to make one of the creatures follow me, and the other stay: how would i do that
i wondering if assigning another variable but to the entity would work as well, so that the entity will toggle on and off the follow of the player. but i have no idea on how to do that.
@@adventures7612 sorry man, I'm afraid I don't know how to do that. I only know how to make mobs have an illager model, shoot bows, crossbows, tridents, and render layers.
You may or may not have time to answer me but I'm the creator of The Chrono Killers Star Wars mobs mod on Planet Minecraft and I used you're MCreator to make it and when Im upgrading it to 1.18 it basically wiped out the whole mod it's weird it's all there but it's not there I don't know if you're willing to help me out or not but I would like to send you the mod to see if you could get it to upgrade to 118 maybe I'm doing something wrong if you don't have time I understand thank you
if it was not made with MCreator before trying to use it there could be issues with porting. However if it was made with MCreator before hand and ported using the same application then it may be a porting issue, its best to report the issue to Pylo in this case make sure to state what version your porting from as well what version it happened on. I don't actually work on the application I just record tutorials for Pylo. I hope that helps a bit.
@@googleplaymusic4747 You don't need to, when creating the mob set it's main hand to bow. Then in the AI and goals tab on the upper right you can set it to shoot projectiles.
@@googleplaymusic4747 If you want mobs to be able to physically USE A CROSSBOW OR BOW OR POSSIBLY EVEN TRIDENTS. then that'll require custom coding and I know just how to do that.
The Best Tutorials for Mcreator ever thx
No problem :)
Oh well:
1. It doesn't zoom in close
2. He doesn't demonstrate it but already shows the finished result. And especially if I don't speak English, it's anything but a good tutorial for me. I don't even know how he created the "And" block" and how he created the entity block with "[] = []""
Hi, sorry about being this late but im trying to link the procedure up to the ai and i cant find it in the conditions box. Did i do something wrong? I'm using 2024.2 btw
Firstly, good video bro, and secondly, I would like to know how to make my mod burn in the sun without putting on the zombie AI
There should be a block to test if there is direct sunlight (visible to the sky) under one of the tabs it may be under world. You would then need to add this to a IF statement and then if true set the entity on fire. I am not sure where all the blocks are off the top of my head but there should be one for getting direct sunlight. This can be run from a entity update tick and any time they go outside they will burn, you can also limit this to only if the time is day in that world too of course, just use a AND block to group both conditions.
How do you make shapeless recipes for custom crafting tables? Do you use procedures and if so how would you use them to do that?
press the plus button and click recipe. there you can make a recipe. i things called crafting recipe in mcreator tho. and after making your layout of the crafting you can also put what comes out of it. and you can make it shapeless but clicking the option for it. no procedures needed
@@DylanPlayzz87 Those don’t work for custom crafting tables unfortunately.
@@catgocri6813 yeah that would be procedures. a very very big one depending on the amount of crafting recipes
There's an option for it
Sadly you have to program each combination in for each alternate recipe. I have not come across any way to do it otherwise.
Your best option for performance is to make a bunch of smaller procedures then just link them to one main procedure for your block, simply just call the procedure for the recipe.
how did you get that equal piece that works with the get owner @NorthWestTreesMCreator
Logic
Same color block with = sign
Click on = Sign and more options will appear.
The dark blue also has addition options and same with the math block.
This works really well but I want to make it happen if I right-click an entity rather than pressing a key, is this possible?
If you set a variable to change via a right-click then it would be possible to use other triggers for sure. Just toggle the variable and test for the state of it in your AI condition.
Great tutorial, really do appreciate it. However, I made sure to follow every step by my entity will not follow me. Now of course this video was made two years ago and the newest version of MCreator may have had changes in the logic. I was wondering if you tested this procedure in later version of creator (currently using 2024.1) to see if this works?
Also note, does any of them need to register on entity tick update?
I recan't- I just named my NBT tags differently- lol
AI conditions should be the same but reading your replies it sounds like may have been just a mismatch of variable names.
Hi, sorry if I'm late but i am trying to make an entity which attacks players that are moving (it doesn't attack players who are standing still) and i have no idea how to do it. Can you please help me?
You could make a condition for your AI task for when it attacks players to make it so you test for the nearest player entity, store that entity type to a local variable to compact the code a bit more then test if the entity velocity's (delta movement) is greater not equal to 0 if one of the axis directions return true then you can return true for your AI task condition which will allow the entity to target the player. It may also be required to test for a small range, just incase there is some motion for the player you could test if the delta movement is something like below.
D = Delta movement
IF [D] => 0.1 [OR] [D] =< -0.1
You would add an OR block for your other axis ranges.
The values when the player is fully running reaches 1.0 though falling may higher but most standard movement like jumping will not exceed 1.0 so this should work if you need to set a range if it does not work with testing not equal to 0.
@@NorthWestTreesMCreator Thanks!
@@NorthWestTreesMCreator A similar question: can i detect if any entities with a certain tag are near the entity and make my mob *not* attack them? For all i've tested, all attempts to define the type of target to NOT attack in the Attack Conditions result in those definitions being completely ignored and the mob attacking its own kind anyways, for example.
Like, is there a way to make a procedure like "Check a creatures of NOT * creature type * in x radius -> set the attack target to the NOT nearest * creature type * in x radius"?
it may be a result of me working up late but for the life of me I can't figure out how to set procedures as conditions because no matter what I try it doesn't show up in the list
Conditions need to return true or false at the end of the procedure you can also return a value somewhere in the procedure to end it if a condition you want is true, alternatively you can also just drop your condition directly on the logic return block and it should return true or false based on the condition's outcome. Once you have a logic variable then it should show up in the additional conditions and even AI task conditions. Just keep in mind the dependencies for the triggers when working with return blocks as they still count in the place that they are being called from
How do you make bonemeal work on custom blocks? and with specific plants if that is possible?
You can use a global procedure when right-clicked on block then test for the block and if the player is holding bonemeal in the main hand. if both conditions are true then you can remove 1 item in the entities main hand and then run some kind of event you like to do for the block such as replace the block etc.
Above will work for vanilla blocks if its a third-party mod you will need a tag for that block from the other mod in order for it to work.
@@NorthWestTreesMCreator Thank you!
hello im trying to make a mob who attack players, and players get an effect when they are attacked by the mob... but i don't know how to do it, and im in version 2022.3
1. Use addition conditions for your AI task for attacking the player.
2. Test if nearest entity exists for the same entity type for that AI task (eg. Player or Server Player depending what one you use)
3. Test if the entity has the status effect but replace target/event entity with nearest player with the same radius as your test and same entity type as your test in #2.
Return true in the IF statement then out side of it return false so it will not attack if the condition is not true.
Hey I am trying to make a gui that tells you a variable assigned to a player. Each player has a player persistent value of a 1 or 0. You enter the target entity in a text field in the gui, and it tells you if the value is 1 or 0. I used the "get" block for entity but it will not let me select the player name
getting the name of an entity is hard your best bet is to make a string variable and save the display name when the player joins the game using global procedure, this will help you target the entity's display name though variables but the name needs to be exact or it won't work.
Hey, I’m having a problem with a procedure, the problem is that the “mob-right-clicked” caller is activated multiple times per right click, which normally wouldn’t be too bad, but I’m trying to make it play audio, which messes it up quite bad, it also opens a gui, but I don’t know if there’s a way to activate a sound upon opening the gui.
Do you have any idea on how I can fix this? It would be a life saver.
It sounds like you have to many things going on with right-click actions, inventories are a pain to work with because they open when you right-click so if possible I would try to drop support for this if you want to use right click for other actions however if you need it you may be able to chancel the event though a global procedure when you right click on that kind of entity, depending on if its tamed or not you may need to test for a few things to ensure its owned by the player if its tamed and the type of entity, also you can also hold items in main/off hand to also expand the right-click function so for example you can test if the player has a book or something in the main hand and if the entity being right-clicked on is owned by the player and the type of entity is the kind you want, if all of this is true you can cancel the right click and then run your script you want for when the inventory should not pop up.
This has been the only way I could set things up for my own mod, it takes some trial and error to figure it out but using global triggers seems to be a valid work around.
Ok Ive got an entity that applies a potion effect on a target when it attacks, I need it to ignore entity's that have that effect active how would I seat up that condition? Ive been trying on my own with no success.
if there's a way to get it to avoid them that would work to, I just need All of Them to stop hitting them after its been applied.
I would skip over the AI task and use a procedure based system for your entity as this is a bit more advanced for AI tasks. An example for what you will need is here. Just make sure to apply it to your custom entity's tick update procedure.
imgur.com/a/9rNsn4a
@NorthWestTreesMCreator thank you that's a big help.
hey i might be a little late and dont expect you to respond, but i cant get the message to disappear after a while, is there some sort of procedure for that?
You can make it spawn on the action bar instead it lasts about 1 - 2 seconds then hides.
hello i'm fairly new to modding but i can't figure out how to get an AI to walk to a block and then take certain items out of it if it's there. the mod i'm making is inspired by tektopia which is a advanced villager mod, i want certain parts of this mod, like the AI taking things from a block and an area designated to your store where the "Customer" AI spawns in and shop in your store.
Currently this is not possible, I have been pushing for more advanced AI but from what the devs say this is more advanced and will require a better system to implement or something, AI as you can imagine is a lot harder to work with and MCreator keeps to vanilla settings for the most part so nothing is coded in, all features are already in the game but the devs need to take the raw code or what is provided and find a way to make it into a configurable screen, which is way easier said than done.
Hello, I am trying to make an entity continue to wander around indefinitely until they see a player within line of sight, how would I go about that?
For AI conditions I would say you would need to use a local logic variable and a couple other blocks.
1. Set your local logic variable to true
2. Use the block under world management that is called "for each entity as (entity iterator) at X Y Z in square cube with size 4"
3. Set the size of the cube for the distance you want to cancels the wandering for.
4. Next add a if statement
5. Get the block under logic that says "Is [Event/target entity] (sub)type of [no entry selected]"
6. Set the entity to player and then add this to your if statement.
7. In side the if statement set your variable to false so that if the player is around the entity it will turn to false.
8. Outside of your block that you added in step 2 use a logic return block and for the value return the local variable.
What this should do is test if a player exists in the area around the entity if true set the variable and cancel the wander task as it will return false otherwise it will always return true which will allow the entity to wander.
I hope this helps.
@@NorthWestTreesMCreator okay I think it works, but also how can I make the entity try to touch the player if it does have line of sight with the player, while with the continuous wandering? also thank you for your help!
Okay I'm back, with a question. I tested the limits of this on multiple entities and as it turns out if i click one entity all of the others follow suit.
so if i'm followed by one i'm followed by all
(EDIT) example I want to make one of the creatures follow me, and the other stay: how would i do that
i wondering if assigning another variable but to the entity would work as well, so that the entity will toggle on and off the follow of the player.
but i have no idea on how to do that.
So you want one mob to only follow you? When tamed??
@@JWJBS yes
@@JWJBS i want to know how to do that.
@@adventures7612 sorry man, I'm afraid I don't know how to do that. I only know how to make mobs have an illager model, shoot bows, crossbows, tridents, and render layers.
You may or may not have time to answer me but I'm the creator of The Chrono Killers Star Wars mobs mod on Planet Minecraft and I used you're MCreator to make it and when Im upgrading it to 1.18 it basically wiped out the whole mod it's weird it's all there but it's not there I don't know if you're willing to help me out or not but I would like to send you the mod to see if you could get it to upgrade to 118 maybe I'm doing something wrong if you don't have time I understand thank you
if it was not made with MCreator before trying to use it there could be issues with porting. However if it was made with MCreator before hand and ported using the same application then it may be a porting issue, its best to report the issue to Pylo in this case make sure to state what version your porting from as well what version it happened on. I don't actually work on the application I just record tutorials for Pylo. I hope that helps a bit.
@@NorthWestTreesMCreator oh ok well thank you thank you very much
i "followed" the tutorial but the entity never worked
i am so confused
Same
is there a way to make mobs use crossbows and bows? like a piglin or pillager?
I can help with that but it will need custom coding.
@@JWJBS oh! I don't know how to code
@@googleplaymusic4747 You don't need to, when creating the mob set it's main hand to bow. Then in the AI and goals tab on the upper right you can set it to shoot projectiles.
@@soulwingcatshot9547 I'll test this out, I looked into some code and.... It appears a bit complicated, but I'm pretty sure this will be easy.
@@googleplaymusic4747 If you want mobs to be able to physically USE A CROSSBOW OR BOW OR POSSIBLY EVEN TRIDENTS. then that'll require custom coding and I know just how to do that.
Can you make a Video, whats new in MC creator! Pls :D
Sadly I don't know everything that was added so I can't sorry.
@@NorthWestTreesMCreator 😥
@@NorthWestTreesMCreator so maybe a partnership with Pylo?
is there a tutorial for 2022.1?
this is for 2022.1 however AI conditions work on every version, same method for all versions.
@@NorthWestTreesMCreator nice
Okay figured it out
i just went too fast
yay i got a heart!