Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-15 19:10:09 +01:00
More compile error fixes
Dieser Commit ist enthalten in:
Ursprung
87759ffbb4
Commit
cb24079b77
@ -1,4 +1,4 @@
|
|||||||
From 476438fe56b63e02b76f3c52fa84aae5c3489f2f Mon Sep 17 00:00:00 2001
|
From 9fc1ff726d9990ee6e85e86545100faa7103b892 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Mon, 28 Mar 2016 20:55:47 -0400
|
Date: Mon, 28 Mar 2016 20:55:47 -0400
|
||||||
Subject: [PATCH] MC Utils
|
Subject: [PATCH] MC Utils
|
||||||
@ -213,7 +213,7 @@ index 6ab4c78b35..76142d5dc2 100644
|
|||||||
super(entitytypes, world);
|
super(entitytypes, world);
|
||||||
this.f = 5;
|
this.f = 5;
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
|
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
|
||||||
index 01d9ed69c5..65ad9243f8 100644
|
index 01d9ed69c5..3217a8ed18 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityTypes.java
|
--- a/src/main/java/net/minecraft/server/EntityTypes.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
|
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
|
||||||
@@ -5,6 +5,7 @@ import com.mojang.datafixers.types.Type;
|
@@ -5,6 +5,7 @@ import com.mojang.datafixers.types.Type;
|
||||||
@ -224,6 +224,17 @@ index 01d9ed69c5..65ad9243f8 100644
|
|||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
@@ -287,8 +288,8 @@ public class EntityTypes<T extends Entity> {
|
||||||
|
return this.bi.height;
|
||||||
|
}
|
||||||
|
|
||||||
|
- @Nullable
|
||||||
|
- public T a(World world) {
|
||||||
|
+ public T create(World world) { return this.a(world); } // Paper - OBFHELPER
|
||||||
|
+ @Nullable public T a(World world) { // Paper - OBFHELPER
|
||||||
|
return this.aZ.create(this, world);
|
||||||
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
|
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
|
||||||
index e975265a28..aa6a58dd88 100644
|
index e975265a28..aa6a58dd88 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ItemStack.java
|
--- a/src/main/java/net/minecraft/server/ItemStack.java
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 4fe17ed34ff3c43917ab28bcfea9060d23bf3271 Mon Sep 17 00:00:00 2001
|
From 4f0c049efe8ce67de93b3004a3ad46b7013acf47 Mon Sep 17 00:00:00 2001
|
||||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||||
Date: Tue, 1 Mar 2016 13:24:16 -0600
|
Date: Tue, 1 Mar 2016 13:24:16 -0600
|
||||||
Subject: [PATCH] Allow nerfed mobs to jump
|
Subject: [PATCH] Allow nerfed mobs to jump
|
||||||
@ -56,10 +56,10 @@ index afa03ce6f2..d49047abc1 100644
|
|||||||
}
|
}
|
||||||
// Spigot End
|
// Spigot End
|
||||||
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
|
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
|
||||||
index 040a64471f..2dfa5a7b40 100644
|
index 040a64471f..a10532b0f8 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
|
--- a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
|
+++ b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
|
||||||
@@ -8,6 +8,7 @@ public class PathfinderGoalFloat extends PathfinderGoal {
|
@@ -8,10 +8,12 @@ public class PathfinderGoalFloat extends PathfinderGoal {
|
||||||
|
|
||||||
public PathfinderGoalFloat(EntityInsentient entityinsentient) {
|
public PathfinderGoalFloat(EntityInsentient entityinsentient) {
|
||||||
this.a = entityinsentient;
|
this.a = entityinsentient;
|
||||||
@ -67,7 +67,12 @@ index 040a64471f..2dfa5a7b40 100644
|
|||||||
this.a(EnumSet.of(PathfinderGoal.Type.JUMP));
|
this.a(EnumSet.of(PathfinderGoal.Type.JUMP));
|
||||||
entityinsentient.getNavigation().d(true);
|
entityinsentient.getNavigation().d(true);
|
||||||
}
|
}
|
||||||
@@ -19,6 +20,7 @@ public class PathfinderGoalFloat extends PathfinderGoal {
|
|
||||||
|
+ public final boolean validConditions() { return this.a(); } // Paper - OBFHELPER
|
||||||
|
@Override
|
||||||
|
public boolean a() {
|
||||||
|
double d0 = (double) this.a.getHeadHeight() < 0.4D ? 0.2D : 0.4D;
|
||||||
|
@@ -19,6 +21,7 @@ public class PathfinderGoalFloat extends PathfinderGoal {
|
||||||
return this.a.isInWater() && this.a.ce() > d0 || this.a.aC();
|
return this.a.isInWater() && this.a.ce() > d0 || this.a.aC();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
From a4560c5d987300561be8cf3e09f690b885d9b221 Mon Sep 17 00:00:00 2001
|
From 86ae9c4cb8b6cae07cff69f6ee2a0ff8aa5fb7d1 Mon Sep 17 00:00:00 2001
|
||||||
From: kashike <kashike@vq.lc>
|
From: kashike <kashike@vq.lc>
|
||||||
Date: Thu, 3 Mar 2016 02:18:39 -0600
|
Date: Thu, 3 Mar 2016 02:18:39 -0600
|
||||||
Subject: [PATCH] Be a bit more informative in maxHealth exception
|
Subject: [PATCH] Be a bit more informative in maxHealth exception
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
index d01e06f1b9..defcfc9337 100644
|
index d01e06f1b9..d98b98e856 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
@@ -99,7 +99,10 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
@@ -99,7 +99,10 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||||
@ -15,7 +15,7 @@ index d01e06f1b9..defcfc9337 100644
|
|||||||
- throw new IllegalArgumentException("Health must be between 0 and " + getMaxHealth() + "(" + health + ")");
|
- throw new IllegalArgumentException("Health must be between 0 and " + getMaxHealth() + "(" + health + ")");
|
||||||
+ // Paper - Be more informative
|
+ // Paper - Be more informative
|
||||||
+ throw new IllegalArgumentException("Health must be between 0 and " + getMaxHealth() + ", but was " + health
|
+ throw new IllegalArgumentException("Health must be between 0 and " + getMaxHealth() + ", but was " + health
|
||||||
+ + ". (attribute base value: " + this.getHandle().getAttributeInstance(GenericAttributes.maxHealth).b()
|
+ + ". (attribute base value: " + this.getHandle().getAttributeInstance(GenericAttributes.MAX_HEALTH).b()
|
||||||
+ + (this instanceof CraftPlayer ? ", player: " + this.getName() + ')' : ')'));
|
+ + (this instanceof CraftPlayer ? ", player: " + this.getName() + ')' : ')'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
From d9d785e3118eb7f30611eca9330f0c5aab6ae80e Mon Sep 17 00:00:00 2001
|
From b797b2e75914664e9f3ec6516cea6ba9deaec506 Mon Sep 17 00:00:00 2001
|
||||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||||
Date: Sun, 22 May 2016 20:20:55 -0500
|
Date: Sun, 22 May 2016 20:20:55 -0500
|
||||||
Subject: [PATCH] Optional TNT doesn't move in water
|
Subject: [PATCH] Optional TNT doesn't move in water
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
index 805aa5699..92ab55182 100644
|
index 805aa56999..92ab55182f 100644
|
||||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
@@ -2,7 +2,6 @@ package com.destroystokyo.paper;
|
@@ -2,7 +2,6 @@ package com.destroystokyo.paper;
|
||||||
@ -32,9 +32,18 @@ index 805aa5699..92ab55182 100644
|
|||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||||
index 3dcd93e5e..b68e2fc04 100644
|
index 3dcd93e5e9..989fb44a0d 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||||
|
@@ -104,7 +104,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||||
|
public double locX;
|
||||||
|
public double locY;
|
||||||
|
public double locZ;
|
||||||
|
- private Vec3D mot;
|
||||||
|
+ protected Vec3D mot; // Paper - private -> protected
|
||||||
|
public float yaw;
|
||||||
|
public float pitch;
|
||||||
|
public float lastYaw;
|
||||||
@@ -1094,6 +1094,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
@@ -1094,6 +1094,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -62,10 +71,10 @@ index 3dcd93e5e..b68e2fc04 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
|
diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
|
||||||
index e0535604b..91e332c3a 100644
|
index e0535604b6..479b62d665 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
|
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
|
+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
|
||||||
@@ -149,4 +149,49 @@ public class EntityTNTPrimed extends Entity {
|
@@ -149,4 +149,50 @@ public class EntityTNTPrimed extends Entity {
|
||||||
public Packet<?> N() {
|
public Packet<?> N() {
|
||||||
return new PacketPlayOutSpawnEntity(this);
|
return new PacketPlayOutSpawnEntity(this);
|
||||||
}
|
}
|
||||||
@ -84,20 +93,21 @@ index e0535604b..91e332c3a 100644
|
|||||||
+ if (!world.paperConfig.preventTntFromMovingInWater) return super.doWaterMovement();
|
+ if (!world.paperConfig.preventTntFromMovingInWater) return super.doWaterMovement();
|
||||||
+
|
+
|
||||||
+ // Preserve velocity while calling the super method
|
+ // Preserve velocity while calling the super method
|
||||||
+ double oldMotX = this.motX;
|
+ // TODO test this patch...
|
||||||
+ double oldMotY = this.motY;
|
+// double oldMotX = this.motX;
|
||||||
+ double oldMotZ = this.motZ;
|
+// double oldMotY = this.motY;
|
||||||
+
|
+// double oldMotZ = this.motZ;
|
||||||
+ super.doWaterMovement();
|
+//
|
||||||
+
|
+// super.doWaterMovement();
|
||||||
+ this.motX = oldMotX;
|
+//
|
||||||
+ this.motY = oldMotY;
|
+// this.motX = oldMotX;
|
||||||
+ this.motZ = oldMotZ;
|
+// this.motY = oldMotY;
|
||||||
|
+// this.motZ = oldMotZ;
|
||||||
+
|
+
|
||||||
+ if (this.inWater) {
|
+ if (this.inWater) {
|
||||||
+ // Send position and velocity updates to nearby players on every tick while the TNT is in water.
|
+ // Send position and velocity updates to nearby players on every tick while the TNT is in water.
|
||||||
+ // This does pretty well at keeping their clients in sync with the server.
|
+ // This does pretty well at keeping their clients in sync with the server.
|
||||||
+ EntityTrackerEntry ete = ((WorldServer) this.getWorld()).getTracker().trackedEntities.get(this.getId());
|
+ EntityTrackerEntry ete = this.tracker; // TODO review this (this field isn't written to)
|
||||||
+ if (ete != null) {
|
+ if (ete != null) {
|
||||||
+ PacketPlayOutEntityVelocity velocityPacket = new PacketPlayOutEntityVelocity(this);
|
+ PacketPlayOutEntityVelocity velocityPacket = new PacketPlayOutEntityVelocity(this);
|
||||||
+ PacketPlayOutEntityTeleport positionPacket = new PacketPlayOutEntityTeleport(this);
|
+ PacketPlayOutEntityTeleport positionPacket = new PacketPlayOutEntityTeleport(this);
|
||||||
@ -115,6 +125,19 @@ index e0535604b..91e332c3a 100644
|
|||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
}
|
}
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
||||||
|
index aaf3a54b08..afd8748da8 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
||||||
|
@@ -36,7 +36,7 @@ public class EntityTrackerEntry {
|
||||||
|
private boolean q;
|
||||||
|
private boolean r;
|
||||||
|
// CraftBukkit start
|
||||||
|
- private final Set<EntityPlayer> trackedPlayers;
|
||||||
|
+ final Set<EntityPlayer> trackedPlayers; // Paper - private -> package
|
||||||
|
// Paper start
|
||||||
|
private java.util.Map<EntityPlayer, Boolean> trackedPlayerMap = null;
|
||||||
|
|
||||||
--
|
--
|
||||||
2.21.0
|
2.21.0
|
||||||
|
|
||||||
|
@ -1,22 +1,23 @@
|
|||||||
From 5b9cdf4cc017b2fd5336a16d5463a014d8a1d02a Mon Sep 17 00:00:00 2001
|
From ce65ea14cded06d3150ff4e7fa6a1b46ba0d92a8 Mon Sep 17 00:00:00 2001
|
||||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||||
Date: Sun, 31 Jul 2016 16:33:03 -0500
|
Date: Sun, 31 Jul 2016 16:33:03 -0500
|
||||||
Subject: [PATCH] Re-track players that dismount from other players
|
Subject: [PATCH] Re-track players that dismount from other players
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
index 6b6c14567..c1ba294ec 100644
|
index 6b6c145675..b075e80f79 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
@@ -959,6 +959,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
@@ -959,6 +959,14 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||||
if (entity1 != entity && this.playerConnection != null) {
|
if (entity1 != entity && this.playerConnection != null) {
|
||||||
this.playerConnection.a(this.locX, this.locY, this.locZ, this.yaw, this.pitch);
|
this.playerConnection.a(this.locX, this.locY, this.locZ, this.yaw, this.pitch);
|
||||||
}
|
}
|
||||||
+ // Paper start - "Fixes" an issue in which the vehicle player would not be notified that the passenger dismounted
|
+ // Paper start - "Fixes" an issue in which the vehicle player would not be notified that the passenger dismounted
|
||||||
+ if (entity instanceof EntityPlayer) {
|
+ if (entity instanceof EntityPlayer) {
|
||||||
|
+ // TODO verify this solution
|
||||||
+ WorldServer worldServer = (WorldServer) entity.getWorld();
|
+ WorldServer worldServer = (WorldServer) entity.getWorld();
|
||||||
+ worldServer.tracker.untrackEntity(this);
|
+ worldServer.getChunkProvider().playerChunkMap.removeEntity(this);
|
||||||
+ worldServer.tracker.track(this);
|
+ worldServer.getChunkProvider().playerChunkMap.addEntity(this);
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
From d0badaff2fdf04edf104e78702414937df7af010 Mon Sep 17 00:00:00 2001
|
From a5a3b9ff7494452e2713dae4f6c2a3f8cdefa9f1 Mon Sep 17 00:00:00 2001
|
||||||
From: Alfie Cleveland <alfeh@me.com>
|
From: Alfie Cleveland <alfeh@me.com>
|
||||||
Date: Fri, 25 Nov 2016 13:22:40 +0000
|
Date: Fri, 25 Nov 2016 13:22:40 +0000
|
||||||
Subject: [PATCH] Optimise removeQueue
|
Subject: [PATCH] Optimise removeQueue
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
index 5610c539a..ecdfd306b 100644
|
index 97b5dc7f24..df850f7b9c 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
@@ -4,7 +4,9 @@ import com.google.common.collect.Lists;
|
@@ -4,7 +4,9 @@ import com.google.common.collect.Lists;
|
||||||
@ -50,7 +50,7 @@ index 5610c539a..ecdfd306b 100644
|
|||||||
|
|
||||||
this.playerConnection.sendPacket(new PacketPlayOutEntityDestroy(aint));
|
this.playerConnection.sendPacket(new PacketPlayOutEntityDestroy(aint));
|
||||||
}
|
}
|
||||||
@@ -1298,7 +1307,14 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
@@ -1299,7 +1308,14 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||||
this.lastHealthSent = -1.0F;
|
this.lastHealthSent = -1.0F;
|
||||||
this.lastFoodSent = -1;
|
this.lastFoodSent = -1;
|
||||||
// this.recipeBook.a((RecipeBook) entityplayer.recipeBook); // CraftBukkit
|
// this.recipeBook.a((RecipeBook) entityplayer.recipeBook); // CraftBukkit
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 7e001c26638d91d2ec6eb0e510684b4284e0181f Mon Sep 17 00:00:00 2001
|
From 15cccacab669f6cbdce15c88cc02878b33c2f32b Mon Sep 17 00:00:00 2001
|
||||||
From: Alfie Cleveland <alfeh@me.com>
|
From: Alfie Cleveland <alfeh@me.com>
|
||||||
Date: Tue, 27 Dec 2016 01:57:57 +0000
|
Date: Tue, 27 Dec 2016 01:57:57 +0000
|
||||||
Subject: [PATCH] Properly fix item duplication bug
|
Subject: [PATCH] Properly fix item duplication bug
|
||||||
@ -6,10 +6,10 @@ Subject: [PATCH] Properly fix item duplication bug
|
|||||||
Credit to prplz for figuring out the real issue
|
Credit to prplz for figuring out the real issue
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
index ecdfd306b..27ade8d7d 100644
|
index df850f7b9c..f44199b180 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
@@ -1769,7 +1769,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
@@ -1770,7 +1770,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean isFrozen() {
|
protected boolean isFrozen() {
|
||||||
@ -19,7 +19,7 @@ index ecdfd306b..27ade8d7d 100644
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
index 982b15dec..6874563e4 100644
|
index 982b15dec0..6874563e43 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
@@ -2541,7 +2541,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
@@ -2541,7 +2541,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 773bc84cbbf0f96237d6f806536c5532b340efe1 Mon Sep 17 00:00:00 2001
|
From 1950b2903db0bb07952b8bf76d16166951ac1442 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Wed, 20 Dec 2017 17:36:49 -0500
|
Date: Wed, 20 Dec 2017 17:36:49 -0500
|
||||||
Subject: [PATCH] Ability to apply mending to XP API
|
Subject: [PATCH] Ability to apply mending to XP API
|
||||||
@ -10,7 +10,7 @@ of giving the player experience points.
|
|||||||
Both an API To standalone mend, and apply mending logic to .giveExp has been added.
|
Both an API To standalone mend, and apply mending logic to .giveExp has been added.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EnchantmentManager.java b/src/main/java/net/minecraft/server/EnchantmentManager.java
|
diff --git a/src/main/java/net/minecraft/server/EnchantmentManager.java b/src/main/java/net/minecraft/server/EnchantmentManager.java
|
||||||
index 6f64b8db3..b6a40e22a 100644
|
index 6f64b8db3a..b6a40e22a8 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EnchantmentManager.java
|
--- a/src/main/java/net/minecraft/server/EnchantmentManager.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EnchantmentManager.java
|
+++ b/src/main/java/net/minecraft/server/EnchantmentManager.java
|
||||||
@@ -241,6 +241,11 @@ public class EnchantmentManager {
|
@@ -241,6 +241,11 @@ public class EnchantmentManager {
|
||||||
@ -26,7 +26,7 @@ index 6f64b8db3..b6a40e22a 100644
|
|||||||
public static Entry<EnumItemSlot, ItemStack> b(Enchantment enchantment, EntityLiving entityliving) {
|
public static Entry<EnumItemSlot, ItemStack> b(Enchantment enchantment, EntityLiving entityliving) {
|
||||||
Map<EnumItemSlot, ItemStack> map = enchantment.a(entityliving);
|
Map<EnumItemSlot, ItemStack> map = enchantment.a(entityliving);
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityExperienceOrb.java b/src/main/java/net/minecraft/server/EntityExperienceOrb.java
|
diff --git a/src/main/java/net/minecraft/server/EntityExperienceOrb.java b/src/main/java/net/minecraft/server/EntityExperienceOrb.java
|
||||||
index 704a48c8e..64d71a9a2 100644
|
index 704a48c8ea..64d71a9a2a 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityExperienceOrb.java
|
--- a/src/main/java/net/minecraft/server/EntityExperienceOrb.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityExperienceOrb.java
|
+++ b/src/main/java/net/minecraft/server/EntityExperienceOrb.java
|
||||||
@@ -251,10 +251,12 @@ public class EntityExperienceOrb extends Entity {
|
@@ -251,10 +251,12 @@ public class EntityExperienceOrb extends Entity {
|
||||||
@ -43,7 +43,7 @@ index 704a48c8e..64d71a9a2 100644
|
|||||||
return i * 2;
|
return i * 2;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
index bb50ae1ac..bea3ddf31 100644
|
index bb50ae1acd..a175dd383c 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
@@ -1052,8 +1052,39 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -1052,8 +1052,39 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
@ -59,7 +59,7 @@ index bb50ae1ac..bea3ddf31 100644
|
|||||||
+ net.minecraft.server.ItemStack itemstack = net.minecraft.server.EnchantmentManager.getRandomEquippedItemWithEnchant(net.minecraft.server.Enchantments.MENDING, handle);
|
+ net.minecraft.server.ItemStack itemstack = net.minecraft.server.EnchantmentManager.getRandomEquippedItemWithEnchant(net.minecraft.server.Enchantments.MENDING, handle);
|
||||||
+ if (!itemstack.isEmpty() && itemstack.getItem().usesDurability()) {
|
+ if (!itemstack.isEmpty() && itemstack.getItem().usesDurability()) {
|
||||||
+
|
+
|
||||||
+ net.minecraft.server.EntityExperienceOrb orb = new net.minecraft.server.EntityExperienceOrb(handle.world);
|
+ net.minecraft.server.EntityExperienceOrb orb = net.minecraft.server.EntityTypes.EXPERIENCE_ORB.create(handle.world);
|
||||||
+ orb.value = amount;
|
+ orb.value = amount;
|
||||||
+ orb.spawnReason = org.bukkit.entity.ExperienceOrb.SpawnReason.CUSTOM;
|
+ orb.spawnReason = org.bukkit.entity.ExperienceOrb.SpawnReason.CUSTOM;
|
||||||
+ orb.locX = handle.locX;
|
+ orb.locX = handle.locX;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 81e3c774d217a1ae6db10ce67433a11e855a3629 Mon Sep 17 00:00:00 2001
|
From 1d8c0897f3166b70c188632df0f63d57a3b6260d Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Tue, 15 Aug 2017 22:29:12 -0400
|
Date: Tue, 15 Aug 2017 22:29:12 -0400
|
||||||
Subject: [PATCH] Expand World.spawnParticle API and add Builder
|
Subject: [PATCH] Expand World.spawnParticle API and add Builder
|
||||||
@ -10,9 +10,18 @@ Adds an option to control the force mode of the particle.
|
|||||||
This adds a new Builder API which is much friendlier to use.
|
This adds a new Builder API which is much friendlier to use.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
index 2e78e4af95..35190f6be8 100644
|
index 2e78e4af95..3c6c6d227f 100644
|
||||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
|
@@ -55,7 +55,7 @@ public class WorldServer extends World {
|
||||||
|
public final Int2ObjectMap<Entity> entitiesById = new Int2ObjectLinkedOpenHashMap();
|
||||||
|
private final Map<UUID, Entity> entitiesByUUID = Maps.newHashMap();
|
||||||
|
private final Queue<Entity> entitiesToAdd = Queues.newArrayDeque();
|
||||||
|
- private final List<EntityPlayer> players = Lists.newArrayList();
|
||||||
|
+ public final List<EntityPlayer> players = Lists.newArrayList(); // Paper - private -> public
|
||||||
|
boolean tickingEntities;
|
||||||
|
private final MinecraftServer server;
|
||||||
|
private final WorldNBTStorage dataManager;
|
||||||
@@ -1339,12 +1339,17 @@ public class WorldServer extends World {
|
@@ -1339,12 +1339,17 @@ public class WorldServer extends World {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -20,7 +29,7 @@ index 2e78e4af95..35190f6be8 100644
|
|||||||
+ // Paper start - Particle API Expansion
|
+ // Paper start - Particle API Expansion
|
||||||
+ return sendParticles(players, sender, t0, d0, d1, d2, i, d3, d4, d5, d6, force);
|
+ return sendParticles(players, sender, t0, d0, d1, d2, i, d3, d4, d5, d6, force);
|
||||||
+ }
|
+ }
|
||||||
+ public <T extends ParticleParam> int sendParticles(List<EntityHuman> receivers, EntityPlayer sender, T t0, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6, boolean force) {
|
+ public <T extends ParticleParam> int sendParticles(List<EntityPlayer> receivers, EntityPlayer sender, T t0, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6, boolean force) {
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
PacketPlayOutWorldParticles packetplayoutworldparticles = new PacketPlayOutWorldParticles(t0, force, (float) d0, (float) d1, (float) d2, (float) d3, (float) d4, (float) d5, (float) d6, i);
|
PacketPlayOutWorldParticles packetplayoutworldparticles = new PacketPlayOutWorldParticles(t0, force, (float) d0, (float) d1, (float) d2, (float) d3, (float) d4, (float) d5, (float) d6, i);
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From bee370a5eb7dc4c813473fa4262b6ff0df258974 Mon Sep 17 00:00:00 2001
|
From 243a423c00b85f5654047ffb67abd3a65802b85e Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Tue, 3 Jul 2018 21:56:23 -0400
|
Date: Tue, 3 Jul 2018 21:56:23 -0400
|
||||||
Subject: [PATCH] InventoryCloseEvent Reason API
|
Subject: [PATCH] InventoryCloseEvent Reason API
|
||||||
@ -7,7 +7,7 @@ Allows you to determine why an inventory was closed, enabling plugin developers
|
|||||||
to "confirm" things based on if it was player triggered close or not.
|
to "confirm" things based on if it was player triggered close or not.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
|
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||||
index 3031d73f5..f665dc0eb 100644
|
index 3031d73f5f..f665dc0ebe 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||||
@@ -149,7 +149,7 @@ public abstract class EntityHuman extends EntityLiving {
|
@@ -149,7 +149,7 @@ public abstract class EntityHuman extends EntityLiving {
|
||||||
@ -34,7 +34,7 @@ index 3031d73f5..f665dc0eb 100644
|
|||||||
this.activeContainer = this.defaultContainer;
|
this.activeContainer = this.defaultContainer;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
index 27ade8d7d..634c30d93 100644
|
index f44199b180..ae17e16af1 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
@@ -359,7 +359,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
@@ -359,7 +359,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||||
@ -55,7 +55,7 @@ index 27ade8d7d..634c30d93 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
String deathMessage = event.getDeathMessage();
|
String deathMessage = event.getDeathMessage();
|
||||||
@@ -1036,7 +1036,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
@@ -1037,7 +1037,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||||
return OptionalInt.empty();
|
return OptionalInt.empty();
|
||||||
} else {
|
} else {
|
||||||
if (this.activeContainer != this.defaultContainer) {
|
if (this.activeContainer != this.defaultContainer) {
|
||||||
@ -64,7 +64,7 @@ index 27ade8d7d..634c30d93 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.nextContainerCounter();
|
this.nextContainerCounter();
|
||||||
@@ -1086,7 +1086,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
@@ -1087,7 +1087,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
if (this.activeContainer != this.defaultContainer) {
|
if (this.activeContainer != this.defaultContainer) {
|
||||||
@ -73,7 +73,7 @@ index 27ade8d7d..634c30d93 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
// this.nextContainerCounter(); // CraftBukkit - moved up
|
// this.nextContainerCounter(); // CraftBukkit - moved up
|
||||||
@@ -1150,7 +1150,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
@@ -1151,7 +1151,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void closeInventory() {
|
public void closeInventory() {
|
||||||
@ -88,7 +88,7 @@ index 27ade8d7d..634c30d93 100644
|
|||||||
this.m();
|
this.m();
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
index c9caf4423..fbdc755e8 100644
|
index c9caf44231..fbdc755e80 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
@@ -2050,7 +2050,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
@@ -2050,7 +2050,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||||
@ -101,7 +101,7 @@ index c9caf4423..fbdc755e8 100644
|
|||||||
this.player.m();
|
this.player.m();
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||||
index b855e7968..6d464a3dc 100644
|
index b855e79686..6d464a3dc2 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||||
@@ -400,7 +400,7 @@ public abstract class PlayerList {
|
@@ -400,7 +400,7 @@ public abstract class PlayerList {
|
||||||
@ -114,7 +114,7 @@ index b855e7968..6d464a3dc 100644
|
|||||||
PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(cserver.getPlayer(entityplayer), "\u00A7e" + entityplayer.getName() + " left the game");
|
PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(cserver.getPlayer(entityplayer), "\u00A7e" + entityplayer.getName() + " left the game");
|
||||||
cserver.getPluginManager().callEvent(playerQuitEvent);
|
cserver.getPluginManager().callEvent(playerQuitEvent);
|
||||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
index e400cc05d..79be8cfa3 100644
|
index 3c6c6d227f..08168805d0 100644
|
||||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
@@ -988,7 +988,7 @@ public class WorldServer extends World {
|
@@ -988,7 +988,7 @@ public class WorldServer extends World {
|
||||||
@ -136,7 +136,7 @@ index e400cc05d..79be8cfa3 100644
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||||
index 6478d6126..356c503dd 100644
|
index 6478d6126a..356c503dd7 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||||
@@ -567,8 +567,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
@@ -567,8 +567,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||||
@ -155,7 +155,7 @@ index 6478d6126..356c503dd 100644
|
|||||||
public boolean isBlocking() {
|
public boolean isBlocking() {
|
||||||
return getHandle().isBlocking();
|
return getHandle().isBlocking();
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
index 01e260024..6ceb02200 100644
|
index 04701a4cdb..1fa866c6d6 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
@@ -769,7 +769,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -769,7 +769,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
@ -168,7 +168,7 @@ index 01e260024..6ceb02200 100644
|
|||||||
|
|
||||||
// Check if the fromWorld and toWorld are the same.
|
// Check if the fromWorld and toWorld are the same.
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
index 4a16f2f53..de081ca1c 100644
|
index 4a16f2f532..de081ca1c5 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
@@ -1225,8 +1225,19 @@ public class CraftEventFactory {
|
@@ -1225,8 +1225,19 @@ public class CraftEventFactory {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 943fa216876f05eb896525e1fe18a46f63ae33ad Mon Sep 17 00:00:00 2001
|
From ce85228f0e2bb0ef8542fe11b64fa5161ab34d1c Mon Sep 17 00:00:00 2001
|
||||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||||
Date: Mon, 3 Sep 2018 18:20:03 -0500
|
Date: Mon, 3 Sep 2018 18:20:03 -0500
|
||||||
Subject: [PATCH] Add ray tracing methods to LivingEntity
|
Subject: [PATCH] Add ray tracing methods to LivingEntity
|
||||||
@ -33,27 +33,29 @@ index 8c3be17f7d..f86e7c9d4d 100644
|
|||||||
|
|
||||||
public int getShieldBlockingDelay() {
|
public int getShieldBlockingDelay() {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
index 29b23e30fa..8638021879 100644
|
index 412dd172fd..c91f6f5d22 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
@@ -170,6 +170,23 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
@@ -170,6 +170,25 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||||
return blocks.get(0);
|
return blocks.get(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ public Block getTargetBlock(int maxDistance, com.destroystokyo.paper.block.TargetBlockInfo.FluidMode fluidMode) {
|
+ public Block getTargetBlock(int maxDistance, com.destroystokyo.paper.block.TargetBlockInfo.FluidMode fluidMode) {
|
||||||
+ net.minecraft.server.MovingObjectPosition rayTrace = getHandle().getRayTrace(maxDistance, net.minecraft.server.MCUtil.getNMSFluidCollisionOption(fluidMode));
|
+ net.minecraft.server.MovingObjectPosition rayTrace = getHandle().getRayTrace(maxDistance, net.minecraft.server.MCUtil.getNMSFluidCollisionOption(fluidMode));
|
||||||
+ return rayTrace == null ? null : org.bukkit.craftbukkit.block.CraftBlock.at(getHandle().world, rayTrace.getBlockPosition());
|
+ return !(rayTrace instanceof net.minecraft.server.MovingObjectPositionBlock) ? null : org.bukkit.craftbukkit.block.CraftBlock.at(getHandle().world, ((net.minecraft.server.MovingObjectPositionBlock)rayTrace).getBlockPosition());
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ public org.bukkit.block.BlockFace getTargetBlockFace(int maxDistance, com.destroystokyo.paper.block.TargetBlockInfo.FluidMode fluidMode) {
|
+ public org.bukkit.block.BlockFace getTargetBlockFace(int maxDistance, com.destroystokyo.paper.block.TargetBlockInfo.FluidMode fluidMode) {
|
||||||
+ net.minecraft.server.MovingObjectPosition rayTrace = getHandle().getRayTrace(maxDistance, net.minecraft.server.MCUtil.getNMSFluidCollisionOption(fluidMode));
|
+ net.minecraft.server.MovingObjectPosition rayTrace = getHandle().getRayTrace(maxDistance, net.minecraft.server.MCUtil.getNMSFluidCollisionOption(fluidMode));
|
||||||
+ return rayTrace == null ? null : net.minecraft.server.MCUtil.toBukkitBlockFace(rayTrace.direction);
|
+ return !(rayTrace instanceof net.minecraft.server.MovingObjectPositionBlock) ? null : net.minecraft.server.MCUtil.toBukkitBlockFace(((net.minecraft.server.MovingObjectPositionBlock)rayTrace).getDirection());
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ public com.destroystokyo.paper.block.TargetBlockInfo getTargetBlockInfo(int maxDistance, com.destroystokyo.paper.block.TargetBlockInfo.FluidMode fluidMode) {
|
+ public com.destroystokyo.paper.block.TargetBlockInfo getTargetBlockInfo(int maxDistance, com.destroystokyo.paper.block.TargetBlockInfo.FluidMode fluidMode) {
|
||||||
+ net.minecraft.server.MovingObjectPosition rayTrace = getHandle().getRayTrace(maxDistance, net.minecraft.server.MCUtil.getNMSFluidCollisionOption(fluidMode));
|
+ net.minecraft.server.MovingObjectPosition rayTrace = getHandle().getRayTrace(maxDistance, net.minecraft.server.MCUtil.getNMSFluidCollisionOption(fluidMode));
|
||||||
+ return rayTrace == null ? null : new com.destroystokyo.paper.block.TargetBlockInfo(org.bukkit.craftbukkit.block.CraftBlock.at(getHandle().world, rayTrace.getBlockPosition()), net.minecraft.server.MCUtil.toBukkitBlockFace(rayTrace.direction));
|
+ return !(rayTrace instanceof net.minecraft.server.MovingObjectPositionBlock) ? null :
|
||||||
|
+ new com.destroystokyo.paper.block.TargetBlockInfo(org.bukkit.craftbukkit.block.CraftBlock.at(getHandle().world, ((net.minecraft.server.MovingObjectPositionBlock)rayTrace).getBlockPosition()),
|
||||||
|
+ net.minecraft.server.MCUtil.toBukkitBlockFace(((net.minecraft.server.MovingObjectPositionBlock)rayTrace).getDirection()));
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
+
|
+
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
From 13951c4952e0cd14e77a5e99905445ed782f8b08 Mon Sep 17 00:00:00 2001
|
From e872f0f3b89447e464a32a3c6ade495d9bb38198 Mon Sep 17 00:00:00 2001
|
||||||
From: Caleb Bassham <caleb.bassham@gmail.com>
|
From: Caleb Bassham <caleb.bassham@gmail.com>
|
||||||
Date: Fri, 28 Sep 2018 02:32:19 -0500
|
Date: Fri, 28 Sep 2018 02:32:19 -0500
|
||||||
Subject: [PATCH] Call player spectator target events
|
Subject: [PATCH] Call player spectator target events
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
index 332515128..8d18c51c9 100644
|
index be4df69e72..36084a87c8 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
@@ -59,7 +59,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
@@ -59,7 +59,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||||
@ -17,7 +17,7 @@ index 332515128..8d18c51c9 100644
|
|||||||
public boolean worldChangeInvuln;
|
public boolean worldChangeInvuln;
|
||||||
private boolean cp; private void setHasSeenCredits(boolean has) { this.cp = has; } // Paper - OBFHELPER
|
private boolean cp; private void setHasSeenCredits(boolean has) { this.cp = has; } // Paper - OBFHELPER
|
||||||
private final RecipeBookServer recipeBook;
|
private final RecipeBookServer recipeBook;
|
||||||
@@ -1547,15 +1547,35 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
@@ -1548,15 +1548,35 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||||
return (Entity) (this.spectatedEntity == null ? this : this.spectatedEntity);
|
return (Entity) (this.spectatedEntity == null ? this : this.spectatedEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
From 9537f5342de2b00331c786c63c228df41139f040 Mon Sep 17 00:00:00 2001
|
From 229310cfc9da6aa79f9555361e1c41dc60c9bcff Mon Sep 17 00:00:00 2001
|
||||||
From: GreenMeanie <GreenMeanieMC@gmail.com>
|
From: GreenMeanie <GreenMeanieMC@gmail.com>
|
||||||
Date: Sat, 20 Oct 2018 22:34:02 -0400
|
Date: Sat, 20 Oct 2018 22:34:02 -0400
|
||||||
Subject: [PATCH] Reset players airTicks on respawn
|
Subject: [PATCH] Reset players airTicks on respawn
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||||
index 57bc805cf..0871e185e 100644
|
index 2727148801..399b310b1a 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||||
@@ -2254,7 +2254,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
@@ -2254,7 +2254,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||||
@ -18,10 +18,10 @@ index 57bc805cf..0871e185e 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
index 8d18c51c9..c71e4dfbe 100644
|
index 36084a87c8..1d42a69d53 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
@@ -1835,6 +1835,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
@@ -1836,6 +1836,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setHealth(this.getMaxHealth());
|
this.setHealth(this.getMaxHealth());
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
From 6e981d061d798547c837377b0d62383d85e686d0 Mon Sep 17 00:00:00 2001
|
From 2df9d2dca8a12ecf11165198feb54e96440157e2 Mon Sep 17 00:00:00 2001
|
||||||
From: Shane Freeder <theboyetronic@gmail.com>
|
From: Shane Freeder <theboyetronic@gmail.com>
|
||||||
Date: Sun, 11 Nov 2018 21:01:09 +0000
|
Date: Sun, 11 Nov 2018 21:01:09 +0000
|
||||||
Subject: [PATCH] Don't allow digging into unloaded chunks
|
Subject: [PATCH] Don't allow digging into unloaded chunks
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
index 16a7aba49..8d2b02894 100644
|
index 16a7aba490..16f302a029 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
@@ -1246,6 +1246,11 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
@@ -1246,6 +1246,11 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||||
@ -13,7 +13,7 @@ index 16a7aba49..8d2b02894 100644
|
|||||||
case ABORT_DESTROY_BLOCK:
|
case ABORT_DESTROY_BLOCK:
|
||||||
case STOP_DESTROY_BLOCK:
|
case STOP_DESTROY_BLOCK:
|
||||||
+ // Paper start - Don't allow digging in unloaded chunks
|
+ // Paper start - Don't allow digging in unloaded chunks
|
||||||
+ if (!worldserver.isChunkLoaded(blockposition.getX() >> 4, blockposition.getZ() >> 4, true)) {
|
+ if (!worldserver.isChunkLoaded(blockposition.getX() >> 4, blockposition.getZ() >> 4)) {
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end - Don't allow digging in unloaded chunks
|
+ // Paper end - Don't allow digging in unloaded chunks
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
From 830ce03b89e87350520c8d80551d9d2a3b9b3063 Mon Sep 17 00:00:00 2001
|
From 3023afa4cb8746e5f07da44c0fa1597c8fba64af Mon Sep 17 00:00:00 2001
|
||||||
From: connorhartley <vectrixu+gh@gmail.com>
|
From: connorhartley <vectrixu+gh@gmail.com>
|
||||||
Date: Mon, 7 Jan 2019 14:43:48 -0600
|
Date: Mon, 7 Jan 2019 14:43:48 -0600
|
||||||
Subject: [PATCH] Workaround for vehicle tracking issue on disconnect
|
Subject: [PATCH] Workaround for vehicle tracking issue on disconnect
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
index 2341638617..f4ee78efc6 100644
|
index 2188b4a7ad..efc4fcb35c 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
@@ -1260,6 +1260,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
@@ -1261,6 +1261,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||||
public void n() {
|
public void n() {
|
||||||
this.ct = true;
|
this.ct = true;
|
||||||
this.ejectPassengers();
|
this.ejectPassengers();
|
||||||
|
@ -1,11 +1,28 @@
|
|||||||
From 130d65dcf32d7dbe293bad4a3da9acb4c1b3250b Mon Sep 17 00:00:00 2001
|
From f57005324591b029513cb16798ab6b0f20b967a5 Mon Sep 17 00:00:00 2001
|
||||||
From: AgentTroll <woodyc40@gmail.com>
|
From: AgentTroll <woodyc40@gmail.com>
|
||||||
Date: Fri, 22 Mar 2019 22:24:03 -0700
|
Date: Fri, 22 Mar 2019 22:24:03 -0700
|
||||||
Subject: [PATCH] Update entity Metadata for all tracked players
|
Subject: [PATCH] Update entity Metadata for all tracked players
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
||||||
|
index afd8748da8..17b6ab57c2 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
||||||
|
@@ -379,6 +379,12 @@ public class EntityTrackerEntry {
|
||||||
|
return PacketPlayOutEntity.a(this.xLoc, this.yLoc, this.zLoc);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ // Paper start - Add broadcast method
|
||||||
|
+ void broadcast(Packet<?> packet) {
|
||||||
|
+ this.getPacketConsumer().accept(packet);
|
||||||
|
+ }
|
||||||
|
+ // Paper end
|
||||||
|
+
|
||||||
|
private void broadcastIncludingSelf(Packet<?> packet) {
|
||||||
|
this.f.accept(packet);
|
||||||
|
if (this.tracker instanceof EntityPlayer) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
index 39a040a2a0..c1d1621d9e 100644
|
index c6e61c133a..6db6a4eb37 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
@@ -2021,7 +2021,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
@@ -2021,7 +2021,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren