Updated Upstream (Bukkit/CraftBukkit/Spigot)
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: 9ae3f10f SPIGOT-3842: Add Player#fireworkBoost() and expand Firework API 48c0c547 PR-786: Add methods to get sounds from entities CraftBukkit Changes: 5cc9c022a SPIGOT-7152: Handle hand item changing during air interact event 4ffa1acf6 SPIGOT-7154: Players get kicked when interacting with a conversation 4daa21123 SPIGOT-3842: Add Player#fireworkBoost() and expand Firework API e5d6a9bbf PR-1100: Add methods to get sounds from entities b7e9f1c8b SPIGOT-7146: Reduce use of Material switch in ItemMeta Spigot Changes: 4c157bb4 Rebuild patches
This commit is contained in:
parent
d1129b0ded
commit
39ae9b75e9
16 changed files with 75 additions and 79 deletions
|
@ -16,8 +16,8 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.
|
|||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java
|
||||
@@ -0,0 +0,0 @@ import org.bukkit.configuration.serialization.DelegateDeserialization;
|
||||
import org.bukkit.craftbukkit.inventory.CraftMetaItem.ItemMetaKey;
|
||||
@@ -0,0 +0,0 @@ import org.bukkit.Material;
|
||||
import org.bukkit.configuration.serialization.DelegateDeserialization;
|
||||
|
||||
@DelegateDeserialization(CraftMetaItem.SerializableMeta.class)
|
||||
-public class CraftMetaArmorStand extends CraftMetaItem {
|
||||
|
|
|
@ -42,16 +42,16 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.ja
|
|||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java
|
||||
@@ -0,0 +0,0 @@ public class CraftMetaSpawnEgg extends CraftMetaItem implements SpawnEggMeta {
|
||||
case ZOMBIE_SPAWN_EGG:
|
||||
case ZOMBIE_VILLAGER_SPAWN_EGG:
|
||||
case ZOMBIFIED_PIGLIN_SPAWN_EGG:
|
||||
@@ -0,0 +0,0 @@ import org.bukkit.material.MaterialData;
|
||||
public class CraftMetaSpawnEgg extends CraftMetaItem implements SpawnEggMeta {
|
||||
|
||||
private static final Set<Material> SPAWN_EGG_MATERIALS = Sets.newHashSet(
|
||||
+ // Paper start
|
||||
+ case ALLAY_SPAWN_EGG:
|
||||
+ case FROG_SPAWN_EGG:
|
||||
+ case TADPOLE_SPAWN_EGG:
|
||||
+ case WARDEN_SPAWN_EGG:
|
||||
+ Material. ALLAY_SPAWN_EGG,
|
||||
+ Material. FROG_SPAWN_EGG,
|
||||
+ Material. TADPOLE_SPAWN_EGG,
|
||||
+ Material. WARDEN_SPAWN_EGG,
|
||||
+ // Paper end
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
Material.AXOLOTL_SPAWN_EGG,
|
||||
Material.BAT_SPAWN_EGG,
|
||||
Material.BEE_SPAWN_EGG,
|
||||
|
|
|
@ -3848,18 +3848,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
@@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.util.CraftChatMessage;
|
||||
import org.bukkit.craftbukkit.util.CraftMagicNumbers;
|
||||
import org.bukkit.inventory.meta.BookMeta;
|
||||
import org.bukkit.inventory.meta.BookMeta.Generation;
|
||||
+import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
// Spigot start
|
||||
import static org.spigotmc.ValidateUtils.*;
|
||||
+
|
||||
import java.util.AbstractList;
|
||||
import net.md_5.bungee.api.chat.BaseComponent;
|
||||
import net.md_5.bungee.chat.ComponentSerializer;
|
||||
@@ -0,0 +0,0 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta {
|
||||
this.generation = (generation == null) ? null : generation.ordinal();
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
@@ -0,0 +0,0 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier {
|
||||
public int lifetime;
|
||||
@Nullable
|
||||
public LivingEntity attachedToEntity;
|
||||
public LivingEntity attachedToEntity; // PAIL private -> public
|
||||
+ public java.util.UUID spawningEntity; // Paper
|
||||
|
||||
public FireworkRocketEntity(EntityType<? extends FireworkRocketEntity> type, Level world) {
|
||||
|
@ -87,11 +87,5 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ public java.util.UUID getSpawningEntity() {
|
||||
+ return getHandle().spawningEntity;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public org.bukkit.entity.LivingEntity getBoostedEntity() {
|
||||
+ net.minecraft.world.entity.LivingEntity boostedEntity = getHandle().attachedToEntity;
|
||||
+ return boostedEntity != null ? (org.bukkit.entity.LivingEntity) boostedEntity.getBukkitEntity() : null;
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Lukasz Derlatka <toranktto@gmail.com>
|
||||
Date: Mon, 11 Nov 2019 16:08:13 +0100
|
||||
Subject: [PATCH] Fix AssertionError when player hand set to empty type
|
||||
|
||||
Fixes an AssertionError when setting the player's item in hand to null or a new ItemStack of Air in PlayerInteractEvent
|
||||
Fixes GH-2718
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
this.player.getBukkitEntity().updateInventory(); // SPIGOT-2524
|
||||
return;
|
||||
}
|
||||
+ // Paper start
|
||||
+ itemstack = this.player.getItemInHand(enumhand);
|
||||
+ if (itemstack.isEmpty()) return;
|
||||
+ // Paper end
|
||||
InteractionResult enuminteractionresult = this.player.gameMode.useItem(this.player, worldserver, itemstack, enumhand);
|
||||
|
||||
if (enuminteractionresult.shouldSwing()) {
|
|
@ -8,14 +8,6 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
|||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -0,0 +0,0 @@ import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
+import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.world.InteractionHand;
|
||||
import net.minecraft.world.damagesource.DamageSource;
|
||||
import net.minecraft.world.effect.MobEffect;
|
||||
@@ -0,0 +0,0 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
return this.getHandle().lastHurtByPlayer == null ? null : (Player) this.getHandle().lastHurtByPlayer.getBukkitEntity();
|
||||
}
|
||||
|
@ -23,7 +15,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ // Paper start
|
||||
+ @Override
|
||||
+ public void setKiller(Player killer) {
|
||||
+ ServerPlayer entityPlayer = killer == null ? null : ((CraftPlayer) killer).getHandle();
|
||||
+ net.minecraft.server.level.ServerPlayer entityPlayer = killer == null ? null : ((CraftPlayer) killer).getHandle();
|
||||
+ getHandle().lastHurtByPlayer = entityPlayer;
|
||||
+ getHandle().lastHurtByMob = entityPlayer;
|
||||
+ getHandle().lastHurtByPlayerTime = entityPlayer == null ? 0 : 100; // 100 value taken from EntityLiving#damageEntity
|
||||
|
|
|
@ -451,8 +451,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftRaider.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftRaider.java
|
||||
@@ -0,0 +0,0 @@ public abstract class CraftRaider extends CraftMonster implements Raider {
|
||||
public void setCanJoinRaid(boolean join) {
|
||||
this.getHandle().setCanJoinRaid(join);
|
||||
public Sound getCelebrationSound() {
|
||||
return CraftSound.getBukkit(this.getHandle().getCelebrateSound());
|
||||
}
|
||||
+
|
||||
+ // Paper start
|
||||
|
|
|
@ -91,7 +91,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
// Copied from EntityFireworks constructor, update firework lifetime/power
|
||||
this.getHandle().lifetime = 10 * (1 + meta.getPower()) + this.random.nextInt(6) + this.random.nextInt(7);
|
||||
@@ -0,0 +0,0 @@ public class CraftFirework extends CraftProjectile implements Firework {
|
||||
return boostedEntity != null ? (org.bukkit.entity.LivingEntity) boostedEntity.getBukkitEntity() : null;
|
||||
return getHandle().spawningEntity;
|
||||
}
|
||||
// Paper end
|
||||
+ // Paper start - Expose firework item directly + manually setting flight
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue