Minecraft Wiki
Advertisement

Baby + Unemployed gifts[]

I can't find anything in the loot table files about either of these villager types getting gifts. Where is this information from? -PancakeIdentity (talk) 03:16, 21 May 2019 (UTC)

Those are hardcoded, and the info came from in-game testing. FVbico (talk) 05:14, 21 May 2019 (UTC)
They are available at minecraft:gameplay/hero_of_the_village/<profession-name>_gift loot tables in java edition. liach (talk) 06:11, 21 May 2019 (UTC)
Not for unemployeed ones. FVbico (talk) 06:20, 21 May 2019 (UTC)
In fact, the code is like this: (yarn deobfuscated, 1.14.1 Pre-2)
    private List<ItemStack> getGifts(VillagerEntity class_1646_1) {
        if (class_1646_1.isBaby()) {
            return ImmutableList.of((Object)new ItemStack(Items.POPPY));
        }
        VillagerProfession class_3852_1 = class_1646_1.getVillagerData().getProfession();
        if (GIFTS.containsKey(class_3852_1)) {
            LootSupplier class_52_1 = class_1646_1.world.getServer().getLootManager().getSupplier(GIFTS.get(class_3852_1));
            LootContext.Builder class_47$class_48_1 = new LootContext.Builder((ServerWorld)class_1646_1.world).put(LootContextParameters.POSITION, new BlockPos(class_1646_1)).put(LootContextParameters.THIS_ENTITY, class_1646_1).setRandom(class_1646_1.getRand());
            return class_52_1.getDrops(class_47$class_48_1.build(LootContextTypes.GIFT));
        }
        return ImmutableList.of((Object)new ItemStack(Items.WHEAT_SEEDS));
    }
So the wheat seeds and poppy are hardcoded while the rest are queried from loot tables. Should be clear enough now. liach (talk) 09:18, 21 May 2019 (UTC)

Missed info[]

  • Does it decay?
  • What the Levels depend on?

91.192.62.120 08:52, 4 January 2020 (UTC)

That's all listed under causes... FVbico (talk) 09:36, 4 January 2020 (UTC)

The villagers' Gift[]

The all loot tables of villagers gifts except fletchers'. But the loot table of fletcher's gift is differently.


