| 
									
										
										
										
											2015-05-25 20:37:24 +10:00
										 |  |  | --- a/net/minecraft/server/EntityAgeable.java
 | 
					
						
							|  |  |  | +++ b/net/minecraft/server/EntityAgeable.java
 | 
					
						
							| 
									
										
										
										
											2019-04-23 12:00:00 +10:00
										 |  |  | @@ -8,6 +8,7 @@
 | 
					
						
							|  |  |  |      protected int b; | 
					
						
							| 
									
										
										
										
											2014-11-26 08:32:16 +11:00
										 |  |  |      protected int c; | 
					
						
							| 
									
										
										
										
											2019-04-23 12:00:00 +10:00
										 |  |  |      protected int d; | 
					
						
							| 
									
										
										
										
											2016-03-01 08:32:46 +11:00
										 |  |  | +    public boolean ageLocked; // CraftBukkit
 | 
					
						
							| 
									
										
										
										
											2014-11-26 08:32:16 +11:00
										 |  |  |   | 
					
						
							| 
									
										
										
										
											2019-04-23 12:00:00 +10:00
										 |  |  |      protected EntityAgeable(EntityTypes<? extends EntityAgeable> entitytypes, World world) { | 
					
						
							| 
									
										
										
										
											2018-07-15 10:00:00 +10:00
										 |  |  |          super(entitytypes, world); | 
					
						
							| 
									
										
										
										
											2019-12-11 09:00:00 +11:00
										 |  |  | @@ -46,7 +47,7 @@
 | 
					
						
							| 
									
										
										
										
											2018-07-15 10:00:00 +10:00
										 |  |  |                  if (entityageable != null) { | 
					
						
							|  |  |  |                      entityageable.setAgeRaw(-24000); | 
					
						
							| 
									
										
										
										
											2019-12-11 09:00:00 +11:00
										 |  |  |                      entityageable.setPositionRotation(this.locX(), this.locY(), this.locZ(), 0.0F, 0.0F); | 
					
						
							| 
									
										
										
										
											2018-07-15 10:00:00 +10:00
										 |  |  | -                    this.world.addEntity(entityageable);
 | 
					
						
							|  |  |  | +                    this.world.addEntity(entityageable, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER_EGG); // CraftBukkit
 | 
					
						
							|  |  |  |                      if (itemstack.hasName()) { | 
					
						
							|  |  |  |                          entityageable.setCustomName(itemstack.getName()); | 
					
						
							|  |  |  |                      } | 
					
						
							| 
									
										
										
										
											2019-12-11 09:00:00 +11:00
										 |  |  | @@ -119,6 +120,7 @@
 | 
					
						
							| 
									
										
										
										
											2014-11-26 08:32:16 +11:00
										 |  |  |          super.b(nbttagcompound); | 
					
						
							|  |  |  |          nbttagcompound.setInt("Age", this.getAge()); | 
					
						
							| 
									
										
										
										
											2019-04-23 12:00:00 +10:00
										 |  |  |          nbttagcompound.setInt("ForcedAge", this.c); | 
					
						
							| 
									
										
										
										
											2014-11-26 08:32:16 +11:00
										 |  |  | +        nbttagcompound.setBoolean("AgeLocked", this.ageLocked); // CraftBukkit
 | 
					
						
							|  |  |  |      } | 
					
						
							|  |  |  |   | 
					
						
							| 
									
										
										
										
											2019-04-23 12:00:00 +10:00
										 |  |  |      @Override | 
					
						
							| 
									
										
										
										
											2019-12-11 09:00:00 +11:00
										 |  |  | @@ -126,6 +128,7 @@
 | 
					
						
							| 
									
										
										
										
											2014-11-26 08:32:16 +11:00
										 |  |  |          super.a(nbttagcompound); | 
					
						
							|  |  |  |          this.setAgeRaw(nbttagcompound.getInt("Age")); | 
					
						
							| 
									
										
										
										
											2019-04-23 12:00:00 +10:00
										 |  |  |          this.c = nbttagcompound.getInt("ForcedAge"); | 
					
						
							| 
									
										
										
										
											2014-11-26 08:32:16 +11:00
										 |  |  | +        this.ageLocked = nbttagcompound.getBoolean("AgeLocked"); // CraftBukkit
 | 
					
						
							|  |  |  |      } | 
					
						
							|  |  |  |   | 
					
						
							| 
									
										
										
										
											2019-04-23 12:00:00 +10:00
										 |  |  |      @Override | 
					
						
							| 
									
										
										
										
											2019-12-11 09:00:00 +11:00
										 |  |  | @@ -140,7 +143,7 @@
 | 
					
						
							| 
									
										
										
										
											2019-04-23 12:00:00 +10:00
										 |  |  |      @Override | 
					
						
							| 
									
										
										
										
											2018-12-13 11:00:00 +11:00
										 |  |  |      public void movementTick() { | 
					
						
							|  |  |  |          super.movementTick(); | 
					
						
							| 
									
										
										
										
											2015-02-26 22:41:06 +00:00
										 |  |  | -        if (this.world.isClientSide) {
 | 
					
						
							|  |  |  | +        if (this.world.isClientSide || ageLocked) { // CraftBukkit
 | 
					
						
							| 
									
										
										
										
											2019-04-23 12:00:00 +10:00
										 |  |  |              if (this.d > 0) { | 
					
						
							|  |  |  |                  if (this.d % 4 == 0) { | 
					
						
							| 
									
										
										
										
											2019-12-11 09:00:00 +11:00
										 |  |  |                      this.world.addParticle(Particles.HAPPY_VILLAGER, this.d(1.0D), this.cv() + 0.5D, this.g(1.0D), 0.0D, 0.0D, 0.0D); |