Update to Minecraft 1.15

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2019-12-11 09:00:00 +11:00
parent 1400103b2f
commit 0e142c7f03
293 changed files with 2875 additions and 2648 deletions

View File

@@ -1,17 +1,17 @@
--- a/net/minecraft/server/EntityFox.java
+++ b/net/minecraft/server/EntityFox.java
@@ -267,8 +267,8 @@
private List<UUID> ek() {
@@ -263,8 +263,8 @@
private List<UUID> eE() {
List<UUID> list = Lists.newArrayList();
- list.add(((Optional) this.datawatcher.get(EntityFox.bB)).orElse((Object) null));
- list.add(((Optional) this.datawatcher.get(EntityFox.bC)).orElse((Object) null));
+ list.add(((Optional<UUID>) this.datawatcher.get(EntityFox.bB)).orElse(null)); // CraftBukkit - decompile error
+ list.add(((Optional<UUID>) this.datawatcher.get(EntityFox.bC)).orElse(null)); // CraftBukkit - decompile error
- list.add(((Optional) this.datawatcher.get(EntityFox.by)).orElse((Object) null));
- list.add(((Optional) this.datawatcher.get(EntityFox.bz)).orElse((Object) null));
+ list.add(((Optional<UUID>) this.datawatcher.get(EntityFox.by)).orElse(null)); // CraftBukkit - decompile error
+ list.add(((Optional<UUID>) this.datawatcher.get(EntityFox.bz)).orElse(null)); // CraftBukkit - decompile error
return list;
}
@@ -401,7 +401,7 @@
@@ -397,7 +397,7 @@
protected void a(EntityItem entityitem) {
ItemStack itemstack = entityitem.getItemStack();
@@ -20,7 +20,7 @@
int i = itemstack.getCount();
if (i > 1) {
@@ -944,6 +944,11 @@
@@ -918,6 +918,11 @@
int i = (Integer) iblockdata.get(BlockSweetBerryBush.a);
iblockdata.set(BlockSweetBerryBush.a, 1);
@@ -32,7 +32,7 @@
int j = 1 + EntityFox.this.world.random.nextInt(2) + (i == 3 ? 1 : 0);
ItemStack itemstack = EntityFox.this.getEquipment(EnumItemSlot.MAINHAND);
@@ -983,7 +988,7 @@
@@ -957,7 +962,7 @@
private int f;
public r() {
@@ -41,7 +41,7 @@
this.a(EnumSet.of(PathfinderGoal.Type.MOVE, PathfinderGoal.Type.LOOK));
}
@@ -1035,7 +1040,7 @@
@@ -1009,7 +1014,7 @@
private int c;
public t() {
@@ -50,7 +50,7 @@
this.c = EntityFox.this.random.nextInt(140);
this.a(EnumSet.of(PathfinderGoal.Type.MOVE, PathfinderGoal.Type.LOOK, PathfinderGoal.Type.JUMP));
}
@@ -1146,7 +1151,7 @@
@@ -1120,7 +1125,7 @@
private EntityLiving k;
private int l;
@@ -59,7 +59,7 @@
super(EntityFox.this, oclass, 10, flag, flag1, predicate);
}
@@ -1181,7 +1186,7 @@
@@ -1155,7 +1160,7 @@
@Override
public void c() {
@@ -67,8 +67,8 @@
+ EntityFox.this.setGoalTarget(this.j, org.bukkit.event.entity.EntityTargetEvent.TargetReason.TARGET_ATTACKED_OWNER, true); // CraftBukkit
this.c = this.j;
if (this.k != null) {
this.l = this.k.ct();
@@ -1225,6 +1230,14 @@
this.l = this.k.cI();
@@ -1199,6 +1204,14 @@
if (entityplayer1 != null && entityplayer != entityplayer1) {
entityfox.b(entityplayer1.getUniqueID());
}
@@ -83,18 +83,18 @@
if (entityplayer2 != null) {
entityplayer2.a(StatisticList.ANIMALS_BRED);
@@ -1239,10 +1252,14 @@
@@ -1213,10 +1226,14 @@
this.partner.resetLove();
entityfox.setAgeRaw(-24000);
entityfox.setPositionRotation(this.animal.locX, this.animal.locY, this.animal.locZ, 0.0F, 0.0F);
entityfox.setPositionRotation(this.animal.locX(), this.animal.locY(), this.animal.locZ(), 0.0F, 0.0F);
- this.b.addEntity(entityfox);
+ this.b.addEntity(entityfox, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.BREEDING); // CraftBukkit - added SpawnReason
this.b.broadcastEntityEffect(this.animal, (byte) 18);
if (this.b.getGameRules().getBoolean(GameRules.DO_MOB_LOOT)) {
- this.b.addEntity(new EntityExperienceOrb(this.b, this.animal.locX, this.animal.locY, this.animal.locZ, this.animal.getRandom().nextInt(7) + 1));
- this.b.addEntity(new EntityExperienceOrb(this.b, this.animal.locX(), this.animal.locY(), this.animal.locZ(), this.animal.getRandom().nextInt(7) + 1));
+ // CraftBukkit start - use event experience
+ if (experience > 0) {
+ this.b.addEntity(new EntityExperienceOrb(this.b, this.animal.locX, this.animal.locY, this.animal.locZ, experience));
+ this.b.addEntity(new EntityExperienceOrb(this.b, this.animal.locX(), this.animal.locY(), this.animal.locZ(), experience));
+ }
+ // CraftBukkit end
}