#865: Implement Villager#shakeHead

This commit is contained in:
VendoAU 2021-06-14 19:13:37 +10:00 committed by md_5
parent 3252ff189c
commit a07e783a69
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11
2 changed files with 14 additions and 0 deletions

View File

@ -51,6 +51,15 @@
} }
} }
@@ -302,7 +310,7 @@
}
}
- private void fT() {
+ public void fT() {
this.t(40);
if (!this.level.isClientSide()) {
this.playSound(SoundEffects.VILLAGER_NO, this.getSoundVolume(), this.ep());
@@ -444,7 +452,14 @@ @@ -444,7 +452,14 @@
while (iterator.hasNext()) { while (iterator.hasNext()) {
MerchantRecipe merchantrecipe = (MerchantRecipe) iterator.next(); MerchantRecipe merchantrecipe = (MerchantRecipe) iterator.next();

View File

@ -107,6 +107,11 @@ public class CraftVillager extends CraftAbstractVillager implements Villager {
getHandle().entityWakeup(); getHandle().entityWakeup();
} }
@Override
public void shakeHead() {
getHandle().fT(); // PAIL rename shakeHead
}
public static Profession nmsToBukkitProfession(VillagerProfession nms) { public static Profession nmsToBukkitProfession(VillagerProfession nms) {
return Profession.valueOf(IRegistry.VILLAGER_PROFESSION.getKey(nms).getKey().toUpperCase(Locale.ROOT)); return Profession.valueOf(IRegistry.VILLAGER_PROFESSION.getKey(nms).getKey().toUpperCase(Locale.ROOT));
} }