Strip raytracing for EntityLiving#hasLineOfSight
Co-authored-by: Paul Sauve <paul@technove.co>
This commit is contained in:
parent
33bec7f20a
commit
72e87abc2d
959 changed files with 476 additions and 277 deletions
|
@ -0,0 +1,24 @@
|
|||
From 0000000000000000000000000000000000000000 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/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
|
||||
index 3dd759d030411420f93eb5ac51f2087ecbf2dc49..91fbc67eefea473211b99e4338f6464f58dc5592 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
|
||||
@@ -592,6 +592,10 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
|
||||
entity = net.minecraft.world.entity.EntityType.BOAT.create(world);
|
||||
}
|
||||
entity.moveTo(x, y, z, yaw, pitch);
|
||||
+ // Paper start
|
||||
+ } else if (org.bukkit.entity.Item.class.isAssignableFrom(clazz)) {
|
||||
+ entity = new net.minecraft.world.entity.item.ItemEntity(world, x, y, z, new net.minecraft.world.item.ItemStack(net.minecraft.world.item.Items.DIRT));
|
||||
+ // Paper end
|
||||
} else if (FallingBlock.class.isAssignableFrom(clazz)) {
|
||||
BlockPos pos = BlockPos.containing(x, y, z);
|
||||
entity = FallingBlockEntity.fall(world, pos, this.getHandle().getBlockState(pos));
|
Loading…
Add table
Add a link
Reference in a new issue