Topic category: Feature requests and ideas for MCreator
Hey guys,
I am using a command in Mcreator "get 'event/target entity' Data number tag… with "tickCounter"" as a reference to trigger some sounds of my mob after a number of ticks had passed. So far so good and therefore I thought I am able to create a full day structure for my Girls survival mod. As the name says This mod adds some girls and some girls village. Because they are villagers I want to give them a plan of the day, how they live their life in the villages. I also wanted to use an other reference for example "daytick" instead of tickCounter.
My thought is every day has it's own 24000 ticks and depending on this ticks, I like to trigger some actions for a villager girl. For an example I take the "defender girl". A defender girl has the job in my mod, to keep the village safe from Monsters at night. I explain her planed life of one day short in this table below:
Daytime in Ticks: 0 means sunrise has just passed |
Action of the customized Mob: the defender girl |
---|---|
Tick 0 until tick 1500 |
The night shift of the defenders ends. After defeating last mobs, they gathering around a certain block. A campfire would be conceivable as a rallying point. To take a break after a demanding night shift. Eat some stuff or drink some regenerating potions, which are curing them. |
1500 until 2500 | The defenders leave the campfire and returning their homes. The functions 'can open/close doors' and 'go through doors if possible' are used now. |
2500 until 9000 |
Since I placed a bed in the home, the defender girl use it now for a sleep. I would be happy if entity data has one more option "is event/entity sleeping" in my case I am able to play sounds then. So you can hear the girl sleeping like the entity fox does |
9000 until 11000 | The defender stands up again and gather with all defenders at the campfire, (rallying point) eat something, or hang around there |
11000 until 23999 |
As night falls on this tick time the defenders are swarming out, to the village borders and wait for monsters there. The new shift begins from here. |
I hope I was able to keep it short and easy described, what I am looking for. I hope for a lively activity in the comments. Hit the comment section below and tell me which advantages YOU would have. In my opinion 2 different task would be sufficient e.g. on tick 0 your night active creature goes under the next tree to hide there for a sleep over the day and on tick 11500 of the day it gets up, and check out the world. Let me know, what you think and hit "reply to this topic" I look forward to see you
In case it wasn't quite clear what I am looking for, I look for an option like this table, which can rule the daily routine of a mob.
Everything starts with "get NBT data number" and a function which detects the tick of each single day. So is it 1000 ticks right now, the defender girls are at the campfire (In MCreator, I designate the block as the rallying point) if it gets later, the next event of the table occurres. But sleeping is not added so far, so far I had seen.
1. have you seen a forge mob do this? if yes you should provide some source code
2. how simplified people want their mod creations to be? MCreator isn't supposed to replace coding, but to encourage people to learn coding.
3. you can do maybe more than half of the things here with procedures. wirh Wait blocks more specifically, and multiple entities
"advanced procedures and AI" prob
From the todays view, it doesn't look like I would provide a source code at all. But hey, that doesn't mean I never will be able to. Since I have Mcreator, I am doing better than years before, as I was totaly overstrained.
Although: I had seen a mod, where Villagers can sleep. "Minecraft Comes Alive Mod" But this villagers sleeped at night while they stood. In huts or outside the huts, but they slept! Well protected by guardians. And what about the "Millenaire mod?" Oh Yes. If I remember right as I played this mod, these villagers slept even in beds. So seen, I saw 2 Type of Forge Mobs sleeping. 1 in Bed and 1 standing of feets. Lmao.
apart of that, sure I need to learn coding and a lot more. But if I would stay silent behind my screen, I stay definitely clueless like a dumpster. Lol XD. Of course I am open to learn how this everything works here. And with the help of the community, I will make this on the quickest way, because if I don't find something for now, maybe someone else can tell me what I should take a look on next. And I will check it out myself, to study that and see how this works. Wait for me and wait for that.
The 'tickCounter' was one of the elements I found in this forum. Because I don't use the normal living sound event. Tickcounter deal that for me now and I am totaly pleased with my result. Now I even combined 2 different Sounds, one of these sounds is triggered by random with a percentage chance. Thaks for that Community and I took 3 Days to figure that out. How! This! Works! And it works! And i'm happy.
For 3: Wait blocks what about this? If i am done with some particles for my Mod, I need to check that out to see how this can help me.
I'm out for today. Thank you Rex for the feedback. See you soon.
1. from what I understand you give directions to the villagers on Comes Alive, they don't do it themselves
2. I meant that you can do this with different entities with different AI but same properties, and the wait blocks would be so you wait for another time of a day to replace the entity with a different AI one
So I'm back, Comes Alive is not too interesting for me now. Instead of that, I downloaded Millenaire for 1.12 and played it for a while. Here are the Pics as you can see the villager sleeping
So if I know where that golden words are I need, to let my villager girls sleep, I can try it out and provide it here then if I'm done! Because this is my target, I want to reach. And I'm not joking! If my defender girl sleeps to a time I want her to sleep, I look here for the fancy right place here and share with you, the procedure how I made this.
For 2. You can only mean that block:
I expected something like this. I give for a later time of the day the girl another AI, which tells her go to her bed and a different AI, which tells her, to go to the campfire if the waiting time is over... You know, I checked out the forum, learned already to make a sound-procedure and checked for some entries about sleeping entity then. But I found nothing. So I thought first I can't perform this right now, but I like to do this. This is why I posted this topic here. But it's sufficient for me to know the way how I code this myself, what ever is possible to code.
Easy! And thanks for the patience ; )
And I found a class file named GoalSleep. The mod is decompiled, so I can now take a look at the .java Version of GoalSleep. Right now, I am searching in Mcreator for a tag name, because I think the procedure needs to be started to a certain and correct time. For example at sunrise. I am still looking for a right tagName. "tickCounter" is not suitable for that. Or am I looking on a wrong way?
okay the goal for sleeping might be a good idea, but remember that it will Depend on the size of the model, so it would just work for Villager type mobs, or you would have to define it by code. and you could look at villagers code if that's what you mean
to do it download Forge JDK and put it on Eclipse
It's not just that only, you told me Rex.
I saw it already yesterday, that "MillVillager" get addressed for sleep at home at night. So I need change that matter, because my girls are not part of the millenaire mod! The 2nd part is, I need to define, how a bed can stand, in order to a villager can use a bed. A bed can show in all directions. Well the feeds might showing in X, Y or Z direction. And from X and Z have each of them either positive 1 or negative 1.
for (final MillVillager v3 : villager.getHouse().getKnownVillagers()) {
if (v3 != villager && v3.getGoalDestPoint() != null) {
feetPos.remove(v3.getGoalDestPoint());
feetPos.remove(v3.getGoalDestPoint().getRelative(1.0, 0.0, 0.0));
feetPos.remove(v3.getGoalDestPoint().getRelative(0.0, 0.0, 1.0));
feetPos.remove(v3.getGoalDestPoint().getRelative(-1.0, 0.0, 0.0));
feetPos.remove(v3.getGoalDestPoint().getRelative(0.0, 0.0, -1.0));
}
Just to show how a part of the file looks like. and Y is always 0, because they don't sleep, when they stand and because they never are upside down.
The sleeping event is an action which can done at night. This is true. But on Day it's false!
@Override
public boolean performAction(final MillVillager villager) throws Exception {
if (!villager.nightActionPerformed) {
villager.nightActionPerformed = villager.performNightAction();
}
This shows me as well, that the action can be done at night only. I need to understand first, how to translate this to day time for some entitys of the villagers or theoretically even everyone, so the defender can sleep at day, while night time they keep up the safety against Monsters!
Bed orientation is called in 4 possible directions. On top, the direction of the feeds were adressed and now the bed direction is adressed here! And Villager should lie down. These are some of the most important informations I need to pay attention for.
And because I still don't know so far, which "tagFunction" in Mcreator I could use, so that the procedure starts always at sunrise, I use the "tickCounter" for the test at first. Its begin on 0 starts the procedure and its end >23999 should restart the procedure again. I am afraid the tickCounter restart itself, if I leave the world and rejoin it. Does it? But it remains my first idea how to run all different needed AIs at their times. Waiting blocks will then specify the time in ticks one AI is valid now. After this time has passed, the next following AI will replace the previous valid AI. That's the plan for now.