@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/world/entity/npc/EntityVillagerAbstract.java
|
||||
+++ b/net/minecraft/world/entity/npc/EntityVillagerAbstract.java
|
||||
@@ -35,8 +35,24 @@
|
||||
import net.minecraft.world.level.pathfinder.PathType;
|
||||
@@ -40,8 +40,24 @@
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.Bukkit;
|
||||
@@ -23,9 +23,9 @@
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
private static final DataWatcherObject<Integer> DATA_UNHAPPY_COUNTER = DataWatcher.defineId(EntityVillagerAbstract.class, DataWatcherRegistry.INT);
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
public static final int VILLAGER_SLOT_OFFSET = 300;
|
||||
private static final int VILLAGER_INVENTORY_SIZE = 8;
|
||||
@@ -44,7 +60,7 @@
|
||||
@@ -50,7 +66,7 @@
|
||||
private EntityHuman tradingPlayer;
|
||||
@Nullable
|
||||
protected MerchantRecipeList offers;
|
||||
@@ -34,7 +34,16 @@
|
||||
|
||||
public EntityVillagerAbstract(EntityTypes<? extends EntityVillagerAbstract> entitytypes, World world) {
|
||||
super(entitytypes, world);
|
||||
@@ -233,7 +249,16 @@
|
||||
@@ -173,7 +189,7 @@
|
||||
public void readAdditionalSaveData(NBTTagCompound nbttagcompound) {
|
||||
super.readAdditionalSaveData(nbttagcompound);
|
||||
if (nbttagcompound.contains("Offers")) {
|
||||
- DataResult dataresult = MerchantRecipeList.CODEC.parse(this.registryAccess().createSerializationContext(DynamicOpsNBT.INSTANCE), nbttagcompound.get("Offers"));
|
||||
+ DataResult<MerchantRecipeList> dataresult = MerchantRecipeList.CODEC.parse(this.registryAccess().createSerializationContext(DynamicOpsNBT.INSTANCE), nbttagcompound.get("Offers")); // CraftBukkit - decompile error
|
||||
Logger logger = EntityVillagerAbstract.LOGGER;
|
||||
|
||||
Objects.requireNonNull(logger);
|
||||
@@ -240,7 +256,16 @@
|
||||
MerchantRecipe merchantrecipe = ((VillagerTrades.IMerchantRecipeOption) arraylist.remove(this.random.nextInt(arraylist.size()))).getOffer(this, this.random);
|
||||
|
||||
if (merchantrecipe != null) {
|
||||
|
||||
Reference in New Issue
Block a user