--- a/net/minecraft/entity/merchant/villager/VillagerEntity.java
+++ b/net/minecraft/entity/merchant/villager/VillagerEntity.java
@@ -240,7 +240,7 @@
 
    public ActionResultType func_230254_b_(PlayerEntity p_230254_1_, Hand p_230254_2_) {
       ItemStack itemstack = p_230254_1_.func_184586_b(p_230254_2_);
-      if (itemstack.func_77973_b() != Items.field_196172_da && this.func_70089_S() && !this.func_213716_dX() && !this.func_70608_bn()) {
+      if (itemstack.func_77973_b() != Items.field_196172_da && this.func_70089_S() && !this.func_213716_dX() && !this.func_70608_bn() && !p_230254_1_.func_226563_dT_()) {
          if (this.func_70631_g_()) {
             this.func_213756_es();
             return ActionResultType.func_233537_a_(this.field_70170_p.field_72995_K);
@@ -628,7 +628,8 @@
    }
 
    protected ITextComponent func_225513_by_() {
-      return new TranslationTextComponent(this.func_200600_R().func_210760_d() + '.' + Registry.field_218370_L.func_177774_c(this.func_213700_eh().func_221130_b()).func_110623_a());
+      net.minecraft.util.ResourceLocation profName = this.func_213700_eh().func_221130_b().getRegistryName();
+      return new TranslationTextComponent(this.func_200600_R().func_210760_d() + '.' + (!"minecraft".equals(profName.func_110624_b()) ? profName.func_110624_b() + '.' : "") + profName.func_110623_a());
    }
 
    @OnlyIn(Dist.CLIENT)
