Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-14 18:40:10 +01:00
Several fixes and new api for experience merging/stacking (#9242)
Dieser Commit ist enthalten in:
Ursprung
ed85aac53c
Commit
a31dc90741
@ -1,12 +1,15 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Tue, 19 Dec 2017 22:56:24 -0500
|
||||
Subject: [PATCH] ExperienceOrbMergeEvent
|
||||
Subject: [PATCH] ExperienceOrb merging/stacking API
|
||||
|
||||
Adds ExperienceOrbMergeEvent
|
||||
Fired when the server is about to merge 2 experience orbs
|
||||
Plugins can cancel this if they want to ensure experience orbs do not lose important
|
||||
metadata such as spawn reason, or conditionally move data from source to target.
|
||||
|
||||
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/ExperienceOrbMergeEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/ExperienceOrbMergeEvent.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..c520e5517861c4686806df233d1ef5e6bfb76ad3
|
||||
@ -104,3 +107,30 @@ index 0000000000000000000000000000000000000000..c520e5517861c4686806df233d1ef5e6
|
||||
+ return HANDLER_LIST;
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/entity/ExperienceOrb.java b/src/main/java/org/bukkit/entity/ExperienceOrb.java
|
||||
index dec70bbfaf73a9d525b2c45682b804c684e1645b..0fe4a7f300287f38dbe15862787f387aba74397b 100644
|
||||
--- a/src/main/java/org/bukkit/entity/ExperienceOrb.java
|
||||
+++ b/src/main/java/org/bukkit/entity/ExperienceOrb.java
|
||||
@@ -21,6 +21,22 @@ public interface ExperienceOrb extends Entity {
|
||||
* @param value Amount of experience
|
||||
*/
|
||||
public void setExperience(int value);
|
||||
+
|
||||
+ // Paper start - expose count
|
||||
+ /**
|
||||
+ * Get the stacked count for this experience orb.
|
||||
+ *
|
||||
+ * @return the count
|
||||
+ */
|
||||
+ int getCount();
|
||||
+
|
||||
+ /**
|
||||
+ * Sets the stacked count for this experience orb.
|
||||
+ *
|
||||
+ * @param count the new count
|
||||
+ */
|
||||
+ void setCount(int count);
|
||||
+ // Paper end
|
||||
|
||||
// Paper start
|
||||
/**
|
@ -26,7 +26,7 @@ index 1f29ed95ef3d1904a014715028d9d591fe39231f..1a829f79e6f9e03ead745e13ece4d1b5
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||
@@ -41,9 +41,63 @@ public class ExperienceOrb extends Entity {
|
||||
public int value;
|
||||
private int count;
|
||||
public int count;
|
||||
private Player followingPlayer;
|
||||
+ // Paper start
|
||||
+ @javax.annotation.Nullable
|
||||
|
113
patches/server/0361-ExperienceOrb-merging-stacking-API-and-fixes.patch
Normale Datei
113
patches/server/0361-ExperienceOrb-merging-stacking-API-and-fixes.patch
Normale Datei
@ -0,0 +1,113 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Fri, 10 Nov 2017 23:03:12 -0500
|
||||
Subject: [PATCH] ExperienceOrb merging/stacking API and fixes
|
||||
|
||||
Adds an option for maximum exp value when merging orbs
|
||||
|
||||
Adds ExperienceOrbMergeEvent
|
||||
Fired when the server is about to merge 2 experience orbs
|
||||
as entities. Plugins can cancel it if they want to ensure experience orbs do not lose important
|
||||
metadata such as spawn reason, or conditionally move data from source to target.
|
||||
|
||||
Fixes an issue where the stacked count was not taking into account
|
||||
for mending repairs and when merging with spigot's merge-on-spawn
|
||||
logic
|
||||
|
||||
== AT ==
|
||||
public net.minecraft.world.entity.ExperienceOrb count
|
||||
|
||||
Co-authored-by: Aikar <aikar@aikar.co>
|
||||
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||
index 8007d323023655052acd0cf1f3a753101e9ee74a..a933061d4f0c45a34b5678c2b317b670f20b8a45 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||
@@ -241,6 +241,7 @@ public class ExperienceOrb extends Entity {
|
||||
}
|
||||
|
||||
private static boolean tryMergeToExisting(ServerLevel world, Vec3 pos, int amount) {
|
||||
+ // Paper - TODO some other event for this kind of merge
|
||||
AABB axisalignedbb = AABB.ofSize(pos, 1.0D, 1.0D, 1.0D);
|
||||
int j = world.getRandom().nextInt(40);
|
||||
List<ExperienceOrb> list = world.getEntities(EntityTypeTest.forClass(ExperienceOrb.class), axisalignedbb, (entityexperienceorb) -> {
|
||||
@@ -267,6 +268,11 @@ public class ExperienceOrb extends Entity {
|
||||
}
|
||||
|
||||
private void merge(ExperienceOrb other) {
|
||||
+ // Paper start - call orb merge event
|
||||
+ if (!new com.destroystokyo.paper.event.entity.ExperienceOrbMergeEvent((org.bukkit.entity.ExperienceOrb) this.getBukkitEntity(), (org.bukkit.entity.ExperienceOrb) other.getBukkitEntity()).callEvent()) {
|
||||
+ return;
|
||||
+ }
|
||||
+ // Paper end - call orb merge event
|
||||
this.count += other.count;
|
||||
this.age = Math.min(this.age, other.age);
|
||||
other.discard(EntityRemoveEvent.Cause.MERGE); // CraftBukkit - add Bukkit remove cause
|
||||
@@ -353,7 +359,7 @@ public class ExperienceOrb extends Entity {
|
||||
|
||||
itemstack.setDamageValue(itemstack.getDamageValue() - j);
|
||||
int k = amount - this.durabilityToXp(j);
|
||||
- this.value = k; // CraftBukkit - update exp value of orb for PlayerItemMendEvent calls
|
||||
+ // this.value = k; // CraftBukkit - update exp value of orb for PlayerItemMendEvent calls // Paper - the value field should not be mutated here because it doesn't take "count" into account
|
||||
|
||||
return k > 0 ? this.repairPlayerItems(player, k) : 0;
|
||||
} else {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java
|
||||
index 5a7d314ec0562e472f5dc45924a7b24841cff126..650e4a01cecc4cc08e7ff9ebcc4c367084351f21 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java
|
||||
@@ -18,6 +18,18 @@ public class CraftExperienceOrb extends CraftEntity implements ExperienceOrb {
|
||||
this.getHandle().value = value;
|
||||
}
|
||||
|
||||
+ // Paper start - expose count
|
||||
+ @Override
|
||||
+ public int getCount() {
|
||||
+ return this.getHandle().count;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void setCount(final int count) {
|
||||
+ this.getHandle().count = count;
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
// Paper start
|
||||
public java.util.UUID getTriggerEntityId() {
|
||||
return getHandle().triggerEntityId;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index ac4a8c9d4f727f3caa16f6dc5497d69f9db52aab..53f5eb1682c88abf7b09e16f010ebbd8fe2ac059 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -703,15 +703,29 @@ public class CraftEventFactory {
|
||||
if (entity instanceof net.minecraft.world.entity.ExperienceOrb xp) {
|
||||
double radius = world.spigotConfig.expMerge;
|
||||
if (radius > 0) {
|
||||
+ // Paper start - Maximum exp value when merging; Whole section has been tweaked, see comments for specifics
|
||||
+ final long maxValue = world.paperConfig().entities.behavior.experienceMergeMaxValue;
|
||||
+ final boolean mergeUnconditionally = maxValue <= 0;
|
||||
+ if (mergeUnconditionally || xp.value < maxValue) { // Paper - Skip iteration if unnecessary
|
||||
+
|
||||
List<Entity> entities = world.getEntities(entity, entity.getBoundingBox().inflate(radius, radius, radius));
|
||||
for (Entity e : entities) {
|
||||
if (e instanceof net.minecraft.world.entity.ExperienceOrb loopItem) {
|
||||
- if (!loopItem.isRemoved()) {
|
||||
+ // Paper start
|
||||
+ if (!loopItem.isRemoved() && xp.count == loopItem.count && (mergeUnconditionally || loopItem.value < maxValue) && new com.destroystokyo.paper.event.entity.ExperienceOrbMergeEvent((org.bukkit.entity.ExperienceOrb) entity.getBukkitEntity(), (org.bukkit.entity.ExperienceOrb) loopItem.getBukkitEntity()).callEvent()) { // Paper - ExperienceOrbMergeEvent
|
||||
+ long newTotal = (long)xp.value + (long)loopItem.value;
|
||||
+ if ((int) newTotal < 0) continue; // Overflow
|
||||
+ if (!mergeUnconditionally && newTotal > maxValue) {
|
||||
+ loopItem.value = (int) (newTotal - maxValue);
|
||||
+ xp.value = (int) maxValue;
|
||||
+ } else {
|
||||
xp.value += loopItem.value;
|
||||
loopItem.discard(null); // Add Bukkit remove cause
|
||||
+ } // Paper end - Maximum exp value when merging
|
||||
}
|
||||
}
|
||||
}
|
||||
+ } // Paper end - End iteration skip check - All tweaking ends here
|
||||
}
|
||||
}
|
||||
// Spigot end
|
@ -1,42 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Fri, 10 Nov 2017 23:03:12 -0500
|
||||
Subject: [PATCH] Option for maximum exp value when merging orbs
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index ac4a8c9d4f727f3caa16f6dc5497d69f9db52aab..feffc6a539738e584dd6eda8c1f2f5b267f617f6 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -703,16 +703,30 @@ public class CraftEventFactory {
|
||||
if (entity instanceof net.minecraft.world.entity.ExperienceOrb xp) {
|
||||
double radius = world.spigotConfig.expMerge;
|
||||
if (radius > 0) {
|
||||
+ // Paper start - Maximum exp value when merging; Whole section has been tweaked, see comments for specifics
|
||||
+ final int maxValue = world.paperConfig().entities.behavior.experienceMergeMaxValue;
|
||||
+ final boolean mergeUnconditionally = world.paperConfig().entities.behavior.experienceMergeMaxValue <= 0;
|
||||
+ if (mergeUnconditionally || xp.value < maxValue) { // Paper - Skip iteration if unnecessary
|
||||
+
|
||||
List<Entity> entities = world.getEntities(entity, entity.getBoundingBox().inflate(radius, radius, radius));
|
||||
for (Entity e : entities) {
|
||||
if (e instanceof net.minecraft.world.entity.ExperienceOrb loopItem) {
|
||||
- if (!loopItem.isRemoved()) {
|
||||
+ // Paper start
|
||||
+ if (!loopItem.isRemoved() && !(maxValue > 0 && loopItem.value >= maxValue)) {
|
||||
+ long newTotal = (long)xp.value + (long)loopItem.value;
|
||||
+ if ((int) newTotal < 0) continue; // Overflow
|
||||
+ if (maxValue > 0 && newTotal > (long)maxValue) {
|
||||
+ loopItem.value = (int) (newTotal - maxValue);
|
||||
+ xp.value = maxValue;
|
||||
+ } else {
|
||||
xp.value += loopItem.value;
|
||||
loopItem.discard(null); // Add Bukkit remove cause
|
||||
+ } // Paper end - Maximum exp value when merging
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+ } // Paper end - End iteration skip check - All tweaking ends here
|
||||
}
|
||||
// Spigot end
|
||||
|
@ -1,23 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Tue, 19 Dec 2017 22:57:26 -0500
|
||||
Subject: [PATCH] ExperienceOrbMergeEvent
|
||||
|
||||
Has to be reimplemented at one point maybe
|
||||
Fired when the server is about to merge 2 experience orbs
|
||||
Plugins can cancel this if they want to ensure experience orbs do not lose important
|
||||
metadata such as spawn reason, or conditionally move data from source to target.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index feffc6a539738e584dd6eda8c1f2f5b267f617f6..1e9835647a0f9eb1e1a264467a62af85af664594 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -712,7 +712,7 @@ public class CraftEventFactory {
|
||||
for (Entity e : entities) {
|
||||
if (e instanceof net.minecraft.world.entity.ExperienceOrb loopItem) {
|
||||
// Paper start
|
||||
- if (!loopItem.isRemoved() && !(maxValue > 0 && loopItem.value >= maxValue)) {
|
||||
+ if (!loopItem.isRemoved() && !(maxValue > 0 && loopItem.value >= maxValue) && new com.destroystokyo.paper.event.entity.ExperienceOrbMergeEvent((org.bukkit.entity.ExperienceOrb) entity.getBukkitEntity(), (org.bukkit.entity.ExperienceOrb) loopItem.getBukkitEntity()).callEvent()) { // Paper - ExperienceOrbMergeEvent
|
||||
long newTotal = (long)xp.value + (long)loopItem.value;
|
||||
if ((int) newTotal < 0) continue; // Overflow
|
||||
if (maxValue > 0 && newTotal > (long)maxValue) {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add permission for command blocks
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
index cd6f34ee326228036f8c025e4e6d04e0c15ba06f..2f0d56c78584abe27ef050258827103fb60d5785 100644
|
||||
index cbb17ce25cb6218bcf95c2f1c3d0288eeee13a46..84c31fe944fc39109d48b6dc68d0c2b15bef6cf2 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
@@ -400,7 +400,7 @@ public class ServerPlayerGameMode {
|
@ -76,7 +76,7 @@ index 3d33504eac6af17c8833de11226968d52f96232f..4d7c2832a9cd9a88b99c837a02df7fa9
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index dde6d567521a08b416ee50b1249b653b0bf6e87a..9750c0309a9dae50b62bfbe5f29a2a6f3c981e62 100644
|
||||
index bf6c81300d29c445a1012d1159866547c202d135..e6a24484ef11a1d815a85126aec221547479f7d3 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1238,7 +1238,7 @@ public class ServerPlayer extends Player {
|
||||
@ -102,7 +102,7 @@ index 299a2e78f4a83d224038c80287636a5d6b9b7450..95d20facdc43a356fd2e82f5d597f52e
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 01224af0835a00343923767186dceb53900c0832..e7535d4739f217a8fda2c15c74d44637825a0322 100644
|
||||
index 45799f96978a68a79b4c89e17e9b543dec99a8b1..72f64528092f92adf60dadb7d1b5dc38c7a8d4ee 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -962,8 +962,8 @@ public final class CraftServer implements Server {
|
@ -22,7 +22,7 @@ wants it to collect even faster, they can restore that setting back to 1 instead
|
||||
Not adding it to .getType() though to keep behavior consistent with vanilla for performance reasons.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index e7535d4739f217a8fda2c15c74d44637825a0322..d996a0d5d14448e49a8b6730425dd5b50abc1e72 100644
|
||||
index 72f64528092f92adf60dadb7d1b5dc38c7a8d4ee..38da9a19546c979c4bfd4ab23a34b77266911a24 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -375,7 +375,7 @@ public final class CraftServer implements Server {
|
@ -94,7 +94,7 @@ index 9c2fe69ced7a46bbd8b0fbe10fa67d0a39b0f375..e40d9dbdbe5359c38af6d764d01c9be4
|
||||
|
||||
private void setupRecipeList(Container input, ItemStack stack) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 1e9835647a0f9eb1e1a264467a62af85af664594..461b25d3d0660f973e6db670899bce05010e7c49 100644
|
||||
index 54aa1a462bf4d9649f34d79aab1f59e14b7962a5..c3c7cfc33d07b87e034fb050b0a1ca1d8b971aa6 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1650,6 +1650,12 @@ public class CraftEventFactory {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Don't check chunk for portal on world gen entity add
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index c640d68c35b4454bfa0ae1764dee341041d9c31e..4bf48ce1824e404906a551ceec720c8e485adb44 100644
|
||||
index 5280bae3ad8f9c137e58add8a8d056df81de9928..33658a45d9f61640ab2b56be3fecb5b2552bca84 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3624,7 +3624,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Brand support
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 9750c0309a9dae50b62bfbe5f29a2a6f3c981e62..38e62a9251b0b0cceb0a350a649897f357293428 100644
|
||||
index e6a24484ef11a1d815a85126aec221547479f7d3..ffd9ff7db5180cb351839a3ce331353d16b662d2 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -290,6 +290,7 @@ public class ServerPlayer extends Player {
|
||||
@ -57,7 +57,7 @@ index 289a74e35836717bd20c777e9fc8c17722e90411..a5dce1e83e63292054b21ec693ec3006
|
||||
} catch (Exception ex) {
|
||||
ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t dispatch custom payload", ex);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 4131b83117e399d7113442def85101d20c493d06..b614ee4e0e217f4adf45f45f53486376bee6533f 100644
|
||||
index 776532b4818d15a5f4cfd35d0c076d4774615681..9a9c6e43c96689171a2767f93aea8856db1b7287 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -3112,6 +3112,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@ -7,7 +7,7 @@ Add a new event, BellRingEvent, to trigger whenever a player rings a
|
||||
village bell. Passes along the bell block and the player who rang it.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 461b25d3d0660f973e6db670899bce05010e7c49..737fbe02c630da0a95dbed49ff152fb5c7ec4d37 100644
|
||||
index c3c7cfc33d07b87e034fb050b0a1ca1d8b971aa6..c6408feaff6a5bd8529004e6c2e1aa76ddc8c861 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -367,10 +367,11 @@ public class CraftEventFactory {
|
@ -31,7 +31,7 @@ index bc9c68c4df11ece9a9cba9b8cff1182c1d21551f..5d8b1fb9ee96ca397b8f3a0629bc4273
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 9012d34db1768189ac68b9348e609d77948488d3..77e672f6146e4a9b32bead526b7dfcbe54c1829e 100644
|
||||
index 184d8bdca8aa06b6a1f00bab03e8c2688a391663..0b98618cb0b0e9c4b13415ab0e535cdfbd55b224 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -165,6 +165,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
@ -23,7 +23,7 @@ index f079192644e3b366dc58c4a77c10cbbe65c25eca..17985c75deaa8d317ea4019f73eafe11
|
||||
if (spawnReason != null && !CraftEventFactory.doEntityAddEventCalling(this, entity, spawnReason)) {
|
||||
return false;
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
index 2f0d56c78584abe27ef050258827103fb60d5785..486d9c4dbe3ee23198eba7f34ea8b5f4e9048c0b 100644
|
||||
index 84c31fe944fc39109d48b6dc68d0c2b15bef6cf2..de3ec353ea32d5d71e2f1b4b369b79b85d7ce5e8 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
@@ -432,10 +432,12 @@ public class ServerPlayerGameMode {
|
@ -25,7 +25,7 @@ index 68d5be903a0d13e59c9e4bd6d85baaf0773547a0..fe89e8f509f3972ceb71c9aa6277524b
|
||||
Connection.LOGGER.debug("Failed to sent packet", throwable);
|
||||
if (this.getSending() == PacketFlow.CLIENTBOUND) {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 38e62a9251b0b0cceb0a350a649897f357293428..89aa23a4443311771775adc2e98cb78c4bb369a5 100644
|
||||
index ffd9ff7db5180cb351839a3ce331353d16b662d2..d262946f729a5621f311e266b6b316d445b9e02a 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -291,6 +291,7 @@ public class ServerPlayer extends Player {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Fix Player spawnParticle x/y/z precision loss
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index b614ee4e0e217f4adf45f45f53486376bee6533f..d04cf4eb55cf652d7ac7ae80b417b8cb592e75b7 100644
|
||||
index 9a9c6e43c96689171a2767f93aea8856db1b7287..c47681e2192cc498abb6b47c82f29ec298decd4e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -2679,7 +2679,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Climbing should not bypass cramming gamerule
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 33aaabed53362367a88b09d5c3f298101e699fa6..c57ad2c8fe0c0e2f4cbc55a00c895f510eb27bfd 100644
|
||||
index 0a51ea55a6b768d71161c4492664a61ec1e5df15..0328738d613358a9042b1d12de511f212db68244 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2010,6 +2010,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@ -44,7 +44,7 @@ index ee4495b67c46cf1282cdd6ad15b224b0b7b10bfb..e382a29b441b656f35bc24cb90f95cb4
|
||||
} else if (entity.level().isClientSide && (!(entity1 instanceof Player) || !((Player) entity1).isLocalPlayer())) {
|
||||
return false;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 4bf48ce1824e404906a551ceec720c8e485adb44..48f772bcbc207c07aef9d28011ff935b58f8c381 100644
|
||||
index 33658a45d9f61640ab2b56be3fecb5b2552bca84..70f34d741eeafd54fcd2f5aaf9d059ba0f96e60a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3540,7 +3540,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Expose LivingEntity hurt direction
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index f07c2bd727a8e3e65bb2e6b1367a4bb392febe23..47ace2c3f395a86db3aa67d597686c8275a91323 100644
|
||||
index 8981d314a30c23d3b13087dd9c20216f57f1630d..2a2683d21d7bae023a93db422ab0aebf72ca56cb 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -187,7 +187,7 @@ public abstract class Player extends LivingEntity {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add OBSTRUCTED reason to BedEnterResult
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 737fbe02c630da0a95dbed49ff152fb5c7ec4d37..e55dafab2f986e445d9499cecd346bc96673bc9c 100644
|
||||
index c6408feaff6a5bd8529004e6c2e1aa76ddc8c861..2640544d8b145df68e0fe888c8c8e5ab7034bfae 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -302,6 +302,10 @@ public class CraftEventFactory {
|
Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren