-
Bug
-
Resolution: Works As Intended
-
None
-
Minecraft 1.11, Minecraft 1.11.2, Minecraft 1.12 Pre-Release 5, Minecraft 1.12, Minecraft 1.13.1
-
Confirmed
-
(Unassigned)
The vindicator will not spawn naturally with the tag that makes them able to pick up loot.
What should happen:
Depending on difficulty a percentage of all vindicators spawned naturally in the world via generation, spawn egg or commands (not including those summoned with the tag {CanPickUpLoot:1b} should have a percentage chance for it to have the tag {CanPickUpLoot:1b}. This will make the vindicators with the tag be able to pick up loot you throw at it given the priority algorithm allows it. That is for example, diamond swords are better than iron axe, meaning it should exchange the diamond sword with its current weapon (iron axe). In other words, it should act as if it was summoned with this command:
/summon vindication_illager ~ ~ ~ {CanPickUpLoot:1b}
How to recreate:
Spawn a vindicator using a spawn egg, command or find them naturally. Try giving them a diamond sword (or another item it should prefer if it has the tag). See if it picks up the diamond sword. Repeat until satisfied.
Please ask if you have any questions.
Fix: (Based off of Minecraft 1.11, MCP 9.35)
public IEntityLivingData onInitialSpawn(DifficultyInstance difficulty, @Nullable IEntityLivingData livingdata) { //add these two lines //same way other mobs are given pick up ability float f = difficulty.getClampedAdditionalDifficulty(); this.setCanPickUpLoot(this.rand.nextFloat() < 0.55F * f); }