3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-15 02:50:09 +01:00

Updated Upstream (Bukkit/CraftBukkit)

Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
2651717c SPIGOT-7292: Support for alpha channel in Color and a few improvements

CraftBukkit Changes:
dbc32ffa0 SPIGOT-7292: Support alpha channel in Display entities
cef8bd993 SPIGOT-7294: Call EntityDamageEvent for Interaction entity
Dieser Commit ist enthalten in:
Nassim Jahnke 2023-03-16 10:07:12 +01:00
Ursprung 4f933b2405
Commit fe881073af
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B
12 geänderte Dateien mit 44 neuen und 25 gelöschten Zeilen

Datei anzeigen

@ -28,10 +28,10 @@ index efbf6b316a70b94e4bd490df8ebe77cd9f638ba4..cad8854cc7523d60c06ca1f03bfd4fbf
entitywitch.finalizeSpawn(world, world.getCurrentDifficultyAt(entitywitch.blockPosition()), MobSpawnType.CONVERSION, (SpawnGroupData) null, (CompoundTag) null);
entitywitch.setNoAi(this.isNoAi());
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 7bcbd1aac8826c76b74ef0e517b9d94e615df347..8451c482eb92e7f9394490c9380cd1d6357306dc 100644
index edab1f25747a7492760a31a90e25b37678b48c64..f1e0cc9b558fd825e6ef1bd26ccec488153fd21d 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1158,6 +1158,14 @@ public class CraftEventFactory {
@@ -1162,6 +1162,14 @@ public class CraftEventFactory {
return event;
}

Datei anzeigen

@ -18,10 +18,10 @@ index 5391c60398c8a7d1d49dc2e73116b27862653873..5a79b49e321cba352d8e4189dfbfdd05
--this.count;
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 8451c482eb92e7f9394490c9380cd1d6357306dc..6bb518a2d9610157b48209241f98c29b1f80158d 100644
index f1e0cc9b558fd825e6ef1bd26ccec488153fd21d..f80f015515e4da9bf9d41f7bc38341c018c90acc 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1117,6 +1117,17 @@ public class CraftEventFactory {
@@ -1121,6 +1121,17 @@ public class CraftEventFactory {
return event;
}

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Add ProjectileCollideEvent
Deprecated now and replaced with ProjectileHitEvent
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 6bb518a2d9610157b48209241f98c29b1f80158d..71b43f56119977c8c28fc255933a851c1f88260f 100644
index f80f015515e4da9bf9d41f7bc38341c018c90acc..62c1f7b63601fc8df3469c0e7ad2d75382bde72f 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1261,6 +1261,17 @@ public class CraftEventFactory {
@@ -1265,6 +1265,17 @@ public class CraftEventFactory {
return CraftItemStack.asNMSCopy(bitem);
}
@ -27,7 +27,7 @@ index 6bb518a2d9610157b48209241f98c29b1f80158d..71b43f56119977c8c28fc255933a851c
public static ProjectileLaunchEvent callProjectileLaunchEvent(Entity entity) {
Projectile bukkitEntity = (Projectile) entity.getBukkitEntity();
ProjectileLaunchEvent event = new ProjectileLaunchEvent(bukkitEntity);
@@ -1285,8 +1296,15 @@ public class CraftEventFactory {
@@ -1289,8 +1300,15 @@ public class CraftEventFactory {
if (position.getType() == HitResult.Type.ENTITY) {
hitEntity = ((EntityHitResult) position).getEntity().getBukkitEntity();
}

Datei anzeigen

@ -75,7 +75,7 @@ index 0e44abb38eb90d1943137e8e0f297f5529d3f25b..dad0368c8b55be018167bd8b113a80b7
this.doCloseContainer();
}
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index ed910ec48845cbf7fad163771b409ea7485e9bf4..ce1dcfa2f76245c6b243b030754c8b59cd5227e1 100644
index 5e710c7efef73c1caec0a16ff2e5f128ec4beb54..2bfcd1fbd18656f80ca0356d4f4c45e2bcfb3a55 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -219,6 +219,7 @@ import org.bukkit.event.inventory.ClickType;
@ -173,7 +173,7 @@ index 787ccb37a39bb506cf9fd8d54cf772b346981f85..f5b3190ffb9e9f92977afc9e40ddfa15
@Override
public boolean isBlocking() {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 9d4c164e43915c10821b332c18d440637ef19a8b..1beecfc947f52467bd10e454877bc0678fd2dc41 100644
index ecbcabc24529c7a7becf709fa6f24cfaa22f7f0e..bef819229c4d9c4742f907532f0d3f4689c30c00 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1207,7 +1207,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -186,10 +186,10 @@ index 9d4c164e43915c10821b332c18d440637ef19a8b..1beecfc947f52467bd10e454877bc067
// 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
index 71b43f56119977c8c28fc255933a851c1f88260f..358040413015cff19fc8b1858726e2d856ebf911 100644
index 62c1f7b63601fc8df3469c0e7ad2d75382bde72f..a030a4852d0f7b2e3aedb7b35c316f525115086e 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1230,7 +1230,7 @@ public class CraftEventFactory {
@@ -1234,7 +1234,7 @@ public class CraftEventFactory {
public static AbstractContainerMenu callInventoryOpenEvent(ServerPlayer player, AbstractContainerMenu container, boolean cancelled) {
if (player.containerMenu != player.inventoryMenu) { // fire INVENTORY_CLOSE if one already open
@ -198,7 +198,7 @@ index 71b43f56119977c8c28fc255933a851c1f88260f..358040413015cff19fc8b1858726e2d8
}
CraftServer server = player.level.getCraftServer();
@@ -1404,8 +1404,18 @@ public class CraftEventFactory {
@@ -1408,8 +1408,18 @@ public class CraftEventFactory {
return event;
}

Datei anzeigen

@ -89,10 +89,10 @@ index f07e70ab26fffaec5055a7dd2571dc4d29c66d35..754e1667aadef89bbaccebc0f437197b
public boolean isClientSide() {
return this.isClientSide;
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 358040413015cff19fc8b1858726e2d856ebf911..c24e84e07f3f0d93da079ddf73e0e67b7d58fe8b 100644
index a030a4852d0f7b2e3aedb7b35c316f525115086e..9ef6b6fe8a909a90c4b4ddb832f0beb404542a35 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1267,6 +1267,14 @@ public class CraftEventFactory {
@@ -1271,6 +1271,14 @@ public class CraftEventFactory {
Projectile projectile = (Projectile) entity.getBukkitEntity();
org.bukkit.entity.Entity collided = position.getEntity().getBukkitEntity();
com.destroystokyo.paper.event.entity.ProjectileCollideEvent event = new com.destroystokyo.paper.event.entity.ProjectileCollideEvent(projectile, collided);

Datei anzeigen

@ -94,10 +94,10 @@ index 665b01ff3579c8fd87074edfc6da6b7ef07693b2..24c31e96be460bcb5062a1fcf7f86c1a
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 28c3518a5adde4bc3f3e0ee17c76b7ca34af1d9c..31ac732071811a09e3b9771f612a0b8f38c0823a 100644
index 450f3edf0a72272fb0466c2cd3ccc04917a1dedc..81d836ba65890889bbb54852bbebb7aff7e25f68 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1593,26 +1593,53 @@ public class CraftEventFactory {
@@ -1597,26 +1597,53 @@ public class CraftEventFactory {
return event;
}

Datei anzeigen

@ -32,10 +32,10 @@ index 1415ad60163f6584619cc7caa61f1848d6ebaa93..801c4c120e98584bcf218a4ef9bd66d7
} else {
ItemStack itemstack = tileentitydispenser.getItem(i);
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 8b00741f2e17d9f1b2759ffba5d322b6e3439ab5..5f14203089f989023c84ea6a8e1d491779498118 100644
index 3d21823498b6ae91520b13d6268396816ff496b1..b6e4475c22641a57f18e6949f19f15c615b5a5a6 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1876,4 +1876,12 @@ public class CraftEventFactory {
@@ -1880,4 +1880,12 @@ public class CraftEventFactory {
EntitiesUnloadEvent event = new EntitiesUnloadEvent(new CraftChunk((ServerLevel) world, coords.x, coords.z), bukkitEntities);
Bukkit.getPluginManager().callEvent(event);
}

Datei anzeigen

@ -17,10 +17,10 @@ index 85c5319837295bd2f85baebfe8d6660b267f1d5f..8f55d0753fa26924235c943595f0d1a0
tileentitydispenser.setItem(i, idispensebehavior.dispense(sourceblock, itemstack));
}
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index d0acc47f615b02ce72081aede03fc27c8ab6c0f5..49752c3b660438771569fdeebb72bd918204332d 100644
index 58b16b3d1560e0ae971797ff03553d4e484d1eff..80930b02915b74a72568b2137c01c4bbff1f6a59 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1894,5 +1894,11 @@ public class CraftEventFactory {
@@ -1898,5 +1898,11 @@ public class CraftEventFactory {
io.papermc.paper.event.block.BlockFailedDispenseEvent event = new io.papermc.paper.event.block.BlockFailedDispenseEvent(block);
return event.callEvent();
}

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add dropLeash variable to EntityUnleashEvent
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index 56cfdf15cf2fd0b88d4d68d0b537da4bf323474f..3fbdd1b01bc86696b958ca6b7a3848e72fb51d50 100644
index fa9cc50488d5044e13a97fb4aa9269fec999ad88..608cce7fe11cc873299440895f1fff62bdfcba8a 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -1295,12 +1295,15 @@ public abstract class Mob extends LivingEntity implements Targeting {
@ -122,10 +122,10 @@ index b5e35033e63da0e5f2c21fddf3b704d6730f0938..7a6cdae1b566f59508b180e720de4eff
flag1 = true;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 49752c3b660438771569fdeebb72bd918204332d..d347b109f046ad633cb2b361fbe47e67595843f5 100644
index 80930b02915b74a72568b2137c01c4bbff1f6a59..efa269529cad2e9bddcb3c1f06a0cbd0b6ab8573 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1526,8 +1526,10 @@ public class CraftEventFactory {
@@ -1530,8 +1530,10 @@ public class CraftEventFactory {
return itemInHand;
}

Datei anzeigen

@ -0,0 +1,19 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Nassim Jahnke <nassim@njahnke.dev>
Date: Thu, 16 Mar 2023 10:04:17 +0100
Subject: [PATCH] Dont change Interaction attack damage source
diff --git a/src/main/java/net/minecraft/world/entity/Interaction.java b/src/main/java/net/minecraft/world/entity/Interaction.java
index ee9222406bcaef1a1ac09b60a142044c70d31fce..4f1a2b8bb3b837f5e6f7888f267701b789ea5c02 100644
--- a/src/main/java/net/minecraft/world/entity/Interaction.java
+++ b/src/main/java/net/minecraft/world/entity/Interaction.java
@@ -155,7 +155,7 @@ public class Interaction extends Entity implements Attackable, Targeting {
if (entityhuman instanceof ServerPlayer) {
ServerPlayer entityplayer = (ServerPlayer) entityhuman;
- CriteriaTriggers.PLAYER_HURT_ENTITY.trigger(entityplayer, this, source, (float) event.getFinalDamage(), 1.0F, false); // CraftBukkit
+ CriteriaTriggers.PLAYER_HURT_ENTITY.trigger(entityplayer, this, entityhuman.damageSources().generic(), (float) event.getFinalDamage(), 1.0F, false); // CraftBukkit // Paper
}
return !this.getResponse();

@ -1 +1 @@
Subproject commit 3a54fb167d6354b6e39f5027bcde56641f487b8f
Subproject commit 2651717c7d47696a774dfbe3ba1db6c6cfb8a4c5

@ -1 +1 @@
Subproject commit 55056ad80314cca1c910c9b79f31a1b6a4c629f6
Subproject commit dbc32ffa0667ee6d02771283f19c7ccf8c965563