Observed Result
Snow Golems and Ghasts are not enemies and will not attack each other, but if a snowball from a Snow Golem attacking a Zombie or Piglin hits a Ghast, the Ghast will attack the Snow Golem and destroy the surrounding blocks.
Expected Result
If Ghast and Snow Golem are deliberately trying to avoid antagonizing each other, then there would be no need for Ghast to fight back against Snow Golem.
If this behavior is correct, we can collect all the blocks that Ghast can break automatically, is that correct?
Comments 2
Can confirm. However, as previously stated by GoldenHelmet, this is most likely intentional behavior.
Steps to reproduce:
Summon a snow golem.
Summon a silverfish a few blocks apart from the golem (but within its reach).
Once the golem starts attacking the silverfish, summon the ghast between both of them.
Ghasts are coded to retaliate against any entity that hits them. Their behavior file contains this component:
"minecraft:behavior.hurt_by_target": {
"priority": 1
},
This behavior is used by many players to create “ghast blasters”, which are machines that use ghasts to automatically break wood, concrete and other blocks, in order to farm the items.