Update to Minecraft 1.18-pre5

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2021-11-22 09:00:00 +11:00
parent a852b81a69
commit 43702a9e10
700 changed files with 10286 additions and 10098 deletions

View File

@@ -9,16 +9,16 @@
protected EntityAgeable(EntityTypes<? extends EntityAgeable> entitytypes, World world) {
super(entitytypes, world);
@@ -102,6 +103,7 @@
super.saveData(nbttagcompound);
nbttagcompound.setInt("Age", this.getAge());
nbttagcompound.setInt("ForcedAge", this.forcedAge);
+ nbttagcompound.setBoolean("AgeLocked", this.ageLocked); // CraftBukkit
super.addAdditionalSaveData(nbttagcompound);
nbttagcompound.putInt("Age", this.getAge());
nbttagcompound.putInt("ForcedAge", this.forcedAge);
+ nbttagcompound.putBoolean("AgeLocked", this.ageLocked); // CraftBukkit
}
@Override
@@ -109,6 +111,7 @@
super.loadData(nbttagcompound);
this.setAgeRaw(nbttagcompound.getInt("Age"));
super.readAdditionalSaveData(nbttagcompound);
this.setAge(nbttagcompound.getInt("Age"));
this.forcedAge = nbttagcompound.getInt("ForcedAge");
+ this.ageLocked = nbttagcompound.getBoolean("AgeLocked"); // CraftBukkit
}
@@ -26,10 +26,10 @@
@Override
@@ -123,7 +126,7 @@
@Override
public void movementTick() {
super.movementTick();
public void aiStep() {
super.aiStep();
- if (this.level.isClientSide) {
+ if (this.level.isClientSide || ageLocked) { // CraftBukkit
if (this.forcedAgeTimer > 0) {
if (this.forcedAgeTimer % 4 == 0) {
this.level.addParticle(Particles.HAPPY_VILLAGER, this.d(1.0D), this.da() + 0.5D, this.g(1.0D), 0.0D, 0.0D, 0.0D);
this.level.addParticle(Particles.HAPPY_VILLAGER, this.getRandomX(1.0D), this.getRandomY() + 0.5D, this.getRandomZ(1.0D), 0.0D, 0.0D, 0.0D);