Started by
DEPSEL0N
on
Topic category: Help with Minecraft modding (Java Edition)
In this procedure, highlighted in red, it does not work (the texture of the mob is not replaced according to the block on which it spawns), and the default texture is used. How can this be fixed? Literally, the procedure works like this: when the mob spawns, it must check which block it spawns on and if it spawns on earth blocks or mud blocks, it replaces its texture. But the problem is that the texture is not replaced with ground blocks. And how to replace the earth blocks with a group of earth blocks so that the lands from other mods can work
Edited by DEPSEL0N on Tue, 10/29/2024 - 06:31
When the block is broken, the mob appears with animation, but without a specific texture. Screenshot 2
What should I do so that when splitting a block, the mob appears with animation and a certain texture depending on a certain block?
Here is a completely ready-made procedure for changing the texture of a mob when spawning and checking which block the mob will spawn on
But no, it doesn't work for a quarter
But no, it just works, I put the wrong block
What trigger is the procedure on? If its on entity spawned then I dont think it really works with set texture. Use on entity tick update and make a logic nbt tag, eg entityspawned. Then on tick update is nbt = false, if so check block below etc. Then set logic nbt to true.
Oh, I don't quite understand the logic of the nbt tag. And I understand that this procedure should be from the nbt tag, because I need to add another procedure (on the tick update?) so that the mob can change the texture depending on the weather, but this cannot be done without the nbt tag.
So put them in the same procedure. Something like this:
This certainly works, but not in the way I wanted. Let me explain in more detail about the mob and the block that spawns this mob (the flower).
1. When the flower is broken, it should summon a mob with the texture and animation (Void, Dirt, or Mud) where the flower was broken.
2. If the mob stands inactive for a long time, it should bury itself (animation), and then a sprout of the flower should appear.
3. I need to make it so that when the mob is in water or something similar, it changes its texture depending on its texture. For example, if it rains, the Dirt texture changes to Mud and then to Void, and if the mob's texture was Mud, it changes to Void.
If something is unclear, I apologize; the translator may not accurately convey the context.
And as I understand it, you need to create 3 procedures:
1 For the Flower so that it spawns the mob when breaking
2(Entity spawn) To determine the texture of the mob when spawning
3(Tick update) To change the texture of the mob when it is in the water or going to live
You can see what can be redone
Here, in the second screenshot, the procedure for changing the mob's texture due to water is shown, and I can't figure out how to make the mob shake when the texture changes and how to increase the interval of texture change.
Mcreator also issues:
Is this normal? If not, how can I fix it?
Basically your gonna need to grab the on entity spawn procedure. Export it and then import it to the tick update procedure. Then just place the imported one above the existing one so they are joined vertically. This will make it so on entity spawned on first tick it will run the check to see what block it is on and then change textures accordingly. Then every tick after it will not check this because of the logic nbt being set to true. So on every tick after the normal on tick procedure will play.
Basically just put them together.
For making the entity shake, you would need to make an animation. Then just play animation (and wait 30 ticks or however long the animation is) and then change the texture.
I dont know what you mean by increase the interval.
For the nbt not syncing thats just minecraft, theres nothing you can really do about it. Depends on the server I think, and it only affects multiplayer. It shouldnt really be a problem.
How will block c be executed (and wait for 30 ticks or how long it will take to complete the animation)? I can't find it using the search
Ok, I found this block and performed the procedure, I also didn't merge the procedure, because if you log back into the game, the appearance animation will be played again
And I had this question: why are there no blocks indicating that the object is in the rain?