However when the spawner is crafted it's a pig spawner. I've tried a lot of things, mostly copy pasting things because I am not experienced enough to know what I'm actually doing and needless to say it didn't work. I've searched through web pages related to this topic but couldn't find anything useful. I would be really grateful if someone could help me out on this.
Unfortunately it doesn't, I now need a mob spawner to make another one and the recipe yields in a pig spawner, so it's basically a weird way to get rid of unwanted leather. Thank you for answering.
If this is for 1.7.10, this cannot be done without custom handlers due to how the game is programmed.
Long explanation:
The mob spawner block does not use a custom item block (item that places the block...) or any logic relating to the item's nbt data, so the game doesn't "know" what to spawn, and by default, the mob spawner block is set to be a pig. Dungeons generate mob spawners by setting the block and tile entity, then manually setting the tile entity's spawning entity.
To work around this logic problem:
We could A, edit the game's code when it's loaded by making a coremod. This would be the best method for optimization since it'd only modify the code once and not every single use.
Or B, make an event handler doing the custom logic we need. This is definitely not the best for optimization and will cause lag (not right away, but "eventually").
Option A is a long drawn out process I won't bother explaining or doing. It's not hard.
I've already done Option B for you. Modify as needed.
Thank you a lot for helping me stranger! It works flawlessly, it would've taken weeks(if not more) for me to figure that out you saved me a lot of trouble.I wish you a great day.
Hello, I'm a really new minecraft modder making mods only for me and my friends. I wanted to add a zombie spawner recipe
However when the spawner is crafted it's a pig spawner. I've tried a lot of things, mostly copy pasting things because I am not experienced enough to know what I'm actually doing and needless to say it didn't work. I've searched through web pages related to this topic but couldn't find anything useful. I would be really grateful if someone could help me out on this.
Does it work with this one?
Unfortunately it doesn't, I now need a mob spawner to make another one and the recipe yields in a pig spawner, so it's basically a weird way to get rid of unwanted leather. Thank you for answering.
If this is for 1.7.10, this cannot be done without custom handlers due to how the game is programmed.
Long explanation:
The mob spawner block does not use a custom item block (item that places the block...) or any logic relating to the item's nbt data, so the game doesn't "know" what to spawn, and by default, the mob spawner block is set to be a pig. Dungeons generate mob spawners by setting the block and tile entity, then manually setting the tile entity's spawning entity.
To work around this logic problem:
We could A, edit the game's code when it's loaded by making a coremod. This would be the best method for optimization since it'd only modify the code once and not every single use.
Or B, make an event handler doing the custom logic we need. This is definitely not the best for optimization and will cause lag (not right away, but "eventually").
Option A is a long drawn out process I won't bother explaining or doing. It's not hard.
I've already done Option B for you. Modify as needed.
https://gist.github.com/master801/ef9aebabd1d49af5a04f14b90e227104
Thank you a lot for helping me stranger! It works flawlessly, it would've taken weeks(if not more) for me to figure that out you saved me a lot of trouble.I wish you a great day.