So yesterday I was working on a creation to restore the Giant Zombie's AI, as in current builds of the game it does not move or attack.
It works by summoning an invisible Ravager with no collision and infinite health, and rapidly teleporting the Giant to it with a repeating command block, making it appear as if the Giant is chasing and attacking you. Additionally, there is an invisible, invulnerable Zombie with no collision being teleported to the Ravager to give the Giant sound effects.
I also gave the Ravager strength to match the Giant's old attack damage (75), jump boost to match the Giant's height, and speed to match the Giant's old movement speed.
This works almost flawlessly, however, there are a few things which I could not figure out.
1. I need the Giant to drop a stack of rotten flesh upon death.
2. I need the invisible Ravager and Zombie inside the Giant to be automatically killed when the Giant dies (the Ravager's nametag is "Giant," and the Zombie's is "GiantSound."
3. I need it to only be able to fit under 12 block high spaces, to match the height of the Giant, as it can currently fit inside small spaces which a Ravager could fit in. Maybe there's a way to detect that there's something other than air in the 12 blocks above the Ravager and push it back when it tries to enter small spaces??
4. (low priority) I tried to give the Giant custom sound effects, which were very deep pitched versions of the regular Zombie sounds, however I could not get /playsound to play the sound effects at the location of the Giant, only at a set coordinates.
Could anybody help me out with these few I'm missing? Once they are fixed, this will work flawlessly.
The Meaning of Life, the Universe, and Everything.
Join Date:
8/19/2019
Posts:
58
Minecraft:
RobotNRP
Member Details
All of the things you've described are possible in vanilla, however, some of them will require a datapack to work most effectively. (However this isn't completely necessary.)
To detect when the giant is killed, you could check if there is no giant within a radius of the ravenger.
/execute at @e[type=minecraft:ravager,name=Giant] unless entity @e[type=minecraft:giant,distance=..2] run ...
When this is the case, you could summon your rotten flesh, play a death sound, and kill the ravenger and zombie.
/execute at @e[type=minecraft:ravager,name=Giant] unless entity @e[type=minecraft:giant,distance=..2] run summon minecraft:item ~ ~1 ~ {Item:{id:"minecraft:rotten_flesh",Count:64}}
/execute at @e[type=minecraft:ravager,name=Giant] unless entity @e[type=minecraft:giant,distance=..2] run playsound ...
/execute as @e[type=minecraft:ravager,name=Giant] at @s unless entity @e[type=minecraft:giant,distance=..2] run kill @s
When it comes to limiting the size area the ravenger can enter, this is were things get tricky. For starters, you would need a way to detect when the ravenger enters a space that is smaller than you want. The quickest and dirties method of doing this would be to use /execute blocks to compair an area of blocks at the ravenger's position to a predefined region of air in your world. However, this method has two main issues. The first is that if someone where to build in the region your comparing to as your air reference, it would completely break the system. the second is that the giant will only be able to be in air. blocks like torches, carpets, plants, water, cave air, and void air that the giant would logically be able to enter would be treated no differently than solid blocks.
If either of those things are a problem for you, the most feasible option would be to use a datapack. In datapacks, you are able to make custom categories of blocks with json files. These categories can then be used in commands like /execute if block ... to see if a block matches any of the ones in the category. By creating a category or "tag" as their called for blocks that the giant can enter and then checking the blocks in an area to see if they match the custom category.
Regardless of what method you use to detect the area around the ravenger, you still need to actually do something when the ravenger enters an area that is too small. A method that might work for that would be to track the giants last position by summoning an area effect cloud and then teleporting the ravenger back to that area effect cloud if the giant enters a space that's too small. the order you run these two commands would look like this.
/execute as @e[type=minecraft:ravager,name=Giant] at @s unless *blocks in area are can be entered* at @e[tag=GiantLastPosition,sort=nearest,limit=1] run tp @s ~ ~ ~
/executeat @e[type=minecraft:ravager,name=Giant] run summon minecraft:area_effect_cloud ~ ~ ~ {Tags:["GiantLastPosition"],Duration:2}
I highly recommend checking out (if you haven't already) the minecraft wiki's pages on the execute command, entity data format, and player data format. I also recommend poking around in some data packs like the ones on Vanilla Tweaks to see how they're put together. If you're just interested in the end product, I can probably upload a datapack that handles all these things for you. Just tell me if that's something you'd want.
Let me know how everything goes and if you run into any other issues.
the things you've described are possible in vanilla, however, some of them will require a datapack to work most effectively. (However this isn't completely necessary.)
To detect when the giant is killed, you could check if there is no giant within a radius of the ravenger.
When this is the case, you could summon your rotten flesh, play a death sound, and kill the ravenger and zombie.
When it comes to limiting the size area the ravenger can enter, this is were things get tricky. For starters, you would need a way to detect when the ravenger enters a space that is smaller than you want. The quickest and dirties method of doing this would be to use /execute blocks to compair an area of blocks at the ravenger's position to a predefined region of air in your world. However, this method has two main issues. The first is that if someone where to build in the region your comparing to as your air reference, it would completely break the system. the second is that the giant will only be able to be in air. blocks like torches, carpets, plants, water, cave air, and void air that the giant would logically be able to enter would be treated no differently than solid blocks.
If either of those things are a problem for you, the most feasible option would be to use a datapack. In datapacks, you are able to make custom categories of blocks with json files. These categories can then be used in commands like /execute if block ... to see if a block matches any of the ones in the category. By creating a category or "tag" as their called for blocks that the giant can enter and then checking the blocks in an area to see if they match the custom category.
Regardless of what method you use to detect the area around the ravenger, you still need to actually do something when the ravenger enters an area that is too small. A method that might work for that would be to track the giants last position by summoning an area effect cloud and then teleporting the ravenger back to that area effect cloud if the giant enters a space that's too small. the order you run these two commands would look like this.
I highly recommend checking out (if you haven't already) the minecraft wiki's pages on the execute command, entity data format, and player data format. I also recommend poking around in some data packs like the ones on Vanilla Tweaks to see how they're put together. If you're just interested in the end product, I can probably upload a datapack that handles all these things for you. Just tell me if that's something you'd want.
Let me know how everything goes and if you run into any other issues.
Summoning the rotten flesh does not seem to work. I even tried changing it to summoning other entities and it did not work.
However, I am mostly concerned about the issue of the Giant fitting into small spaces. If you could make a datapack for just that, that would be great, as I doubt I could work that out on my own. If you need to see the command machine I created for it, I can upload a "generated" file of the machine copied using a structure block.
The Meaning of Life, the Universe, and Everything.
Join Date:
8/19/2019
Posts:
58
Minecraft:
RobotNRP
Member Details
Here's what I've come up with for the datapack. Download the "giant_ai_limiter" and put it in the "datapacks" folder in the world save that you are doing this in.
I went ahead and made it so the giant breaks leaves that are in the way of its path. You can make more blocks breakable just by adding them to the "breakable" list under giant/tags/blocks. Anything that appears when you type "/execute if block ~ ~ ~ ..." is fair game to add. The same goes for "space" which is used to identify blocks the giant can pass through. Just make sure that they both follow the json format if you make any changes.
One possible reason your rotten flesh command isn't working is because it has to be run before the ravenger is killed. If that's already how you've set it up, then whatever's wrong must be something in the execute part of the command. Double check the target selectors to see if they are finding the entities when they're supposed to.
Here's what I've come up with for the datapack. Download the "giant_ai_limiter" and put it in the "datapacks" folder in the world save that you are doing this in.
I went ahead and made it so the giant breaks leaves that are in the way of its path. You can make more blocks breakable just by adding them to the "breakable" list under giant/tags/blocks. Anything that appears when you type "/execute if block ~ ~ ~ ..." is fair game to add. The same goes for "space" which is used to identify blocks the giant can pass through. Just make sure that they both follow the json format if you make any changes.
One possible reason your rotten flesh command isn't working is because it has to be run before the ravenger is killed. If that's already how you've set it up, then whatever's wrong must be something in the execute part of the command. Double check the target selectors to see if they are finding the entities when they're supposed to.
Let me know if there are any other issues.
I made the Giant break any blocks in it's way if it tries to enter a small space, so that's solved.
I also worked out how to make it drop rotten flesh, and I even gave it it's own sound effects. It, however, does not have sound effects for being hurt. Would you know how to do that?
Also, my friend wanted to use my creation for his server, however, when we summoned in the Giant, it randomly walked sideways and backwards acting unusual, as if it were being pushed around by something, despite the fact that the Ravager and the Zombie have their collision turned off. This only happened in his server, not my singleplayer world or my realm. It acts normal when attacking, however. What would you think the problem is?
The Meaning of Life, the Universe, and Everything.
Join Date:
8/19/2019
Posts:
58
Minecraft:
RobotNRP
Member Details
I'm guessing you're using a team with the collision rule set to "never" to get stop the AI and giant from pushing each other around. If that's true, you probably just need to make sure that that team has been added to the server as well.
For detecting when the giant takes damage, you can use the "HurtTime" data tag to detect when the giant takes damage. (I personally like the combined sound of the zombie and dragon for that nice guttural rumble.)
/execute as @e[type=minecraft:giant,nbt={HurtTime:10s}] at @s run playsound minecraft:entity.zombie.hurt hostile @a ~ ~ ~ 1.5 .1
/execute as @e[type=minecraft:giant,nbt={HurtTime:10s}] at @s run playsound minecraft:entity.ender_dragon.growl hostile @a ~ ~ ~ .5 1.5
Let me know of any other problems you encounter. It sounds like it's coming together nicely.
m guessing you're using a team with the collision rule set to "never" to get stop the AI and giant from pushing each other around. If that's true, you probably just need to make sure that that team has been added to the server as well.
For detecting when the giant takes damage, you can use the "HurtTime" data tag to detect when the giant takes damage. (I personally like the combined sound of the zombie and dragon for that nice guttural rumble.)
Let me know of any other problems you encounter. It sounds like it's coming together nicely.
I did add the team the Ravager and the Zombie were on to his server, and added them to it, as well as set the collision to never. It did not work and still acted as if the Giant was being pushed around by something. And thank you, I was able to give it hurt sound effects.
Would you maybe want to join my realm and check it out? I think I did a really good job on it.
So yesterday I was working on a creation to restore the Giant Zombie's AI, as in current builds of the game it does not move or attack.
It works by summoning an invisible Ravager with no collision and infinite health, and rapidly teleporting the Giant to it with a repeating command block, making it appear as if the Giant is chasing and attacking you. Additionally, there is an invisible, invulnerable Zombie with no collision being teleported to the Ravager to give the Giant sound effects.
I also gave the Ravager strength to match the Giant's old attack damage (75), jump boost to match the Giant's height, and speed to match the Giant's old movement speed.
This works almost flawlessly, however, there are a few things which I could not figure out.
1. I need the Giant to drop a stack of rotten flesh upon death.
2. I need the invisible Ravager and Zombie inside the Giant to be automatically killed when the Giant dies (the Ravager's nametag is "Giant," and the Zombie's is "GiantSound."
3. I need it to only be able to fit under 12 block high spaces, to match the height of the Giant, as it can currently fit inside small spaces which a Ravager could fit in. Maybe there's a way to detect that there's something other than air in the 12 blocks above the Ravager and push it back when it tries to enter small spaces??
4. (low priority) I tried to give the Giant custom sound effects, which were very deep pitched versions of the regular Zombie sounds, however I could not get /playsound to play the sound effects at the location of the Giant, only at a set coordinates.
Could anybody help me out with these few I'm missing? Once they are fixed, this will work flawlessly.
All of the things you've described are possible in vanilla, however, some of them will require a datapack to work most effectively. (However this isn't completely necessary.)
To detect when the giant is killed, you could check if there is no giant within a radius of the ravenger.
When this is the case, you could summon your rotten flesh, play a death sound, and kill the ravenger and zombie.
When it comes to limiting the size area the ravenger can enter, this is were things get tricky. For starters, you would need a way to detect when the ravenger enters a space that is smaller than you want. The quickest and dirties method of doing this would be to use /execute blocks to compair an area of blocks at the ravenger's position to a predefined region of air in your world. However, this method has two main issues. The first is that if someone where to build in the region your comparing to as your air reference, it would completely break the system. the second is that the giant will only be able to be in air. blocks like torches, carpets, plants, water, cave air, and void air that the giant would logically be able to enter would be treated no differently than solid blocks.
If either of those things are a problem for you, the most feasible option would be to use a datapack. In datapacks, you are able to make custom categories of blocks with json files. These categories can then be used in commands like /execute if block ... to see if a block matches any of the ones in the category. By creating a category or "tag" as their called for blocks that the giant can enter and then checking the blocks in an area to see if they match the custom category.
Regardless of what method you use to detect the area around the ravenger, you still need to actually do something when the ravenger enters an area that is too small. A method that might work for that would be to track the giants last position by summoning an area effect cloud and then teleporting the ravenger back to that area effect cloud if the giant enters a space that's too small. the order you run these two commands would look like this.
I highly recommend checking out (if you haven't already) the minecraft wiki's pages on the execute command, entity data format, and player data format. I also recommend poking around in some data packs like the ones on Vanilla Tweaks to see how they're put together. If you're just interested in the end product, I can probably upload a datapack that handles all these things for you. Just tell me if that's something you'd want.
Let me know how everything goes and if you run into any other issues.
Summoning the rotten flesh does not seem to work. I even tried changing it to summoning other entities and it did not work.
However, I am mostly concerned about the issue of the Giant fitting into small spaces. If you could make a datapack for just that, that would be great, as I doubt I could work that out on my own. If you need to see the command machine I created for it, I can upload a "generated" file of the machine copied using a structure block.
Here's what I've come up with for the datapack. Download the "giant_ai_limiter" and put it in the "datapacks" folder in the world save that you are doing this in.
I went ahead and made it so the giant breaks leaves that are in the way of its path. You can make more blocks breakable just by adding them to the "breakable" list under giant/tags/blocks. Anything that appears when you type "/execute if block ~ ~ ~ ..." is fair game to add. The same goes for "space" which is used to identify blocks the giant can pass through. Just make sure that they both follow the json format if you make any changes.
One possible reason your rotten flesh command isn't working is because it has to be run before the ravenger is killed. If that's already how you've set it up, then whatever's wrong must be something in the execute part of the command. Double check the target selectors to see if they are finding the entities when they're supposed to.
Let me know if there are any other issues.
I made the Giant break any blocks in it's way if it tries to enter a small space, so that's solved.
I also worked out how to make it drop rotten flesh, and I even gave it it's own sound effects. It, however, does not have sound effects for being hurt. Would you know how to do that?
Also, my friend wanted to use my creation for his server, however, when we summoned in the Giant, it randomly walked sideways and backwards acting unusual, as if it were being pushed around by something, despite the fact that the Ravager and the Zombie have their collision turned off. This only happened in his server, not my singleplayer world or my realm. It acts normal when attacking, however. What would you think the problem is?
I'm guessing you're using a team with the collision rule set to "never" to get stop the AI and giant from pushing each other around. If that's true, you probably just need to make sure that that team has been added to the server as well.
For detecting when the giant takes damage, you can use the "HurtTime" data tag to detect when the giant takes damage. (I personally like the combined sound of the zombie and dragon for that nice guttural rumble.)
Let me know of any other problems you encounter. It sounds like it's coming together nicely.
I did add the team the Ravager and the Zombie were on to his server, and added them to it, as well as set the collision to never. It did not work and still acted as if the Giant was being pushed around by something. And thank you, I was able to give it hurt sound effects.
Would you maybe want to join my realm and check it out? I think I did a really good job on it.