mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-28 19:22:50 +01:00
d413dca4ee
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: 333b9f02 SPIGOT-5422: Add support for 3-dimensional biomes 170d7386 Fix bad link in deprecated FlowerPot MaterialData class CraftBukkit Changes:16dc5758
SPIGOT-5449: Fix issue with projectilesfd25653f
SPIGOT-5448: Shulker Boxes collapse empty slots when picked upb97d581a
SPIGOT-5443: BEE_NEST BlockState73698cf8
SPIGOT-5442: Fix issue with fire chargesbeff9fb9
SPIGOT-5437: Fix CustomChunkGenerator.CustomBiomeGrid ignoring the y value for biomesf777640e
SPIGOT-5425: Prevent empty/air loot (again?)db0dafb1
SPIGOT-5422: Add support for 3-dimensional biomes4633e6c5
Fix crash with disabled worlds Spigot Changes: f39a89ef SPIGOT-5423: Remove covariant type change to give better chance of Java downgrades working
27 lines
1.4 KiB
Diff
27 lines
1.4 KiB
Diff
From dc1627fdf76e17665a6053858faa93c077e62622 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 2f1f308ab..b66fa7b89 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
@@ -1465,6 +1465,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.24.1
|
|
|