2021-03-15 23:00:00 +01:00
|
|
|
--- a/net/minecraft/world/entity/EntityAgeable.java
|
|
|
|
+++ b/net/minecraft/world/entity/EntityAgeable.java
|
|
|
|
@@ -17,6 +17,7 @@
|
2019-04-23 04:00:00 +02:00
|
|
|
protected int b;
|
2014-11-25 22:32:16 +01:00
|
|
|
protected int c;
|
2019-04-23 04:00:00 +02:00
|
|
|
protected int d;
|
2016-02-29 22:32:46 +01:00
|
|
|
+ public boolean ageLocked; // CraftBukkit
|
2014-11-25 22:32:16 +01:00
|
|
|
|
2019-04-23 04:00:00 +02:00
|
|
|
protected EntityAgeable(EntityTypes<? extends EntityAgeable> entitytypes, World world) {
|
2018-07-15 02:00:00 +02:00
|
|
|
super(entitytypes, world);
|
2021-03-15 23:00:00 +01:00
|
|
|
@@ -100,6 +101,7 @@
|
2020-06-25 02:00:00 +02:00
|
|
|
super.saveData(nbttagcompound);
|
2014-11-25 22:32:16 +01:00
|
|
|
nbttagcompound.setInt("Age", this.getAge());
|
2019-04-23 04:00:00 +02:00
|
|
|
nbttagcompound.setInt("ForcedAge", this.c);
|
2014-11-25 22:32:16 +01:00
|
|
|
+ nbttagcompound.setBoolean("AgeLocked", this.ageLocked); // CraftBukkit
|
|
|
|
}
|
|
|
|
|
2019-04-23 04:00:00 +02:00
|
|
|
@Override
|
2021-03-15 23:00:00 +01:00
|
|
|
@@ -107,6 +109,7 @@
|
2020-06-25 02:00:00 +02:00
|
|
|
super.loadData(nbttagcompound);
|
2014-11-25 22:32:16 +01:00
|
|
|
this.setAgeRaw(nbttagcompound.getInt("Age"));
|
2019-04-23 04:00:00 +02:00
|
|
|
this.c = nbttagcompound.getInt("ForcedAge");
|
2014-11-25 22:32:16 +01:00
|
|
|
+ this.ageLocked = nbttagcompound.getBoolean("AgeLocked"); // CraftBukkit
|
|
|
|
}
|
|
|
|
|
2019-04-23 04:00:00 +02:00
|
|
|
@Override
|
2021-03-15 23:00:00 +01:00
|
|
|
@@ -121,7 +124,7 @@
|
2019-04-23 04:00:00 +02:00
|
|
|
@Override
|
2018-12-13 01:00:00 +01:00
|
|
|
public void movementTick() {
|
|
|
|
super.movementTick();
|
2015-02-26 23:41:06 +01:00
|
|
|
- if (this.world.isClientSide) {
|
|
|
|
+ if (this.world.isClientSide || ageLocked) { // CraftBukkit
|
2019-04-23 04:00:00 +02:00
|
|
|
if (this.d > 0) {
|
|
|
|
if (this.d % 4 == 0) {
|
2020-11-02 21:00:00 +01:00
|
|
|
this.world.addParticle(Particles.HAPPY_VILLAGER, this.d(1.0D), this.cF() + 0.5D, this.g(1.0D), 0.0D, 0.0D, 0.0D);
|