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:
befcf86d SPIGOT-7740: Fix using new map cursor types
09229095 Add EntityDamageEvent.DamageCause#CAMPFIRE

CraftBukkit Changes:
a1d2cd152 SPIGOT-7747: Mob head is not dropped when mob was blown up by a charged creeper
8078294bc SPIGOT-7746: Server Crashing when Players Getting into End Portals
8d842e250 SPIGOT-7744: Fix exception for shooting projectiles with flame enchantment
64e0ad129 SPIGOT-7744: Fix crash when shooting arrows in creative mode
819f7a10a Fix player items not dropping on death
0a0229bb5 Implement DamageCause#CAMPFIRE and minor improvement in exception for Unhandled block damage
This commit is contained in:
Spottedleaf
2024-06-14 10:15:52 -07:00
parent 3f581a6024
commit e9068d28c6
6 changed files with 8 additions and 8 deletions

View File

@@ -12,8 +12,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
*/ */
@Deprecated(forRemoval = true, since = "1.20.2") // Paper @Deprecated(forRemoval = true, since = "1.20.2") // Paper
public void setRawType(byte type) { public void setRawType(byte type) {
- if (type < 0 || type > 26) { - if (type < 0 || type > 34) {
- throw new IllegalArgumentException("Type must be in the range 0-26"); - throw new IllegalArgumentException("Type must be in the range 0-34");
+ if (type < 0 || type > Type.UPPER_MAP_CURSOR_TYPE_BOUND) { // Paper + if (type < 0 || type > Type.UPPER_MAP_CURSOR_TYPE_BOUND) { // Paper
+ throw new IllegalArgumentException("Type must be in the range 0-" + Type.UPPER_MAP_CURSOR_TYPE_BOUND); // Paper + throw new IllegalArgumentException("Type must be in the range 0-" + Type.UPPER_MAP_CURSOR_TYPE_BOUND); // Paper
} }

View File

@@ -1702,8 +1702,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- @Deprecated - @Deprecated
+ @Deprecated(forRemoval = true, since = "1.20.2") // Paper + @Deprecated(forRemoval = true, since = "1.20.2") // Paper
public void setRawType(byte type) { public void setRawType(byte type) {
if (type < 0 || type > 26) { if (type < 0 || type > 34) {
throw new IllegalArgumentException("Type must be in the range 0-26"); throw new IllegalArgumentException("Type must be in the range 0-34");
@@ -0,0 +0,0 @@ public final class MapCursor { @@ -0,0 +0,0 @@ public final class MapCursor {
* Gets the internal value of the cursor. * Gets the internal value of the cursor.
* *

View File

@@ -114,7 +114,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
if (!event.isCancelled()) { if (!event.isCancelled()) {
// CraftBukkit end // CraftBukkit end
this.dead = true; this.dead = true;
- this.level().explode(this, this.level().damageSources().explosion(this, this.entityIgniter, net.minecraft.world.damagesource.DamageTypes.EXPLOSION), null, this.getX(), this.getY(), this.getZ(), event.getRadius(), event.getFire(), Level.ExplosionInteraction.MOB); // CraftBukkit - this.level().explode(this, net.minecraft.world.level.Explosion.getDefaultDamageSource(this.level(), this).customEntityDamager(this.entityIgniter), null, this.getX(), this.getY(), this.getZ(), event.getRadius(), event.getFire(), Level.ExplosionInteraction.MOB); // CraftBukkit
+ this.level().explode(this, this.getX(), this.getY(), this.getZ(), event.getRadius(), event.getFire(), Level.ExplosionInteraction.MOB); // CraftBukkit // Paper - fix DamageSource API (revert to vanilla, no, just no, don't change this) + this.level().explode(this, this.getX(), this.getY(), this.getZ(), event.getRadius(), event.getFire(), Level.ExplosionInteraction.MOB); // CraftBukkit // Paper - fix DamageSource API (revert to vanilla, no, just no, don't change this)
this.spawnLingeringCloud(); this.spawnLingeringCloud();
this.triggerOnDeathMobEffects(Entity.RemovalReason.KILLED); this.triggerOnDeathMobEffects(Entity.RemovalReason.KILLED);

View File

@@ -22,7 +22,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
if (!keepInventory) { if (!keepInventory) {
for (ItemStack item : this.getInventory().getContents()) { for (ItemStack item : this.getInventory().getContents()) {
if (!item.isEmpty() && EnchantmentHelper.has(item, EnchantmentEffectComponents.PREVENT_EQUIPMENT_DROP)) { if (!item.isEmpty() && !EnchantmentHelper.has(item, EnchantmentEffectComponents.PREVENT_EQUIPMENT_DROP)) {
- loot.add(CraftItemStack.asCraftMirror(item)); - loot.add(CraftItemStack.asCraftMirror(item));
+ loot.add(new DefaultDrop(item, stack -> this.drop(stack, true, false, false))); // Paper - Restore vanilla drops behavior; drop function taken from Inventory#dropAll (don't fire drop event) + loot.add(new DefaultDrop(item, stack -> this.drop(stack, true, false, false))); // Paper - Restore vanilla drops behavior; drop function taken from Inventory#dropAll (don't fire drop event)
} }