mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-29 11:42:55 +01:00
c9fd745840
Upstream has released updates that appears 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: ff0672ca SPIGOT-5211: Add Raid API CraftBukkit Changes:96bc85f0
SPIGOT-5298: Remove unexplained 0.1 drop chance offset6ed8a189
SPIGOT-5290: Invulnerable and/or Marker armor stand triggers EntityDamageEvent631eaeb0
SPIGOT-5297: PlayerBedLeaveEvent.getBed() returns player location8d4bc541
SPIGOT-5293: Sponge behaviour differs from Vanillae91fd75e
SPIGOT-5291: Missing event for ravagers trampling cropscbdd7139
SPIGOT-5211: Add Raid APIedd8fdfb
SPIGOT-5287: Fix rare CME generating new chunks3fc97f08
SPIGOT-5265: FireworkExplodeEvent only fired when rockets explode in air Spigot Changes: 065a3734 Rebuild patches a5961826 SPIGOT-5286: tick-inactive-villagers invokes the AI for NoAI villagers
27 lines
1.4 KiB
Diff
27 lines
1.4 KiB
Diff
From f498a1a83a6ead6408383a780c51342aa5b78e71 Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Mon, 4 Jun 2018 20:39:20 -0400
|
|
Subject: [PATCH] Allow spawning Item entities with World.spawnEntity
|
|
|
|
This API has more capabilities than .dropItem with the Consumer function
|
|
|
|
Item can be set inside of the Consumer pre spawn function.
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
index 16de4efef..00ce2fecf 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
@@ -1407,6 +1407,10 @@ public class CraftWorld implements World {
|
|
if (Boat.class.isAssignableFrom(clazz)) {
|
|
entity = new EntityBoat(world, x, y, z);
|
|
entity.setPositionRotation(x, y, z, yaw, pitch);
|
|
+ // Paper start
|
|
+ } else if (org.bukkit.entity.Item.class.isAssignableFrom(clazz)) {
|
|
+ entity = new EntityItem(world, x, y, z, new net.minecraft.server.ItemStack(net.minecraft.server.Item.getItemOf(net.minecraft.server.Blocks.DIRT)));
|
|
+ // Paper end
|
|
} else if (FallingBlock.class.isAssignableFrom(clazz)) {
|
|
entity = new EntityFallingBlock(world, x, y, z, world.getType(new BlockPosition(x, y, z)));
|
|
} else if (Projectile.class.isAssignableFrom(clazz)) {
|
|
--
|
|
2.23.0
|
|
|