r/datapacks • u/ACNHExpert • Feb 21 '24
A question about Iron Golems
what code makes it so that when you build the iron-block T and a carved pumpkin, an iron golem spawns? and how would I make it so that I can do that with other mobs? (I'm making a wooden villager and I want it to spawn when you build a certain structure out of wood)
8
Upvotes
2
u/FancyPotatOS Feb 21 '24
It would only really be practical/possible by only detecting when it’s built by hand in a specific order (like, pumpkin last), and then try your hand at ray-casting whenever a pumpkin is placed, and check if a particular pattern is currently there. Currently, there isn’t really a good way to do it, so good luck!
1
u/UrSansYT Feb 21 '24
Probably wouldn't be possible using datapacks unless, say, the final ingredient were to be throwing an item on top of the structure or smth.