{ "type": "minecraft:gift",

 "pools": [
   {
     "rolls": 1,
     "entries": [
       {
         "type": "minecraft:item",
         "weight": 26,
         "name": "minecraft:arrow"
       },
       {
         "type": "minecraft:item",
         "functions": [
           {
             "function": "minecraft:set_count",
             "count": {
               "min": 0.0,
               "max": 1.0,
               "type": "minecraft:uniform"
             }
           },
           {
             "function": "minecraft:set_nbt",
             "tag": "{Potion:\"minecraft:swiftness\"}"
           }
         ],
         "name": "minecraft:tipped_arrow"
       },
       {
         "type": "minecraft:item",
         "functions": [
           {
             "function": "minecraft:set_count",
             "count": {
               "min": 0.0,
               "max": 1.0,
               "type": "minecraft:uniform"
             }
           },
           {
             "function": "minecraft:set_nbt",
             "tag": "{Potion:\"minecraft:slowness\"}"
           }
         ],
         "name": "minecraft:tipped_arrow"
       },
       {
         "type": "minecraft:item",
         "functions": [
           {
             "function": "minecraft:set_count",
             "count": {
               "min": 0.0,
               "max": 1.0,
               "type": "minecraft:uniform"
             }
           },
           {
             "function": "minecraft:set_nbt",
             "tag": "{Potion:\"minecraft:strength\"}"
           }
         ],
         "name": "minecraft:tipped_arrow"
       },
       {
         "type": "minecraft:item",
         "functions": [
           {
             "function": "minecraft:set_count",
             "count": {
               "min": 0.0,
               "max": 1.0,
               "type": "minecraft:uniform"
             }
           },
           {
             "function": "minecraft:set_nbt",
             "tag": "{Potion:\"minecraft:healing\"}"
           }
         ],
         "name": "minecraft:tipped_arrow"
       },
       {
         "type": "minecraft:item",
         "functions": [
           {
             "function": "minecraft:set_count",
             "count": {
               "min": 0.0,
               "max": 1.0,
               "type": "minecraft:uniform"
             }
           },
           {
             "function": "minecraft:set_nbt",
             "tag": "{Potion:\"minecraft:harming\"}"
           }
         ],
         "name": "minecraft:tipped_arrow"
       },
       {
         "type": "minecraft:item",
         "functions": [
           {
             "function": "minecraft:set_count",
             "count": {
               "min": 0.0,
               "max": 1.0,
               "type": "minecraft:uniform"
             }
           },
           {
             "function": "minecraft:set_nbt",
             "tag": "{Potion:\"minecraft:leaping\"}"
           }
         ],
         "name": "minecraft:tipped_arrow"
       },
       {
         "type": "minecraft:item",
         "functions": [
           {
             "function": "minecraft:set_count",
             "count": {
               "min": 0.0,
               "max": 1.0,
               "type": "minecraft:uniform"
             }
           },
           {
             "function": "minecraft:set_nbt",
             "tag": "{Potion:\"minecraft:regeneration\"}"
           }
         ],
         "name": "minecraft:tipped_arrow"
       },
       {
         "type": "minecraft:item",
         "functions": [
           {
             "function": "minecraft:set_count",
             "count": {
               "min": 0.0,
               "max": 1.0,
               "type": "minecraft:uniform"
             }
           },
           {
             "function": "minecraft:set_nbt",
             "tag": "{Potion:\"minecraft:fire_resistance\"}"
           }
         ],
         "name": "minecraft:tipped_arrow"
       },
       {
         "type": "minecraft:item",
         "functions": [
           {
             "function": "minecraft:set_count",
             "count": {
               "min": 0.0,
               "max": 1.0,
               "type": "minecraft:uniform"
             }
           },
           {
             "function": "minecraft:set_nbt",
             "tag": "{Potion:\"minecraft:water_breathing\"}"
           }
         ],
         "name": "minecraft:tipped_arrow"
       },
       {
         "type": "minecraft:item",
         "functions": [
           {
             "function": "minecraft:set_count",
             "count": {
               "min": 0.0,
               "max": 1.0,
               "type": "minecraft:uniform"
             }
           },
           {
             "function": "minecraft:set_nbt",
             "tag": "{Potion:\"minecraft:invisibility\"}"
           }
         ],
         "name": "minecraft:tipped_arrow"
       },
       {
         "type": "minecraft:item",
         "functions": [
           {
             "function": "minecraft:set_count",
             "count": {
               "min": 0.0,
               "max": 1.0,
               "type": "minecraft:uniform"
             }
           },
           {
             "function": "minecraft:set_nbt",
             "tag": "{Potion:\"minecraft:night_vision\"}"
           }
         ],
         "name": "minecraft:tipped_arrow"
       },
       {
         "type": "minecraft:item",
         "functions": [
           {
             "function": "minecraft:set_count",
             "count": {
               "min": 0.0,
               "max": 1.0,
               "type": "minecraft:uniform"
             }
           },
           {
             "function": "minecraft:set_nbt",
             "tag": "{Potion:\"minecraft:weakness\"}"
           }
         ],
         "name": "minecraft:tipped_arrow"
       },
       {
         "type": "minecraft:item",
         "functions": [
           {
             "function": "minecraft:set_count",
             "count": {
               "min": 0.0,
               "max": 1.0,
               "type": "minecraft:uniform"
             }
           },
           {
             "function": "minecraft:set_nbt",
             "tag": "{Potion:\"minecraft:poison\"}"
           }
         ],
         "name": "minecraft:tipped_arrow"
       }
     ]
   }
 ]

}


the weight of normal arrow is 26,and others are 1. but the tipped arrow have 50% chance wont drop anything.

How to change this page for add these info?Drlee lihr Talk 12:39, 26 June 2020 (UTC)

Bedrock Edition price decrement[]

OK there is a difference between the price decrement of both Java and Bedrock editions

Java Edition's price decrement would be 30% + 6.25 x (level - 1) if the effect is active, because I tried to trade a fletcher and the price is now 23 sticks because I have Hero of the Village level 1, while in Bedrock Edition the fletcher villager wanted 25 instead

Is it possible that Bedrock Edition's price decrement is 20%? PinksheepyIsLeaving (talk) 13:37, 13 June 2021 (UTC)

Farmer villagers can also pick up bread they just threw to the player(s) with Hero of the Village if they don't pick them up[]

The article says that villagers might pick up seeds they throw if the player doesn't pick them up in time, because villagers pick up seeds if /gamerule mobGriefing is set to true, but does this include farmer villagers, when they throw bread at the player? 99.225.26.102 21:03, 1 September 2021 (UTC)

Advertisement