The Meaning of Life, the Universe, and Everything.
Join Date:
2/11/2017
Posts:
662
Member Details
I have a function that allows me to move entities using blocks of magenta glazed terracotta (the only texture I could find with an arrow) and stained clay (color-coded to indicate speed). To help make sure that the entity doesn't go off-path, I activate the NoAI tag when they are being controlled. My function code is here:
#Make sure AI doesn't mess with movement
execute if block ~ ~-2 ~ minecraft:magenta_glazed_terracotta run data merge entity @s {NoAI:1b}
execute unless block ~ ~-2 ~ minecraft:magenta_glazed_terracotta run data merge entity @s {NoAI:0b}
execute if block ~ ~-2 ~ minecraft:magenta_glazed_terracotta run data merge entity @s {Motion:[0.0,0.0,0.0]}
#facing
execute if block ~ ~-2 ~ minecraft:magenta_glazed_terracotta[facing=north] run tp @s ~ ~ ~ 0 0
execute if block ~ ~-2 ~ minecraft:magenta_glazed_terracotta[facing=south] run tp @s ~ ~ ~ -180 0
execute if block ~ ~-2 ~ minecraft:magenta_glazed_terracotta[facing=east] run tp @s ~ ~ ~ 90 0
execute if block ~ ~-2 ~ minecraft:magenta_glazed_terracotta[facing=west] run tp @s ~ ~ ~ -90 0
#Motion
execute if block ~ ~-3 ~ minecraft:white_terracotta run tp @s ^ ^ ^0.1
execute if block ~ ~-3 ~ minecraft:light_blue_terracotta run tp @s ^ ^ ^0.2
execute if block ~ ~-3 ~ minecraft:blue_terracotta run tp @s ^ ^ ^0.3
This works with most mobs, but with the zombie, it only appears to change the rotation of the head, not the body. This causes them to look very strange when traveling across a path. I noticed that, with AI enabled, the body rotation is updated, but my zombies tend to go off-path when I do that. How can I manually update the body rotation?
Rollback Post to RevisionRollBack
Remember those versions that minecraft pranked us with? Specifically:
Minecraft 2.0
Minecraft 1.VR-Pre1
Snapshot 15w14a
Minecraft 3D
Those are still downloadable! Watch this video for 2.0:
To download the other ones you need to make a folder in the versions folder for minecraft and put the client and JSON file for the versions in there. They all need to be named the same aside from file extensions. Once you do that, you will be able to choose that version when making a new profile with the minecraft launcher.
To download the other ones you need to make a folder in the versions folder for minecraft and put the client and JSON file for the versions in there. They all need to be named the same aside from file extensions. Once you do that, you will be able to choose that version when making a new profile with the minecraft launcher.
I got into chiptune music composition.
You can listen to them on my Youtube channel : https://www.youtube.com/channel/UCjWYbJGk7nvNDbnCvMlZGkw
Descriptions are in french, you'd just need some google translation copy-paste...
Also made some more or less complicated datapacks, shared here (planetminecraft).
The Meaning of Life, the Universe, and Everything.
Join Date:
2/11/2017
Posts:
662
Member Details
I have implemented this idea, as well as trying to use data merge to force rotation to the correct value. Neither solution was effective. My new code:
#Enable AI while rotating
data merge entity @s {NoAI:0b}
execute if block ~ ~-2 ~ minecraft:magenta_glazed_terracotta run data merge entity @s {Motion:[0.0,0.0,0.0]}
#facing
execute if block ~ ~-2 ~ minecraft:magenta_glazed_terracotta[facing=north] run tp @s ~ ~ ~ 0 0
execute if block ~ ~-2 ~ minecraft:magenta_glazed_terracotta[facing=north] run data merge entity @s {Rotation:[0f,0f]}
execute if block ~ ~-2 ~ minecraft:magenta_glazed_terracotta[facing=south] run tp @s ~ ~ ~ -180 0
execute if block ~ ~-2 ~ minecraft:magenta_glazed_terracotta[facing=south] run data merge entity @s {Rotation:[-180f,0f]}
execute if block ~ ~-2 ~ minecraft:magenta_glazed_terracotta[facing=east] run tp @s ~ ~ ~ 90 0
execute if block ~ ~-2 ~ minecraft:magenta_glazed_terracotta[facing=east] run data merge entity @s {Rotation:[90f,0f]}
execute if block ~ ~-2 ~ minecraft:magenta_glazed_terracotta[facing=west] run tp @s ~ ~ ~ -90 0
execute if block ~ ~-2 ~ minecraft:magenta_glazed_terracotta[facing=west] run data merge entity @s {Rotation:[-90f,0f]}
#Teleport entity to itself in attempt to match head and body rotation
tp @s @s
#Disable AI afterward
execute if block ~ ~-2 ~ minecraft:magenta_glazed_terracotta run data merge entity @s {NoAI:1b}
#Motion
execute if block ~ ~-3 ~ minecraft:white_terracotta run tp @s ^ ^ ^0.1
execute if block ~ ~-3 ~ minecraft:light_blue_terracotta run tp @s ^ ^ ^0.2
execute if block ~ ~-3 ~ minecraft:blue_terracotta run tp @s ^ ^ ^0.3
I'm starting to think this may be a glitch since I'm developing it in the snapshot versions. It's more of an inconvenience than a serious problem, so I could probably wait a while.
To download the other ones you need to make a folder in the versions folder for minecraft and put the client and JSON file for the versions in there. They all need to be named the same aside from file extensions. Once you do that, you will be able to choose that version when making a new profile with the minecraft launcher.
It successfuly make the body face in the direction...
However... There must be a lot of commands (1 for each facing position, although would be seriously fine if made in a datapack, only need a small script to generate a function for that).
The only thing left would be to teleport the zombie at ~ -128 ~ (that is the minimum instant-despawn distance if I remember)
Rollback Post to RevisionRollBack
I got into chiptune music composition.
You can listen to them on my Youtube channel : https://www.youtube.com/channel/UCjWYbJGk7nvNDbnCvMlZGkw
Descriptions are in french, you'd just need some google translation copy-paste...
Also made some more or less complicated datapacks, shared here (planetminecraft).
To download the other ones you need to make a folder in the versions folder for minecraft and put the client and JSON file for the versions in there. They all need to be named the same aside from file extensions. Once you do that, you will be able to choose that version when making a new profile with the minecraft launcher.
...Sounds pretty much like that... : Get rid of the zombie each tick and summon another one, but with a different command that has another rotation...
Well I can not pretend that I have tested "all" the methods and this is the "single only" way
It was just the only thing that worked for me...
Rollback Post to RevisionRollBack
I got into chiptune music composition.
You can listen to them on my Youtube channel : https://www.youtube.com/channel/UCjWYbJGk7nvNDbnCvMlZGkw
Descriptions are in french, you'd just need some google translation copy-paste...
Also made some more or less complicated datapacks, shared here (planetminecraft).
I have a function that allows me to move entities using blocks of magenta glazed terracotta (the only texture I could find with an arrow) and stained clay (color-coded to indicate speed). To help make sure that the entity doesn't go off-path, I activate the NoAI tag when they are being controlled. My function code is here:
This works with most mobs, but with the zombie, it only appears to change the rotation of the head, not the body. This causes them to look very strange when traveling across a path. I noticed that, with AI enabled, the body rotation is updated, but my zombies tend to go off-path when I do that. How can I manually update the body rotation?
Remember those versions that minecraft pranked us with? Specifically:
Those are still downloadable! Watch this video for 2.0:
https://www.youtube.com/watch?v=PQdu9LKAdIU
To download the other ones you need to make a folder in the versions folder for minecraft and put the client and JSON file for the versions in there. They all need to be named the same aside from file extensions. Once you do that, you will be able to choose that version when making a new profile with the minecraft launcher.
15w14a is on this link:
http://minecraft.gamepedia.com/15w14a
1.RV-Pre1 is here:
http://minecraft.gamepedia.com/1.RV-Pre1
Minecraft 3D is here:
https://minecraft.gamepedia.com/Java_Edition_3D_Shareware_v1.34
Have you tried enabling the AI while rotating the zombie and then disabling it afterward?
Command block engineer // Developer // #TeamTrees
Yes, I have. As far as I can tell, I get the same result, as if the tag was set before the body updated. My new code is here:
Remember those versions that minecraft pranked us with? Specifically:
Those are still downloadable! Watch this video for 2.0:
https://www.youtube.com/watch?v=PQdu9LKAdIU
To download the other ones you need to make a folder in the versions folder for minecraft and put the client and JSON file for the versions in there. They all need to be named the same aside from file extensions. Once you do that, you will be able to choose that version when making a new profile with the minecraft launcher.
15w14a is on this link:
http://minecraft.gamepedia.com/15w14a
1.RV-Pre1 is here:
http://minecraft.gamepedia.com/1.RV-Pre1
Minecraft 3D is here:
https://minecraft.gamepedia.com/Java_Edition_3D_Shareware_v1.34
I can not prove anything but in last resort, did you try to summon an AoE, tp it to the zombie then tp the zombie again to the AoE?
Maybe teleportation affects body...
Well maybe teleport the zombie to himself...
I got into chiptune music composition.
You can listen to them on my Youtube channel :
https://www.youtube.com/channel/UCjWYbJGk7nvNDbnCvMlZGkw
Descriptions are in french, you'd just need some google translation copy-paste...
Also made some more or less complicated datapacks, shared here (planetminecraft).
I have implemented this idea, as well as trying to use data merge to force rotation to the correct value. Neither solution was effective. My new code:
I'm starting to think this may be a glitch since I'm developing it in the snapshot versions. It's more of an inconvenience than a serious problem, so I could probably wait a while.
Remember those versions that minecraft pranked us with? Specifically:
Those are still downloadable! Watch this video for 2.0:
https://www.youtube.com/watch?v=PQdu9LKAdIU
To download the other ones you need to make a folder in the versions folder for minecraft and put the client and JSON file for the versions in there. They all need to be named the same aside from file extensions. Once you do that, you will be able to choose that version when making a new profile with the minecraft launcher.
15w14a is on this link:
http://minecraft.gamepedia.com/15w14a
1.RV-Pre1 is here:
http://minecraft.gamepedia.com/1.RV-Pre1
Minecraft 3D is here:
https://minecraft.gamepedia.com/Java_Edition_3D_Shareware_v1.34
Well the only method that seems to work for me right now would be to summon the mob with a rotation :
It successfuly make the body face in the direction...
However... There must be a lot of commands (1 for each facing position, although would be seriously fine if made in a datapack, only need a small script to generate a function for that).
The only thing left would be to teleport the zombie at ~ -128 ~ (that is the minimum instant-despawn distance if I remember)
I got into chiptune music composition.
You can listen to them on my Youtube channel :
https://www.youtube.com/channel/UCjWYbJGk7nvNDbnCvMlZGkw
Descriptions are in french, you'd just need some google translation copy-paste...
Also made some more or less complicated datapacks, shared here (planetminecraft).
Are you saying that I would need to clone the zombie every time I wanted to make it change direction?
Remember those versions that minecraft pranked us with? Specifically:
Those are still downloadable! Watch this video for 2.0:
https://www.youtube.com/watch?v=PQdu9LKAdIU
To download the other ones you need to make a folder in the versions folder for minecraft and put the client and JSON file for the versions in there. They all need to be named the same aside from file extensions. Once you do that, you will be able to choose that version when making a new profile with the minecraft launcher.
15w14a is on this link:
http://minecraft.gamepedia.com/15w14a
1.RV-Pre1 is here:
http://minecraft.gamepedia.com/1.RV-Pre1
Minecraft 3D is here:
https://minecraft.gamepedia.com/Java_Edition_3D_Shareware_v1.34
...Sounds pretty much like that... : Get rid of the zombie each tick and summon another one, but with a different command that has another rotation...
Well I can not pretend that I have tested "all" the methods and this is the "single only" way
It was just the only thing that worked for me...
I got into chiptune music composition.
You can listen to them on my Youtube channel :
https://www.youtube.com/channel/UCjWYbJGk7nvNDbnCvMlZGkw
Descriptions are in french, you'd just need some google translation copy-paste...
Also made some more or less complicated datapacks, shared here (planetminecraft).