Update to Minecraft 1.19

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2022-06-08 02:00:00 +10:00
parent 91d9aa9a89
commit 25f3b50f6b
332 changed files with 3628 additions and 2559 deletions

View File

@@ -6,7 +6,7 @@
+// CraftBukkit start
+import net.minecraft.network.protocol.game.PacketPlayOutEntityMetadata;
+import net.minecraft.network.protocol.game.PacketPlayOutSpawnEntityLiving;
+import net.minecraft.network.protocol.game.PacketPlayOutSpawnEntity;
+import org.bukkit.craftbukkit.event.CraftEventFactory;
+import org.bukkit.craftbukkit.inventory.CraftItemStack;
+import org.bukkit.event.player.PlayerBucketEntityEvent;
@@ -30,7 +30,7 @@
+ itemstack1 = CraftItemStack.asNMSCopy(playerBucketFishEvent.getEntityBucket());
+ if (playerBucketFishEvent.isCancelled()) {
+ ((EntityPlayer) entityhuman).containerMenu.sendAllDataToRemote(); // We need to update inventory to resync client's bucket
+ ((EntityPlayer) entityhuman).connection.send(new PacketPlayOutSpawnEntityLiving(t0)); // We need to play out these packets as the client assumes the fish is gone
+ ((EntityPlayer) entityhuman).connection.send(new PacketPlayOutSpawnEntity(t0)); // We need to play out these packets as the client assumes the fish is gone
+ ((EntityPlayer) entityhuman).connection.send(new PacketPlayOutEntityMetadata(t0.getId(), t0.getEntityData(), true)); // Need to send data such as the display name to client
+ return Optional.of(EnumInteractionResult.FAIL);
+ }