@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/world/entity/npc/EntityVillagerAbstract.java
|
||||
+++ b/net/minecraft/world/entity/npc/EntityVillagerAbstract.java
|
||||
@@ -32,14 +32,30 @@
|
||||
import net.minecraft.world.level.WorldAccess;
|
||||
@@ -36,8 +36,24 @@
|
||||
import net.minecraft.world.level.pathfinder.PathType;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.Bukkit;
|
||||
@@ -12,7 +12,7 @@
|
||||
+import org.bukkit.event.entity.VillagerAcquireTradeEvent;
|
||||
+// CraftBukkit end
|
||||
+
|
||||
public abstract class EntityVillagerAbstract extends EntityAgeable implements NPC, IMerchant {
|
||||
public abstract class EntityVillagerAbstract extends EntityAgeable implements InventoryCarrier, NPC, IMerchant {
|
||||
|
||||
+ // CraftBukkit start
|
||||
+ private CraftMerchant craftMerchant;
|
||||
@@ -22,17 +22,19 @@
|
||||
+ return (craftMerchant == null) ? craftMerchant = new CraftMerchant(this) : craftMerchant;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
private static final DataWatcherObject<Integer> bp = DataWatcher.a(EntityVillagerAbstract.class, DataWatcherRegistry.b);
|
||||
@Nullable
|
||||
private static final DataWatcherObject<Integer> DATA_UNHAPPY_COUNTER = DataWatcher.a(EntityVillagerAbstract.class, DataWatcherRegistry.INT);
|
||||
public static final int VILLAGER_SLOT_OFFSET = 300;
|
||||
private static final int VILLAGER_INVENTORY_SIZE = 8;
|
||||
@@ -45,7 +61,7 @@
|
||||
private EntityHuman tradingPlayer;
|
||||
@Nullable
|
||||
protected MerchantRecipeList trades;
|
||||
protected MerchantRecipeList offers;
|
||||
- private final InventorySubcontainer inventory = new InventorySubcontainer(8);
|
||||
+ private final InventorySubcontainer inventory = new InventorySubcontainer(8, (org.bukkit.craftbukkit.entity.CraftAbstractVillager) this.getBukkitEntity()); // CraftBukkit add argument
|
||||
|
||||
public EntityVillagerAbstract(EntityTypes<? extends EntityVillagerAbstract> entitytypes, World world) {
|
||||
super(entitytypes, world);
|
||||
@@ -240,7 +256,16 @@
|
||||
@@ -252,7 +268,16 @@
|
||||
MerchantRecipe merchantrecipe = villagertrades_imerchantrecipeoption.a(this, this.random);
|
||||
|
||||
if (merchantrecipe != null) {
|
||||
|
||||
Reference in New Issue
Block a user