mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 00:47:42 +01:00
Updated Upstream (Paper)
Upstream has released updates that appears to apply and compile correctly Paper Changes: 4e0ed1f8 Backport fix for MC-167561 (Fixes #2886, closes#2960) 9946cef8 Updated Upstream (Bukkit/CraftBukkit/Spigot)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From c455f67309bc18d64dc759e33a47058c42c99c73 Mon Sep 17 00:00:00 2001
|
||||
From 4cb137fb77aa92707b9134e63834d9468cbb540d Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Thu, 6 Feb 2020 19:53:59 -0600
|
||||
Subject: [PATCH] Ridables
|
||||
@@ -77,7 +77,7 @@ Subject: [PATCH] Ridables
|
||||
.../minecraft/server/EntityVindicator.java | 19 +
|
||||
.../net/minecraft/server/EntityWitch.java | 23 +-
|
||||
.../net/minecraft/server/EntityWither.java | 26 +-
|
||||
.../java/net/minecraft/server/EntityWolf.java | 112 ++--
|
||||
.../java/net/minecraft/server/EntityWolf.java | 121 ++--
|
||||
.../net/minecraft/server/EntityZombie.java | 19 +
|
||||
.../minecraft/server/EntityZombieHusk.java | 17 +
|
||||
.../server/EntityZombieVillager.java | 17 +
|
||||
@@ -95,7 +95,7 @@ Subject: [PATCH] Ridables
|
||||
.../controller/ControllerMoveWASDWater.java | 43 ++
|
||||
.../pathfinder/PathfinderGoalHasRider.java | 21 +
|
||||
.../craftbukkit/entity/CraftEntity.java | 27 +
|
||||
91 files changed, 3035 insertions(+), 194 deletions(-)
|
||||
91 files changed, 3035 insertions(+), 203 deletions(-)
|
||||
create mode 100644 src/main/java/net/pl3x/purpur/controller/ControllerLookWASD.java
|
||||
create mode 100644 src/main/java/net/pl3x/purpur/controller/ControllerMoveWASD.java
|
||||
create mode 100644 src/main/java/net/pl3x/purpur/controller/ControllerMoveWASDFlying.java
|
||||
@@ -142,7 +142,7 @@ index a5c4cbb67f..efe6afde9b 100644
|
||||
|
||||
public ControllerMove(EntityInsentient entityinsentient) {
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index a855d743ac..c60d13b89d 100644
|
||||
index 8974c16bf9..6acc65abfa 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -78,7 +78,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -172,7 +172,7 @@ index a855d743ac..c60d13b89d 100644
|
||||
public boolean noclip;
|
||||
public float J;
|
||||
protected final Random random;
|
||||
@@ -2115,7 +2115,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -2112,7 +2112,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
} else {
|
||||
this.passengers.add(entity);
|
||||
}
|
||||
@@ -187,7 +187,7 @@ index a855d743ac..c60d13b89d 100644
|
||||
}
|
||||
return true; // CraftBukkit
|
||||
}
|
||||
@@ -2150,6 +2156,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -2147,6 +2153,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
return false;
|
||||
}
|
||||
// Spigot end
|
||||
@@ -200,7 +200,7 @@ index a855d743ac..c60d13b89d 100644
|
||||
this.passengers.remove(entity);
|
||||
entity.j = 60;
|
||||
}
|
||||
@@ -2536,6 +2548,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -2533,6 +2545,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
|
||||
public void setHeadRotation(float f) {}
|
||||
|
||||
@@ -208,7 +208,7 @@ index a855d743ac..c60d13b89d 100644
|
||||
public void l(float f) {}
|
||||
|
||||
public boolean bA() {
|
||||
@@ -3381,4 +3394,43 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -3378,4 +3391,43 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
|
||||
void accept(Entity entity, double d0, double d1, double d2);
|
||||
}
|
||||
@@ -1976,7 +1976,7 @@ index 81b7cd06f2..3e6722cfce 100644
|
||||
this.targetSelector.a(2, (new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true)).a(300));
|
||||
this.targetSelector.a(3, (new PathfinderGoalNearestAttackableTarget<>(this, EntityVillagerAbstract.class, false)).a(300));
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
index 2cee73ace9..f0ef48bb15 100644
|
||||
index 1991cee43d..28218f048d 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
@@ -28,7 +28,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
@@ -1988,7 +1988,7 @@ index 2cee73ace9..f0ef48bb15 100644
|
||||
private final EntityAIBodyControl c;
|
||||
protected NavigationAbstract navigation;
|
||||
public PathfinderGoalSelector goalSelector;
|
||||
@@ -64,8 +64,8 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
@@ -66,8 +66,8 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
this.bI = -1.0F;
|
||||
this.goalSelector = new PathfinderGoalSelector(world != null && world.getMethodProfiler() != null ? world.getMethodProfiler() : null);
|
||||
this.targetSelector = new PathfinderGoalSelector(world != null && world.getMethodProfiler() != null ? world.getMethodProfiler() : null);
|
||||
@@ -1999,7 +1999,7 @@ index 2cee73ace9..f0ef48bb15 100644
|
||||
this.bq = new ControllerJump(this);
|
||||
this.c = this.o();
|
||||
this.navigation = this.b(world);
|
||||
@@ -494,7 +494,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
@@ -502,7 +502,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
return super.cW();
|
||||
}
|
||||
|
||||
@@ -2008,7 +2008,7 @@ index 2cee73ace9..f0ef48bb15 100644
|
||||
this.bb = f;
|
||||
}
|
||||
|
||||
@@ -506,8 +506,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
@@ -514,8 +514,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
this.aZ = f;
|
||||
}
|
||||
|
||||
@@ -2018,7 +2018,7 @@ index 2cee73ace9..f0ef48bb15 100644
|
||||
super.o(f);
|
||||
this.r(f);
|
||||
}
|
||||
@@ -1078,7 +1077,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
@@ -1082,7 +1081,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
}
|
||||
|
||||
protected boolean a(EntityHuman entityhuman, EnumHand enumhand) {
|
||||
@@ -2027,7 +2027,7 @@ index 2cee73ace9..f0ef48bb15 100644
|
||||
}
|
||||
|
||||
public boolean ec() {
|
||||
@@ -1377,4 +1376,39 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
@@ -1381,4 +1380,39 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
public boolean a(Item item) {
|
||||
return this.getItemInMainHand().getItem() == item || this.getItemInOffHand().getItem() == item;
|
||||
}
|
||||
@@ -4253,7 +4253,7 @@ index 8977c3516b..f654f27010 100644
|
||||
this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<>(this, EntityInsentient.class, 0, false, false, EntityWither.bG));
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityWolf.java b/src/main/java/net/minecraft/server/EntityWolf.java
|
||||
index db15d5e0a2..47f0b2df6c 100644
|
||||
index eec1e26b6e..47f0b2df6c 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityWolf.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityWolf.java
|
||||
@@ -30,10 +30,28 @@ public class EntityWolf extends EntityTameableAnimal {
|
||||
@@ -4293,7 +4293,7 @@ index db15d5e0a2..47f0b2df6c 100644
|
||||
this.targetSelector.a(1, new PathfinderGoalOwnerHurtByTarget(this));
|
||||
this.targetSelector.a(2, new PathfinderGoalOwnerHurtTarget(this));
|
||||
this.targetSelector.a(3, (new PathfinderGoalHurtByTarget(this, new Class[0])).a(new Class[0])); // CraftBukkit - decompile error
|
||||
@@ -274,76 +293,56 @@ public class EntityWolf extends EntityTameableAnimal {
|
||||
@@ -274,85 +293,56 @@ public class EntityWolf extends EntityTameableAnimal {
|
||||
|
||||
@Override
|
||||
public boolean a(EntityHuman entityhuman, EnumHand enumhand) {
|
||||
@@ -4325,7 +4325,14 @@ index db15d5e0a2..47f0b2df6c 100644
|
||||
- boolean flag = super.a(entityhuman, enumhand);
|
||||
-
|
||||
- if (!flag || this.isBaby()) {
|
||||
- this.goalSit.setSitting(!this.isSitting());
|
||||
- //this.goalSit.setSitting(!this.isSitting()); // Paper start - copied from below
|
||||
- if (this.i((EntityLiving) entityhuman) && !this.i(itemstack)) {
|
||||
- this.goalSit.setSitting(!this.isSitting());
|
||||
- this.jumping = false;
|
||||
- this.navigation.o();
|
||||
- this.setGoalTarget((EntityLiving) null, TargetReason.FORGOT_TARGET, true); // CraftBukkit - reason
|
||||
- }
|
||||
- // Paper end - copied from below
|
||||
- }
|
||||
-
|
||||
- return flag;
|
||||
@@ -4346,12 +4353,14 @@ index db15d5e0a2..47f0b2df6c 100644
|
||||
return true;
|
||||
}
|
||||
-
|
||||
- /* Paper start - Move into above
|
||||
- if (this.i((EntityLiving) entityhuman) && !this.i(itemstack)) {
|
||||
- this.goalSit.setSitting(!this.isSitting());
|
||||
- this.jumping = false;
|
||||
- this.navigation.o();
|
||||
- this.setGoalTarget((EntityLiving) null, TargetReason.FORGOT_TARGET, true); // CraftBukkit - reason
|
||||
- }
|
||||
- */ // Paper end
|
||||
- } else if (item == Items.BONE && !this.isAngry()) {
|
||||
- if (!entityhuman.abilities.canInstantlyBuild) {
|
||||
- itemstack.subtract(1);
|
||||
@@ -4403,7 +4412,7 @@ index db15d5e0a2..47f0b2df6c 100644
|
||||
Item item = itemstack.getItem();
|
||||
|
||||
return item.isFood() && item.getFoodInfo().c();
|
||||
@@ -433,6 +432,13 @@ public class EntityWolf extends EntityTameableAnimal {
|
||||
@@ -442,6 +432,13 @@ public class EntityWolf extends EntityTameableAnimal {
|
||||
return !this.isAngry() && super.a(entityhuman);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user