Hi everyone. I'm currently making a map with the use of command blocks. I want monsters to drop custom loot without going into loot tables. I tried tutorials on this and none of them work, even when I copied the exact command shown in the tutorials. My goal is to make a zombie drop a iron block, but I want to achieve this only by using in game commands. I would really appreciate it if someone can show me how to do it.
Add-ons are the only way to do this without problems, but if you really want to use command blocks, try this:
Place an impulse command block facing up, and put 3 chain command blocks on Conditional and Always Active on top of that.
Then, put a chest on the chain command block, and put the iron block(s) into the chest.
In the first command block, type: /clone ~ ~4 ~ ~ ~4 ~ ~ ~5 ~
In the second command block, type: /setblock ~ ~4 ~ air
In the third command block, type:/execute @e[type=item,name="rotten flesh"] ~ ~ ~ tp @e[type=item,name="block of iron"] ~ ~ ~
In the last command block, type: /execute @e[type=item,name="block of iron"] ~ ~ ~ kill @e[type=item,name="rotten flesh",r=2]
Now, place a comparator going into the impulse command block
Place a repeating command block on always active, and type: /testfor @e[type=item,name="rotten flesh"]
This will replace rotten flesh, so if you still want rotten flesh, I recommend using add-ons.
*NOTE* If you notice the machine isn't working after a bit, it is because there is a piece of rotten flesh lying around. Find it and pick it up, or use /kill @e[type=item,name="rotten flesh"]
Thank you for the answer. I always thought that doing this won't be too much of a hussle since there are way more complicated commands in Minecraft Vanilla that work just fine, but it looks like Mojang has completely turend towards loot tables now.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hi everyone. I'm currently making a map with the use of command blocks. I want monsters to drop custom loot without going into loot tables. I tried tutorials on this and none of them work, even when I copied the exact command shown in the tutorials. My goal is to make a zombie drop a iron block, but I want to achieve this only by using in game commands. I would really appreciate it if someone can show me how to do it.
Add-ons are the only way to do this without problems, but if you really want to use command blocks, try this:
Place an impulse command block facing up, and put 3 chain command blocks on Conditional and Always Active on top of that.
Then, put a chest on the chain command block, and put the iron block(s) into the chest.
In the first command block, type: /clone ~ ~4 ~ ~ ~4 ~ ~ ~5 ~
In the second command block, type: /setblock ~ ~4 ~ air
In the third command block, type:/execute @e[type=item,name="rotten flesh"] ~ ~ ~ tp @e[type=item,name="block of iron"] ~ ~ ~
In the last command block, type: /execute @e[type=item,name="block of iron"] ~ ~ ~ kill @e[type=item,name="rotten flesh",r=2]
Now, place a comparator going into the impulse command block
Place a repeating command block on always active, and type: /testfor @e[type=item,name="rotten flesh"]
This will replace rotten flesh, so if you still want rotten flesh, I recommend using add-ons.
*NOTE* If you notice the machine isn't working after a bit, it is because there is a piece of rotten flesh lying around. Find it and pick it up, or use /kill @e[type=item,name="rotten flesh"]
If you have any problems, please reply.
Thank you for the answer. I always thought that doing this won't be too much of a hussle since there are way more complicated commands in Minecraft Vanilla that work just fine, but it looks like Mojang has completely turend towards loot tables now.