SPIGOT-355: API for Villager careers

By: Senmori <thesenmori@gmail.com>
This commit is contained in:
CraftBukkit/Spigot
2017-12-31 21:21:03 +11:00
parent 7fc559ec56
commit 9a972c6f30
2 changed files with 88 additions and 0 deletions

View File

@@ -15,6 +15,22 @@
public class EntityVillager extends EntityAgeable implements NPC, IMerchant {
@@ -18,13 +26,13 @@
@Nullable
private EntityHuman tradingPlayer;
@Nullable
- private MerchantRecipeList trades;
+ public MerchantRecipeList trades; // PAIL private -> public
private int bF;
private boolean bG;
private boolean bH;
public int riches;
private String bJ;
- private int bK;
+ public int bK; // PAIL private -> public // PAIL rename careerID
private int bL;
private boolean bM;
private boolean bN;
@@ -37,7 +45,7 @@
public EntityVillager(World world, int i) {
@@ -40,6 +56,15 @@
}
}
@@ -432,7 +447,7 @@
return this.trades;
}
- private void dx() {
+ public void dx() { // CraftBukkit private -> public // PAIL rename populateTrades
EntityVillager.IMerchantRecipeOption[][][] aentityvillager_imerchantrecipeoption = EntityVillager.bP[this.getProfession()];
if (this.bK != 0 && this.bL != 0) {
@@ -460,7 +475,20 @@
for (int l = 0; l < k; ++l) {
EntityVillager.IMerchantRecipeOption entityvillager_imerchantrecipeoption = aentityvillager_imerchantrecipeoption3[l];