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

@@ -1,32 +1,6 @@
--- a/net/minecraft/world/entity/animal/sniffer/Sniffer.java
+++ b/net/minecraft/world/entity/animal/sniffer/Sniffer.java
@@ -83,14 +83,23 @@
public Sniffer(EntityTypes<? extends EntityAnimal> entitytypes, World world) {
super(entitytypes, world);
- this.entityData.define(Sniffer.DATA_STATE, Sniffer.State.IDLING);
- this.entityData.define(Sniffer.DATA_DROP_SEED_AT_TICK, 0);
+ // this.entityData.define(Sniffer.DATA_STATE, Sniffer.State.IDLING); // CraftBukkit - moved down to appropriate location
+ // this.entityData.define(Sniffer.DATA_DROP_SEED_AT_TICK, 0); // CraftBukkit - moved down to appropriate location
this.getNavigation().setCanFloat(true);
this.setPathfindingMalus(PathType.WATER, -1.0F);
this.setPathfindingMalus(PathType.DANGER_POWDER_SNOW, -1.0F);
this.setPathfindingMalus(PathType.DAMAGE_CAUTIOUS, -1.0F);
}
+ // CraftBukkit start - SPIGOT-7295: moved from constructor to appropriate location
+ @Override
+ protected void defineSynchedData() {
+ super.defineSynchedData();
+ this.entityData.define(Sniffer.DATA_STATE, Sniffer.State.IDLING);
+ this.entityData.define(Sniffer.DATA_DROP_SEED_AT_TICK, 0);
+ }
+ // CraftBukkit end
+
@Override
protected float getStandingEyeHeight(EntityPose entitypose, EntitySize entitysize) {
return this.getDimensions(entitypose).height * 0.6F;
@@ -267,6 +276,13 @@
@@ -274,6 +274,13 @@
ItemStack itemstack = (ItemStack) iterator.next();
EntityItem entityitem = new EntityItem(worldserver, (double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ(), itemstack);
@@ -40,7 +14,7 @@
entityitem.setDefaultPickUpDelay();
worldserver.addFreshEntity(entityitem);
}
@@ -306,7 +322,7 @@
@@ -313,7 +320,7 @@
List<GlobalPos> list = (List) this.getExploredPositions().limit(20L).collect(Collectors.toList());
list.add(0, GlobalPos.of(this.level().dimension(), blockposition));
@@ -49,7 +23,7 @@
return this;
}
@@ -458,7 +474,7 @@
@@ -454,7 +461,7 @@
@Override
public BehaviorController<Sniffer> getBrain() {