Suggestion: Mob Drops
DRTR0 opened this issue ยท 5 comments
You should add a new feature to customize mob drops.
For example, a script something like
mobdrops.add(mob, item, min, max)
mobdrops.add(Villager, minecraft:emerald, 0, 1) //Drops 0-1 emerald when villager is killed.
mobdrops.remove(mob, item)
mobdrops.remove(Witch, minecraft:redstone) //Removes redstone from Witch drops.
mobdrops.removeall(mob)
mobdrops.removeall(Witch) //Removes all Witch drops.
The syntax will be:
//makes sheep drop dirt with a stacksize of between 1 and 5 (inclusive)
game.getEntity("Sheep").addDrop(<minecraft:dirt>, 1, 5);
//makes sheep drop sticks when killed by a player with a stacksize of between 1 and 5(inclusive)
game.getEntity("Sheep").addPlayerOnlyDrop(<minecraft:stick>, 1, 5);
//makes sheep drop a diamond
game.getEntity("Sheep").addDrop(<minecraft:diamond>);
//makes sheep not drop any wool (wild card is used to all Sheep colours are affected)
game.getEntity("Sheep").removeDrop(<minecraft:wool:*>);
@UndeadZeratul That's what I was implying. There could also be a true/false parameter where it must be player kill or not.
Ah, the first one mentions in the comment when villager is killed, but that could be from a zombie, or some form of mob farm that doesn't allow player-only drops.
I was thinking of a true/false parameter as well, since just setting the min to 0 doesn't imply player-only drops.
Either that, or a different method entirely, something like:
mobdrops.addPlayerOnly(mob, item, min, max);
mobdrops.addPlayerOnly(Zombie, <minecraft:bread>, 2, 3); // Drops 2-3 bread when a zombie is killed by the player.
The only thing I'm noticing is that MineTweaker/CraftTweaker (last I looked into it, back in 1.7.10) doesn't have any structure for entities, does it? Would the mob parameter be a String representing the mob's name?
I would say the mob parameter be a string of the entity ID's, and then translated into the coding net.minecraft.mob.whatever it is.
Perhaps,
To remove the drop table of a mob.
mobdrops.remove(mob)
mobdrops.remove(Spider);
To add
mobdrops.add(mob, item, min, max, chance, playeronly)
mobdrops.add(Villager, minecraft:emerald, 1, 1, 0.10, true);
Villager has a 10% chance of dropping an emerald on player kills only.