Update to Minecraft 1.20.5

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2024-04-24 01:15:00 +10:00
parent 4deda9501f
commit 65bc2541a3
524 changed files with 7788 additions and 6181 deletions

View File

@@ -73,7 +73,16 @@
Logger logger = EntityVillager.LOGGER;
Objects.requireNonNull(logger);
@@ -834,9 +855,14 @@
@@ -513,7 +534,7 @@
public void readAdditionalSaveData(NBTTagCompound nbttagcompound) {
super.readAdditionalSaveData(nbttagcompound);
if (nbttagcompound.contains("VillagerData", 10)) {
- DataResult dataresult = VillagerData.CODEC.parse(DynamicOpsNBT.INSTANCE, nbttagcompound.get("VillagerData"));
+ DataResult<VillagerData> dataresult = VillagerData.CODEC.parse(new Dynamic(DynamicOpsNBT.INSTANCE, nbttagcompound.get("VillagerData")));
Logger logger = EntityVillager.LOGGER;
Objects.requireNonNull(logger);
@@ -826,9 +847,14 @@
}
entitywitch.setPersistenceRequired();
@@ -90,7 +99,7 @@
} else {
super.thunderHit(worldserver, entitylightning);
}
@@ -933,7 +959,7 @@
@@ -925,7 +951,7 @@
}).limit(5L).collect(Collectors.toList());
if (list1.size() >= j) {
@@ -99,7 +108,7 @@
list.forEach(SensorGolemLastSeen::golemDetected);
}
}
@@ -990,7 +1016,7 @@
@@ -982,7 +1008,7 @@
@Override
public void startSleeping(BlockPosition blockposition) {
super.startSleeping(blockposition);
@@ -108,7 +117,7 @@
this.brain.eraseMemory(MemoryModuleType.WALK_TARGET);
this.brain.eraseMemory(MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE);
}
@@ -998,7 +1024,7 @@
@@ -990,7 +1016,7 @@
@Override
public void stopSleeping() {
super.stopSleeping();

View File

@@ -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) {

View File

@@ -41,7 +41,7 @@
}
}
@@ -244,7 +262,7 @@
@@ -243,7 +261,7 @@
private void maybeDespawn() {
if (this.despawnDelay > 0 && !this.isTrading() && --this.despawnDelay == 0) {

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/entity/npc/InventoryCarrier.java
+++ b/net/minecraft/world/entity/npc/InventoryCarrier.java
@@ -6,6 +6,10 @@
@@ -7,6 +7,10 @@
import net.minecraft.world.entity.item.EntityItem;
import net.minecraft.world.item.ItemStack;
@@ -11,7 +11,7 @@
public interface InventoryCarrier {
String TAG_INVENTORY = "Inventory";
@@ -23,13 +27,20 @@
@@ -24,13 +28,20 @@
return;
}