Posted March 6, 20214 yr Some time ago I used the GLM system to modify drops for several mobs, chests, etc. It all seemed to work well and I have since moved on to other parts of my mod. Yesterday I noticed that when a villager harvested some wheat, it was adding some of my drops. I did not do any harvest drops, yet there it was. In looking closer, it looks like the loot table ID is "minecraft:blocks/wheat", which I expected. The GLM that is being matches is my villager GLM: { "type": "nukesecon:addcoins", "conditions": [ { "condition": "minecraft:entity_properties", "predicate": { "type": "minecraft:villager" }, "entity": "this" } ], "numRolls": 5, "woodChance": 10, "ironChance": 1, "copperChance": 0.1, "goldChance": 0.001, "diamondChance": 0, "emeraldChance": 0 } This was meant to drop items should you kill a villager, and not modify the loot table should the villager harvest a block. I think this was just an unexpected consequence and I'm going to have to modify my GLMs to handle the fact that when an entity such as a villager acts on a block, such as harvesting wheat, this will match the condition/predicate. Anyway, I just thought I would ask the forum for advice on the best way to accomplish all this before I go too much further. Essentially, the goal is to drop coins when you kill mobs. The coins can also appear in chests and whatnot. Full source can be found here if interested: https://github.com/nuke3d/NukesEcon Thanks you! Edited March 6, 20214 yr by Nuke3d
March 6, 20214 yr Author 58 minutes ago, diesieben07 said: You just need to add a damage_source_properties condition as well. No need to specify any properties for the condition, but it will verify that there is a damage source in the loot context, meaning the looting was the result of something killing a villager. Thank you! I will give it a shot. Money was never supposed to grow on trees like this. =p
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.