geforkt von Mirrors/Paper
Deprecate TargetBlock/EntityInfo and assocated methods (#7381)
Dieser Commit ist enthalten in:
Ursprung
3aec8630bb
Commit
0262de0ddb
@ -6,19 +6,22 @@ Subject: [PATCH] Add ray tracing methods to LivingEntity
|
|||||||
|
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/block/TargetBlockInfo.java b/src/main/java/com/destroystokyo/paper/block/TargetBlockInfo.java
|
diff --git a/src/main/java/com/destroystokyo/paper/block/TargetBlockInfo.java b/src/main/java/com/destroystokyo/paper/block/TargetBlockInfo.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..18a96dbb01d3b34476652264b2d6be3782a154ec
|
index 0000000000000000000000000000000000000000..c896d172519a8552a132031cb956378db272878f
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/block/TargetBlockInfo.java
|
+++ b/src/main/java/com/destroystokyo/paper/block/TargetBlockInfo.java
|
||||||
@@ -0,0 +1,54 @@
|
@@ -0,0 +1,67 @@
|
||||||
+package com.destroystokyo.paper.block;
|
+package com.destroystokyo.paper.block;
|
||||||
+
|
+
|
||||||
|
+import org.bukkit.FluidCollisionMode;
|
||||||
+import org.bukkit.block.Block;
|
+import org.bukkit.block.Block;
|
||||||
+import org.bukkit.block.BlockFace;
|
+import org.bukkit.block.BlockFace;
|
||||||
+import org.jetbrains.annotations.NotNull;
|
+import org.jetbrains.annotations.NotNull;
|
||||||
+
|
+
|
||||||
+/**
|
+/**
|
||||||
+ * Represents information about a targeted block
|
+ * Represents information about a targeted block
|
||||||
|
+ * @deprecated use {@link org.bukkit.util.RayTraceResult}
|
||||||
+ */
|
+ */
|
||||||
|
+@Deprecated(forRemoval = true)
|
||||||
+public class TargetBlockInfo {
|
+public class TargetBlockInfo {
|
||||||
+ private final Block block;
|
+ private final Block block;
|
||||||
+ private final BlockFace blockFace;
|
+ private final BlockFace blockFace;
|
||||||
@ -58,17 +61,27 @@ index 0000000000000000000000000000000000000000..18a96dbb01d3b34476652264b2d6be37
|
|||||||
+ return block.getRelative(blockFace);
|
+ return block.getRelative(blockFace);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
+ /**
|
||||||
|
+ * @deprecated use {@link org.bukkit.FluidCollisionMode}
|
||||||
|
+ */
|
||||||
|
+ @Deprecated(forRemoval = true)
|
||||||
+ public enum FluidMode {
|
+ public enum FluidMode {
|
||||||
+ NEVER,
|
+ NEVER(FluidCollisionMode.NEVER),
|
||||||
+ SOURCE_ONLY,
|
+ SOURCE_ONLY(FluidCollisionMode.SOURCE_ONLY),
|
||||||
+ ALWAYS
|
+ ALWAYS(FluidCollisionMode.ALWAYS);
|
||||||
|
+
|
||||||
|
+ public final FluidCollisionMode bukkit;
|
||||||
|
+
|
||||||
|
+ FluidMode(FluidCollisionMode bukkit) {
|
||||||
|
+ this.bukkit = bukkit;
|
||||||
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||||
index c80e75b72ac863db19e3d234e349876dd8797924..c29846df0469535870e1743eee25325a4f092a6d 100644
|
index c80e75b72ac863db19e3d234e349876dd8797924..c29846df0469535870e1743eee25325a4f092a6d 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||||
@@ -83,6 +83,77 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
@@ -83,6 +83,98 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||||
@NotNull
|
@NotNull
|
||||||
public Block getTargetBlock(@Nullable Set<Material> transparent, int maxDistance);
|
public Block getTargetBlock(@Nullable Set<Material> transparent, int maxDistance);
|
||||||
|
|
||||||
@ -79,7 +92,9 @@ index c80e75b72ac863db19e3d234e349876dd8797924..c29846df0469535870e1743eee25325a
|
|||||||
+ * @param maxDistance this is the maximum distance to scan
|
+ * @param maxDistance this is the maximum distance to scan
|
||||||
+ * @return block that the living entity has targeted,
|
+ * @return block that the living entity has targeted,
|
||||||
+ * or null if no block is within maxDistance
|
+ * or null if no block is within maxDistance
|
||||||
|
+ * @deprecated use {@link #getTargetBlockExact(int)}
|
||||||
+ */
|
+ */
|
||||||
|
+ @Deprecated(forRemoval = true)
|
||||||
+ @Nullable
|
+ @Nullable
|
||||||
+ public default Block getTargetBlock(int maxDistance) {
|
+ public default Block getTargetBlock(int maxDistance) {
|
||||||
+ return getTargetBlock(maxDistance, com.destroystokyo.paper.block.TargetBlockInfo.FluidMode.NEVER);
|
+ return getTargetBlock(maxDistance, com.destroystokyo.paper.block.TargetBlockInfo.FluidMode.NEVER);
|
||||||
@ -92,7 +107,9 @@ index c80e75b72ac863db19e3d234e349876dd8797924..c29846df0469535870e1743eee25325a
|
|||||||
+ * @param fluidMode whether to check fluids or not
|
+ * @param fluidMode whether to check fluids or not
|
||||||
+ * @return block that the living entity has targeted,
|
+ * @return block that the living entity has targeted,
|
||||||
+ * or null if no block is within maxDistance
|
+ * or null if no block is within maxDistance
|
||||||
|
+ * @deprecated use {@link #getTargetBlockExact(int, FluidCollisionMode)}
|
||||||
+ */
|
+ */
|
||||||
|
+ @Deprecated(forRemoval = true)
|
||||||
+ @Nullable
|
+ @Nullable
|
||||||
+ public Block getTargetBlock(int maxDistance, @NotNull com.destroystokyo.paper.block.TargetBlockInfo.FluidMode fluidMode);
|
+ public Block getTargetBlock(int maxDistance, @NotNull com.destroystokyo.paper.block.TargetBlockInfo.FluidMode fluidMode);
|
||||||
+
|
+
|
||||||
@ -105,7 +122,7 @@ index c80e75b72ac863db19e3d234e349876dd8797924..c29846df0469535870e1743eee25325a
|
|||||||
+ */
|
+ */
|
||||||
+ @Nullable
|
+ @Nullable
|
||||||
+ public default org.bukkit.block.BlockFace getTargetBlockFace(int maxDistance) {
|
+ public default org.bukkit.block.BlockFace getTargetBlockFace(int maxDistance) {
|
||||||
+ return getTargetBlockFace(maxDistance, com.destroystokyo.paper.block.TargetBlockInfo.FluidMode.NEVER);
|
+ return getTargetBlockFace(maxDistance, org.bukkit.FluidCollisionMode.NEVER);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
@ -115,9 +132,22 @@ index c80e75b72ac863db19e3d234e349876dd8797924..c29846df0469535870e1743eee25325a
|
|||||||
+ * @param fluidMode whether to check fluids or not
|
+ * @param fluidMode whether to check fluids or not
|
||||||
+ * @return blockface of the block that the living entity has targeted,
|
+ * @return blockface of the block that the living entity has targeted,
|
||||||
+ * or null if no block is targeted
|
+ * or null if no block is targeted
|
||||||
|
+ * @deprecated use {@link #getTargetBlockFace(int, FluidCollisionMode)}
|
||||||
|
+ */
|
||||||
|
+ @Deprecated(forRemoval = true)
|
||||||
|
+ @Nullable
|
||||||
|
+ public org.bukkit.block.BlockFace getTargetBlockFace(int maxDistance, @NotNull com.destroystokyo.paper.block.TargetBlockInfo.FluidMode fluidMode);
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
|
+ * Gets the blockface of that block that the living entity has targeted
|
||||||
|
+ *
|
||||||
|
+ * @param maxDistance this is the maximum distance to scan
|
||||||
|
+ * @param fluidMode whether to check fluids or not
|
||||||
|
+ * @return blockface of the block that the living entity has targeted,
|
||||||
|
+ * or null if no block is targeted
|
||||||
+ */
|
+ */
|
||||||
+ @Nullable
|
+ @Nullable
|
||||||
+ public org.bukkit.block.BlockFace getTargetBlockFace(int maxDistance, @NotNull com.destroystokyo.paper.block.TargetBlockInfo.FluidMode fluidMode);
|
+ public org.bukkit.block.BlockFace getTargetBlockFace(int maxDistance, @NotNull FluidCollisionMode fluidMode);
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
+ * Gets information about the block the living entity has targeted, ignoring fluids
|
+ * Gets information about the block the living entity has targeted, ignoring fluids
|
||||||
@ -125,7 +155,9 @@ index c80e75b72ac863db19e3d234e349876dd8797924..c29846df0469535870e1743eee25325a
|
|||||||
+ * @param maxDistance this is the maximum distance to scan
|
+ * @param maxDistance this is the maximum distance to scan
|
||||||
+ * @return TargetBlockInfo about the block the living entity has targeted,
|
+ * @return TargetBlockInfo about the block the living entity has targeted,
|
||||||
+ * or null if no block is targeted
|
+ * or null if no block is targeted
|
||||||
|
+ * @deprecated use {@link #rayTraceBlocks(double)}
|
||||||
+ */
|
+ */
|
||||||
|
+ @Deprecated(forRemoval = true)
|
||||||
+ @Nullable
|
+ @Nullable
|
||||||
+ public default com.destroystokyo.paper.block.TargetBlockInfo getTargetBlockInfo(int maxDistance) {
|
+ public default com.destroystokyo.paper.block.TargetBlockInfo getTargetBlockInfo(int maxDistance) {
|
||||||
+ return getTargetBlockInfo(maxDistance, com.destroystokyo.paper.block.TargetBlockInfo.FluidMode.NEVER);
|
+ return getTargetBlockInfo(maxDistance, com.destroystokyo.paper.block.TargetBlockInfo.FluidMode.NEVER);
|
||||||
@ -138,7 +170,9 @@ index c80e75b72ac863db19e3d234e349876dd8797924..c29846df0469535870e1743eee25325a
|
|||||||
+ * @param fluidMode whether to check fluids or not
|
+ * @param fluidMode whether to check fluids or not
|
||||||
+ * @return TargetBlockInfo about the block the living entity has targeted,
|
+ * @return TargetBlockInfo about the block the living entity has targeted,
|
||||||
+ * or null if no block is targeted
|
+ * or null if no block is targeted
|
||||||
|
+ * @deprecated use {@link #rayTraceBlocks(double, FluidCollisionMode)}
|
||||||
+ */
|
+ */
|
||||||
|
+ @Deprecated(forRemoval = true)
|
||||||
+ @Nullable
|
+ @Nullable
|
||||||
+ public com.destroystokyo.paper.block.TargetBlockInfo getTargetBlockInfo(int maxDistance, @NotNull com.destroystokyo.paper.block.TargetBlockInfo.FluidMode fluidMode);
|
+ public com.destroystokyo.paper.block.TargetBlockInfo getTargetBlockInfo(int maxDistance, @NotNull com.destroystokyo.paper.block.TargetBlockInfo.FluidMode fluidMode);
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add LivingEntity#getTargetEntity
|
|||||||
|
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/entity/TargetEntityInfo.java b/src/main/java/com/destroystokyo/paper/entity/TargetEntityInfo.java
|
diff --git a/src/main/java/com/destroystokyo/paper/entity/TargetEntityInfo.java b/src/main/java/com/destroystokyo/paper/entity/TargetEntityInfo.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..f52644fab1522bdf83ff4f489e9805b274421094
|
index 0000000000000000000000000000000000000000..af8765b213390cf75fe02a6eb68aecf7a06d5acf
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/entity/TargetEntityInfo.java
|
+++ b/src/main/java/com/destroystokyo/paper/entity/TargetEntityInfo.java
|
||||||
@@ -0,0 +1,38 @@
|
@@ -0,0 +1,40 @@
|
||||||
+package com.destroystokyo.paper.entity;
|
+package com.destroystokyo.paper.entity;
|
||||||
+
|
+
|
||||||
+import org.bukkit.entity.Entity;
|
+import org.bukkit.entity.Entity;
|
||||||
@ -18,7 +18,9 @@ index 0000000000000000000000000000000000000000..f52644fab1522bdf83ff4f489e9805b2
|
|||||||
+
|
+
|
||||||
+/**
|
+/**
|
||||||
+ * Represents information about a targeted entity
|
+ * Represents information about a targeted entity
|
||||||
|
+ * @deprecated use {@link org.bukkit.util.RayTraceResult}
|
||||||
+ */
|
+ */
|
||||||
|
+@Deprecated(forRemoval = true)
|
||||||
+public class TargetEntityInfo {
|
+public class TargetEntityInfo {
|
||||||
+ private final Entity entity;
|
+ private final Entity entity;
|
||||||
+ private final Vector hitVec;
|
+ private final Vector hitVec;
|
||||||
@ -49,11 +51,11 @@ index 0000000000000000000000000000000000000000..f52644fab1522bdf83ff4f489e9805b2
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||||
index c29846df0469535870e1743eee25325a4f092a6d..63b39fe0f2c8c529e289c69969588a98dd7fc758 100644
|
index 70c0512a5875533c9b8ce7a1b21cc799772c5ef4..98484c748db12dbdcdbe456befa30ad87864420b 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||||
@@ -152,6 +152,50 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
@@ -173,6 +173,77 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||||
*/
|
@Deprecated(forRemoval = true)
|
||||||
@Nullable
|
@Nullable
|
||||||
public com.destroystokyo.paper.block.TargetBlockInfo getTargetBlockInfo(int maxDistance, @NotNull com.destroystokyo.paper.block.TargetBlockInfo.FluidMode fluidMode);
|
public com.destroystokyo.paper.block.TargetBlockInfo getTargetBlockInfo(int maxDistance, @NotNull com.destroystokyo.paper.block.TargetBlockInfo.FluidMode fluidMode);
|
||||||
+
|
+
|
||||||
@ -84,7 +86,9 @@ index c29846df0469535870e1743eee25325a4f092a6d..63b39fe0f2c8c529e289c69969588a98
|
|||||||
+ * @param maxDistance this is the maximum distance to scan
|
+ * @param maxDistance this is the maximum distance to scan
|
||||||
+ * @return TargetEntityInfo about the entity being targeted,
|
+ * @return TargetEntityInfo about the entity being targeted,
|
||||||
+ * or null if no entity is targeted
|
+ * or null if no entity is targeted
|
||||||
|
+ * @deprecated use {@link #rayTraceEntities(int)}
|
||||||
+ */
|
+ */
|
||||||
|
+ @Deprecated(forRemoval = true)
|
||||||
+ @Nullable
|
+ @Nullable
|
||||||
+ public default com.destroystokyo.paper.entity.TargetEntityInfo getTargetEntityInfo(int maxDistance) {
|
+ public default com.destroystokyo.paper.entity.TargetEntityInfo getTargetEntityInfo(int maxDistance) {
|
||||||
+ return getTargetEntityInfo(maxDistance, false);
|
+ return getTargetEntityInfo(maxDistance, false);
|
||||||
@ -94,12 +98,37 @@ index c29846df0469535870e1743eee25325a4f092a6d..63b39fe0f2c8c529e289c69969588a98
|
|||||||
+ * Gets information about the entity being targeted
|
+ * Gets information about the entity being targeted
|
||||||
+ *
|
+ *
|
||||||
+ * @param maxDistance this is the maximum distance to scan
|
+ * @param maxDistance this is the maximum distance to scan
|
||||||
+ * @param ignoreBlocks true to scan through blocks
|
+ * @return RayTraceResult about the entity being targeted,
|
||||||
+ * @return TargetEntityInfo about the entity being targeted,
|
|
||||||
+ * or null if no entity is targeted
|
+ * or null if no entity is targeted
|
||||||
+ */
|
+ */
|
||||||
+ @Nullable
|
+ @Nullable
|
||||||
|
+ default RayTraceResult rayTraceEntities(int maxDistance) {
|
||||||
|
+ return this.rayTraceEntities(maxDistance, false);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
|
+ * Gets information about the entity being targeted
|
||||||
|
+ *
|
||||||
|
+ * @param maxDistance this is the maximum distance to scan
|
||||||
|
+ * @param ignoreBlocks true to scan through blocks
|
||||||
|
+ * @return TargetEntityInfo about the entity being targeted,
|
||||||
|
+ * or null if no entity is targeted
|
||||||
|
+ * @deprecated use {@link #rayTraceEntities(int, boolean)}
|
||||||
|
+ */
|
||||||
|
+ @Deprecated(forRemoval = true)
|
||||||
|
+ @Nullable
|
||||||
+ public com.destroystokyo.paper.entity.TargetEntityInfo getTargetEntityInfo(int maxDistance, boolean ignoreBlocks);
|
+ public com.destroystokyo.paper.entity.TargetEntityInfo getTargetEntityInfo(int maxDistance, boolean ignoreBlocks);
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
|
+ * Gets information about the entity being targeted
|
||||||
|
+ *
|
||||||
|
+ * @param maxDistance this is the maximum distance to scan
|
||||||
|
+ * @param ignoreBlocks true to scan through blocks
|
||||||
|
+ * @return RayTraceResult about the entity being targeted,
|
||||||
|
+ * or null if no entity is targeted
|
||||||
|
+ */
|
||||||
|
+ @Nullable
|
||||||
|
+ RayTraceResult rayTraceEntities(int maxDistance, boolean ignoreBlocks);
|
||||||
// Paper end
|
// Paper end
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -57,10 +57,10 @@ index 0000000000000000000000000000000000000000..f0067c2e953d18e1a33536980071ba3f
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||||
index 63b39fe0f2c8c529e289c69969588a98dd7fc758..54046c5810f9f6f3f28e815a210617683139509d 100644
|
index 98484c748db12dbdcdbe456befa30ad87864420b..3618a138a602fde4d3f045e9982dd95c0376b30d 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||||
@@ -878,5 +878,25 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
@@ -926,5 +926,25 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||||
*/
|
*/
|
||||||
@NotNull
|
@NotNull
|
||||||
org.bukkit.inventory.EquipmentSlot getHandRaised();
|
org.bukkit.inventory.EquipmentSlot getHandRaised();
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add playPickupItemAnimation to LivingEntity
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||||
index 54046c5810f9f6f3f28e815a210617683139509d..2c559c590b96753aa5dc2db2bacca32d8afad352 100644
|
index 3618a138a602fde4d3f045e9982dd95c0376b30d..4b2bbeebe724682a53850f92872169d7cfbeb552 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||||
@@ -898,5 +898,28 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
@@ -946,5 +946,28 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||||
* @param jumping entity jump state
|
* @param jumping entity jump state
|
||||||
*/
|
*/
|
||||||
void setJumping(boolean jumping);
|
void setJumping(boolean jumping);
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add LivingEntity#clearActiveItem
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||||
index 2c559c590b96753aa5dc2db2bacca32d8afad352..8375cbdb79e82afebbcc18f85e874238f18cda50 100644
|
index 4b2bbeebe724682a53850f92872169d7cfbeb552..f52c7d2ac653dde284de8d83ebe034afa2cde90a 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||||
@@ -849,6 +849,13 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
@@ -897,6 +897,13 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||||
@NotNull
|
@NotNull
|
||||||
org.bukkit.inventory.ItemStack getActiveItem();
|
org.bukkit.inventory.ItemStack getActiveItem();
|
||||||
|
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Expose LivingEntity hurt direction
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||||
index 8375cbdb79e82afebbcc18f85e874238f18cda50..a6c0b5e55adadd78619d251d979e9e46068a637e 100644
|
index f52c7d2ac653dde284de8d83ebe034afa2cde90a..f44f510b3194c9716ec59caa195f83dde2b2773a 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||||
@@ -928,5 +928,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
@@ -976,5 +976,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||||
* @param quantity quantity of item
|
* @param quantity quantity of item
|
||||||
*/
|
*/
|
||||||
void playPickupItemAnimation(@NotNull Item item, int quantity);
|
void playPickupItemAnimation(@NotNull Item item, int quantity);
|
||||||
|
@ -23,10 +23,10 @@ index aa534b1a9a1fb84a2fbd4b372f313bb4b63325fa..43b53c21af01e0f496c8aaacff82dfdf
|
|||||||
// Paper end
|
// Paper end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||||
index a6c0b5e55adadd78619d251d979e9e46068a637e..d47706a915ae1bfaa3187a83cb6d35ea202c03d0 100644
|
index f44f510b3194c9716ec59caa195f83dde2b2773a..21ca1df6b484390a644d1f0894ebcac0080ff570 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||||
@@ -484,6 +484,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
@@ -532,6 +532,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||||
*/
|
*/
|
||||||
public boolean hasLineOfSight(@NotNull Entity other);
|
public boolean hasLineOfSight(@NotNull Entity other);
|
||||||
|
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Stinger API
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||||
index d47706a915ae1bfaa3187a83cb6d35ea202c03d0..4af5e8d0cba6555f7615e4e809d9aff221c0dc4d 100644
|
index 21ca1df6b484390a644d1f0894ebcac0080ff570..6f7483a86b713b7b85e595f55b167e1547bc4b8e 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||||
@@ -337,6 +337,36 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
@@ -385,6 +385,36 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||||
*/
|
*/
|
||||||
public void setArrowsInBody(int count);
|
public void setArrowsInBody(int count);
|
||||||
|
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add LivingEntity#swingHand(EquipmentSlot) convenience method
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||||
index 4af5e8d0cba6555f7615e4e809d9aff221c0dc4d..435e214af7f09b3f1da078e6517cd14bb5ad2b87 100644
|
index 6f7483a86b713b7b85e595f55b167e1547bc4b8e..475fdef28596cf8454da58d04d4c4153719a4a68 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||||
@@ -985,5 +985,23 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
@@ -1033,5 +1033,23 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||||
* @param hurtDirection hurt direction
|
* @param hurtDirection hurt direction
|
||||||
*/
|
*/
|
||||||
void setHurtDirection(float hurtDirection);
|
void setHurtDirection(float hurtDirection);
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add entity knockback API
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||||
index 435e214af7f09b3f1da078e6517cd14bb5ad2b87..3bd1d100d0c481ae7edaa251869640ab370aeb42 100644
|
index 475fdef28596cf8454da58d04d4c4153719a4a68..1999cd1b1aaa23589da4e11cf80139b8e7a2a539 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||||
@@ -1003,5 +1003,17 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
@@ -1051,5 +1051,17 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||||
this.swingOffHand();
|
this.swingOffHand();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,10 +8,10 @@ to simulate damage done to an itemstack and all
|
|||||||
the logic associated with damaging them
|
the logic associated with damaging them
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||||
index 3bd1d100d0c481ae7edaa251869640ab370aeb42..f6cbada38ca48638e5ad0bd99d0b6ea65f6b02de 100644
|
index 1999cd1b1aaa23589da4e11cf80139b8e7a2a539..c27aaec51ae4de593da4443e1e8a773e1b59aafa 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||||
@@ -1015,5 +1015,48 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
@@ -1063,5 +1063,48 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||||
* @param directionZ The relative z position of the knockback source direction
|
* @param directionZ The relative z position of the knockback source direction
|
||||||
*/
|
*/
|
||||||
void knockback(double strength, double directionX, double directionZ);
|
void knockback(double strength, double directionX, double directionZ);
|
||||||
|
@ -4,40 +4,14 @@ Date: Mon, 3 Sep 2018 18:20:03 -0500
|
|||||||
Subject: [PATCH] Add ray tracing methods to LivingEntity
|
Subject: [PATCH] Add ray tracing methods to LivingEntity
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/io/papermc/paper/util/MCUtil.java b/src/main/java/io/papermc/paper/util/MCUtil.java
|
|
||||||
index b19850ae31f6c796cb3491dd5070d28e0ffd242c..30a5484d0209e7b99e81b70f654f525103471eb8 100644
|
|
||||||
--- a/src/main/java/io/papermc/paper/util/MCUtil.java
|
|
||||||
+++ b/src/main/java/io/papermc/paper/util/MCUtil.java
|
|
||||||
@@ -510,6 +510,18 @@ public final class MCUtil {
|
|
||||||
return getNMSWorld(entity.getWorld());
|
|
||||||
}
|
|
||||||
|
|
||||||
+ public static ClipContext.Fluid getNMSFluidCollisionOption(com.destroystokyo.paper.block.TargetBlockInfo.FluidMode fluidMode) {
|
|
||||||
+ switch (fluidMode) {
|
|
||||||
+ case NEVER:
|
|
||||||
+ return ClipContext.Fluid.NONE;
|
|
||||||
+ case SOURCE_ONLY:
|
|
||||||
+ return ClipContext.Fluid.SOURCE_ONLY;
|
|
||||||
+ case ALWAYS:
|
|
||||||
+ return ClipContext.Fluid.ANY;
|
|
||||||
+ }
|
|
||||||
+ return null;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
public static BlockFace toBukkitBlockFace(Direction enumDirection) {
|
|
||||||
switch (enumDirection) {
|
|
||||||
case DOWN:
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
index 677ba704c32e590f3298575b1cc060bb69414ca4..d825dd9a990f52e378755e86c02c6a35f3bb3659 100644
|
index 677ba704c32e590f3298575b1cc060bb69414ca4..dc78b04128c5eb2375a049948133aa05fff2c022 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
@@ -3772,6 +3772,23 @@ public abstract class LivingEntity extends Entity {
|
@@ -3772,6 +3772,20 @@ public abstract class LivingEntity extends Entity {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Paper start
|
// Paper start
|
||||||
+ public HitResult getRayTrace(int maxDistance) {
|
|
||||||
+ return getRayTrace(maxDistance, ClipContext.Fluid.NONE);
|
|
||||||
+ }
|
|
||||||
+
|
+
|
||||||
+ public HitResult getRayTrace(int maxDistance, ClipContext.Fluid fluidCollisionOption) {
|
+ public HitResult getRayTrace(int maxDistance, ClipContext.Fluid fluidCollisionOption) {
|
||||||
+ if (maxDistance < 1 || maxDistance > 120) {
|
+ if (maxDistance < 1 || maxDistance > 120) {
|
||||||
@ -56,32 +30,37 @@ index 677ba704c32e590f3298575b1cc060bb69414ca4..d825dd9a990f52e378755e86c02c6a35
|
|||||||
|
|
||||||
public int getShieldBlockingDelay() {
|
public int getShieldBlockingDelay() {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
index 04829ced2048b07aa4b2dcf98a601d1fdd9431fb..6c5cb2e5fb1f5bb7eb05a465a24d62e1dad57b93 100644
|
index 04829ced2048b07aa4b2dcf98a601d1fdd9431fb..76c66e3533779a966d164637bac0c66415605b2c 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
@@ -200,6 +200,28 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
@@ -200,6 +200,33 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||||
return blocks.get(0);
|
return blocks.get(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public Block getTargetBlock(int maxDistance, com.destroystokyo.paper.block.TargetBlockInfo.FluidMode fluidMode) {
|
+ public Block getTargetBlock(int maxDistance, com.destroystokyo.paper.block.TargetBlockInfo.FluidMode fluidMode) {
|
||||||
+ net.minecraft.world.phys.HitResult rayTrace = getHandle().getRayTrace(maxDistance, io.papermc.paper.util.MCUtil.getNMSFluidCollisionOption(fluidMode));
|
+ return this.getTargetBlockExact(maxDistance, fluidMode.bukkit);
|
||||||
+ return !(rayTrace instanceof net.minecraft.world.phys.BlockHitResult) ? null : org.bukkit.craftbukkit.block.CraftBlock.at(getHandle().level, ((net.minecraft.world.phys.BlockHitResult)rayTrace).getBlockPos());
|
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public org.bukkit.block.BlockFace getTargetBlockFace(int maxDistance, com.destroystokyo.paper.block.TargetBlockInfo.FluidMode fluidMode) {
|
+ public org.bukkit.block.BlockFace getTargetBlockFace(int maxDistance, com.destroystokyo.paper.block.TargetBlockInfo.FluidMode fluidMode) {
|
||||||
+ net.minecraft.world.phys.HitResult rayTrace = getHandle().getRayTrace(maxDistance, io.papermc.paper.util.MCUtil.getNMSFluidCollisionOption(fluidMode));
|
+ return this.getTargetBlockFace(maxDistance, fluidMode.bukkit);
|
||||||
+ return !(rayTrace instanceof net.minecraft.world.phys.BlockHitResult) ? null : io.papermc.paper.util.MCUtil.toBukkitBlockFace(((net.minecraft.world.phys.BlockHitResult)rayTrace).getDirection());
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public org.bukkit.block.BlockFace getTargetBlockFace(int maxDistance, org.bukkit.FluidCollisionMode fluidMode) {
|
||||||
|
+ RayTraceResult result = this.rayTraceBlocks(maxDistance, fluidMode);
|
||||||
|
+ return result != null ? result.getHitBlockFace() : null;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public com.destroystokyo.paper.block.TargetBlockInfo getTargetBlockInfo(int maxDistance, com.destroystokyo.paper.block.TargetBlockInfo.FluidMode fluidMode) {
|
+ public com.destroystokyo.paper.block.TargetBlockInfo getTargetBlockInfo(int maxDistance, com.destroystokyo.paper.block.TargetBlockInfo.FluidMode fluidMode) {
|
||||||
+ net.minecraft.world.phys.HitResult rayTrace = getHandle().getRayTrace(maxDistance, io.papermc.paper.util.MCUtil.getNMSFluidCollisionOption(fluidMode));
|
+ RayTraceResult result = this.rayTraceBlocks(maxDistance, fluidMode.bukkit);
|
||||||
+ return !(rayTrace instanceof net.minecraft.world.phys.BlockHitResult) ? null :
|
+ if (result != null && result.getHitBlock() != null && result.getHitBlockFace() != null) {
|
||||||
+ new com.destroystokyo.paper.block.TargetBlockInfo(org.bukkit.craftbukkit.block.CraftBlock.at(getHandle().level, ((net.minecraft.world.phys.BlockHitResult)rayTrace).getBlockPos()),
|
+ return new com.destroystokyo.paper.block.TargetBlockInfo(result.getHitBlock(), result.getHitBlockFace());
|
||||||
+ io.papermc.paper.util.MCUtil.toBukkitBlockFace(((net.minecraft.world.phys.BlockHitResult)rayTrace).getDirection()));
|
+ }
|
||||||
|
+ return null;
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
+
|
+
|
||||||
|
@ -13,7 +13,7 @@ Shulkers) may need to be changed in order for it to re-save properly
|
|||||||
No more crashing though.
|
No more crashing though.
|
||||||
|
|
||||||
diff --git a/src/main/java/io/papermc/paper/util/MCUtil.java b/src/main/java/io/papermc/paper/util/MCUtil.java
|
diff --git a/src/main/java/io/papermc/paper/util/MCUtil.java b/src/main/java/io/papermc/paper/util/MCUtil.java
|
||||||
index 30a5484d0209e7b99e81b70f654f525103471eb8..dacb00c7cb2702ae8e9c6be61ca08e41bd6009e4 100644
|
index b19850ae31f6c796cb3491dd5070d28e0ffd242c..d1a59c2af0557a816c094983ec60097fb4de060c 100644
|
||||||
--- a/src/main/java/io/papermc/paper/util/MCUtil.java
|
--- a/src/main/java/io/papermc/paper/util/MCUtil.java
|
||||||
+++ b/src/main/java/io/papermc/paper/util/MCUtil.java
|
+++ b/src/main/java/io/papermc/paper/util/MCUtil.java
|
||||||
@@ -14,6 +14,8 @@ import it.unimi.dsi.fastutil.objects.ReferenceArrayList;
|
@@ -14,6 +14,8 @@ import it.unimi.dsi.fastutil.objects.ReferenceArrayList;
|
||||||
@ -25,7 +25,7 @@ index 30a5484d0209e7b99e81b70f654f525103471eb8..dacb00c7cb2702ae8e9c6be61ca08e41
|
|||||||
import net.minecraft.server.level.ChunkHolder;
|
import net.minecraft.server.level.ChunkHolder;
|
||||||
import net.minecraft.server.level.ChunkMap;
|
import net.minecraft.server.level.ChunkMap;
|
||||||
import net.minecraft.server.level.DistanceManager;
|
import net.minecraft.server.level.DistanceManager;
|
||||||
@@ -541,6 +543,21 @@ public final class MCUtil {
|
@@ -529,6 +531,21 @@ public final class MCUtil {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add LivingEntity#getTargetEntity
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
index 785d5196c7e6de95e0507c959352ba57fb50d1c4..2c804ef89d910f706c449b4ce540ed1be3ac242a 100644
|
index d9b2f2e230abd3ee5b7d77c76472a86cb38255a4..03004dbb8ab4cdb982ea2f6d7464258d025ff411 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
@@ -117,6 +117,7 @@ import net.minecraft.world.level.storage.loot.LootTable;
|
@@ -117,6 +117,7 @@ import net.minecraft.world.level.storage.loot.LootTable;
|
||||||
@ -16,11 +16,11 @@ index 785d5196c7e6de95e0507c959352ba57fb50d1c4..2c804ef89d910f706c449b4ce540ed1b
|
|||||||
import net.minecraft.world.phys.HitResult;
|
import net.minecraft.world.phys.HitResult;
|
||||||
import net.minecraft.world.phys.Vec3;
|
import net.minecraft.world.phys.Vec3;
|
||||||
import net.minecraft.world.scores.PlayerTeam;
|
import net.minecraft.world.scores.PlayerTeam;
|
||||||
@@ -3835,6 +3836,38 @@ public abstract class LivingEntity extends Entity {
|
@@ -3832,6 +3833,38 @@ public abstract class LivingEntity extends Entity {
|
||||||
return level.clip(raytrace);
|
return level.clip(raytrace);
|
||||||
}
|
}
|
||||||
|
|
||||||
+ public EntityHitResult getTargetEntity(int maxDistance) {
|
+ public @Nullable EntityHitResult getTargetEntity(int maxDistance) {
|
||||||
+ if (maxDistance < 1 || maxDistance > 120) {
|
+ if (maxDistance < 1 || maxDistance > 120) {
|
||||||
+ throw new IllegalArgumentException("maxDistance must be between 1-120");
|
+ throw new IllegalArgumentException("maxDistance must be between 1-120");
|
||||||
+ }
|
+ }
|
||||||
@ -56,7 +56,7 @@ index 785d5196c7e6de95e0507c959352ba57fb50d1c4..2c804ef89d910f706c449b4ce540ed1b
|
|||||||
|
|
||||||
public int getShieldBlockingDelay() {
|
public int getShieldBlockingDelay() {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
index 6c5cb2e5fb1f5bb7eb05a465a24d62e1dad57b93..bfa6b088f87117015791dc4ab25d8e8cf4c4cf28 100644
|
index 76c66e3533779a966d164637bac0c66415605b2c..0bdb8a887ac159c58ec39d4aaa56cef404eaa6b2 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
@@ -1,5 +1,6 @@
|
@@ -1,5 +1,6 @@
|
||||||
@ -66,9 +66,9 @@ index 6c5cb2e5fb1f5bb7eb05a465a24d62e1dad57b93..bfa6b088f87117015791dc4ab25d8e8c
|
|||||||
import com.google.common.base.Preconditions;
|
import com.google.common.base.Preconditions;
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -220,6 +221,33 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
@@ -225,6 +226,39 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||||
new com.destroystokyo.paper.block.TargetBlockInfo(org.bukkit.craftbukkit.block.CraftBlock.at(getHandle().level, ((net.minecraft.world.phys.BlockHitResult)rayTrace).getBlockPos()),
|
}
|
||||||
io.papermc.paper.util.MCUtil.toBukkitBlockFace(((net.minecraft.world.phys.BlockHitResult)rayTrace).getDirection()));
|
return null;
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ public Entity getTargetEntity(int maxDistance, boolean ignoreBlocks) {
|
+ public Entity getTargetEntity(int maxDistance, boolean ignoreBlocks) {
|
||||||
@ -81,6 +81,12 @@ index 6c5cb2e5fb1f5bb7eb05a465a24d62e1dad57b93..bfa6b088f87117015791dc4ab25d8e8c
|
|||||||
+ return rayTrace == null ? null : new TargetEntityInfo(rayTrace.getEntity().getBukkitEntity(), new org.bukkit.util.Vector(rayTrace.getLocation().x, rayTrace.getLocation().y, rayTrace.getLocation().z));
|
+ return rayTrace == null ? null : new TargetEntityInfo(rayTrace.getEntity().getBukkitEntity(), new org.bukkit.util.Vector(rayTrace.getLocation().x, rayTrace.getLocation().y, rayTrace.getLocation().z));
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public RayTraceResult rayTraceEntities(int maxDistance, boolean ignoreBlocks) {
|
||||||
|
+ net.minecraft.world.phys.EntityHitResult rayTrace = this.rayTraceEntity(maxDistance, ignoreBlocks);
|
||||||
|
+ return rayTrace == null ? null : new org.bukkit.util.RayTraceResult(org.bukkit.craftbukkit.util.CraftVector.toBukkit(rayTrace.getLocation()), rayTrace.getEntity().getBukkitEntity());
|
||||||
|
+ }
|
||||||
|
+
|
||||||
+ public net.minecraft.world.phys.EntityHitResult rayTraceEntity(int maxDistance, boolean ignoreBlocks) {
|
+ public net.minecraft.world.phys.EntityHitResult rayTraceEntity(int maxDistance, boolean ignoreBlocks) {
|
||||||
+ net.minecraft.world.phys.EntityHitResult rayTrace = getHandle().getTargetEntity(maxDistance);
|
+ net.minecraft.world.phys.EntityHitResult rayTrace = getHandle().getTargetEntity(maxDistance);
|
||||||
+ if (rayTrace == null) {
|
+ if (rayTrace == null) {
|
||||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Entity Jump API
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
index 840fb46729b940b6d4d7adb4d0545b5a8508e11b..37b1354edb2974e82eaa5c859f58c588df70c575 100644
|
index dbc412d7ea8c7e22557e4e03520ec89994a42e26..8b7a9a607b3919543a47a14147bfbfad250d4b46 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
@@ -3264,8 +3264,10 @@ public abstract class LivingEntity extends Entity {
|
@@ -3264,8 +3264,10 @@ public abstract class LivingEntity extends Entity {
|
||||||
@ -48,10 +48,10 @@ index 8517fd004727b083545082a5de26b11cb2a93623..23cd2e1faf0d7b59885e194fc0f0adc5
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
index bfa6b088f87117015791dc4ab25d8e8cf4c4cf28..efaf058e6d56f6aed29541e77da46fef058c496a 100644
|
index 0bdb8a887ac159c58ec39d4aaa56cef404eaa6b2..194c6a9accc21bfb2f446b2a2c3a8a4ee7c3a479 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
@@ -870,5 +870,19 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
@@ -881,5 +881,19 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||||
public org.bukkit.inventory.EquipmentSlot getHandRaised() {
|
public org.bukkit.inventory.EquipmentSlot getHandRaised() {
|
||||||
return getHandle().getUsedItemHand() == net.minecraft.world.InteractionHand.MAIN_HAND ? org.bukkit.inventory.EquipmentSlot.HAND : org.bukkit.inventory.EquipmentSlot.OFF_HAND;
|
return getHandle().getUsedItemHand() == net.minecraft.world.InteractionHand.MAIN_HAND ? org.bukkit.inventory.EquipmentSlot.HAND : org.bukkit.inventory.EquipmentSlot.OFF_HAND;
|
||||||
}
|
}
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix PotionEffect ignores icon flag
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
index efaf058e6d56f6aed29541e77da46fef058c496a..b9c3683fca1ac85d8f18ab7629a51836248169ca 100644
|
index 194c6a9accc21bfb2f446b2a2c3a8a4ee7c3a479..57e839a5582d3d0219fcf670afbb3e4b36dcd19c 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
@@ -414,7 +414,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
@@ -425,7 +425,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean addPotionEffect(PotionEffect effect, boolean force) {
|
public boolean addPotionEffect(PotionEffect effect, boolean force) {
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add playPickupItemAnimation to LivingEntity
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
index b9c3683fca1ac85d8f18ab7629a51836248169ca..128db5db4b15b933520f2e864be4d8f7a5c845af 100644
|
index 57e839a5582d3d0219fcf670afbb3e4b36dcd19c..c5657b6f8c7a9f6605d22bed0a5faec288eb8d6d 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
@@ -884,5 +884,10 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
@@ -895,5 +895,10 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||||
((Mob) getHandle()).getJumpControl().jump();
|
((Mob) getHandle()).getJumpControl().jump();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add LivingEntity#clearActiveItem
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
index 128db5db4b15b933520f2e864be4d8f7a5c845af..491ff045779a25ec105e5fc9440bb9d395f92f10 100644
|
index c5657b6f8c7a9f6605d22bed0a5faec288eb8d6d..c789cefb61270c7e52ddea7efd433fa6c0e63fda 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
@@ -851,6 +851,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
@@ -862,6 +862,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||||
return getHandle().getUseItem().asBukkitMirror();
|
return getHandle().getUseItem().asBukkitMirror();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Expose LivingEntity hurt direction
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
index 491ff045779a25ec105e5fc9440bb9d395f92f10..6d2acbe95f5ebe41c82d1e99c28f15a46b65a9db 100644
|
index c789cefb61270c7e52ddea7efd433fa6c0e63fda..8c15517e3602f815819c44136adec3c09d70a71b 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
@@ -896,5 +896,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
@@ -907,5 +907,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||||
public void playPickupItemAnimation(org.bukkit.entity.Item item, int quantity) {
|
public void playPickupItemAnimation(org.bukkit.entity.Item item, int quantity) {
|
||||||
getHandle().take(((CraftItem) item).getHandle(), quantity);
|
getHandle().take(((CraftItem) item).getHandle(), quantity);
|
||||||
}
|
}
|
||||||
|
@ -41,10 +41,10 @@ index 233e372ba5d785352c9ac12dac37395bac63315c..0e61caa5c9f21788fbeaa90ed75d23e1
|
|||||||
return BuiltInRegistries.ATTRIBUTE.get(CraftNamespacedKey.toMinecraft(attribute.getKey()));
|
return BuiltInRegistries.ATTRIBUTE.get(CraftNamespacedKey.toMinecraft(attribute.getKey()));
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
index 6d2acbe95f5ebe41c82d1e99c28f15a46b65a9db..c3d701f58feb503aa073b30df3999e0c7a081a6a 100644
|
index 8c15517e3602f815819c44136adec3c09d70a71b..3f349f3ac972c90412cd20a30ccb55598c8cf7ba 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
@@ -688,6 +688,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
@@ -699,6 +699,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||||
return this.getHandle().craftAttributes.getAttribute(attribute);
|
return this.getHandle().craftAttributes.getAttribute(attribute);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,10 +66,10 @@ index 57decf4156f176ebcc988478c17856cbc555c5e4..3d0ce0803e1da8a2681a3cb41096ac94
|
|||||||
|
|
||||||
public net.minecraft.world.item.enchantment.Enchantment getHandle() {
|
public net.minecraft.world.item.enchantment.Enchantment getHandle() {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
index c3d701f58feb503aa073b30df3999e0c7a081a6a..77dd873eb5d28e83c3a9d8053ae4eaed848df1c5 100644
|
index 3f349f3ac972c90412cd20a30ccb55598c8cf7ba..f4a219ba563aa153ae26128fe4e49ddc03fecc44 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
@@ -913,5 +913,21 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
@@ -924,5 +924,21 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||||
public void setHurtDirection(float hurtDirection) {
|
public void setHurtDirection(float hurtDirection) {
|
||||||
getHandle().hurtDir = hurtDirection;
|
getHandle().hurtDir = hurtDirection;
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Line Of Sight Changes
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
index 5690e6447209f0a74806ce1193dfa36b21042c9f..97e8d9568f21888bc6b92fe7a8544372c8d0db71 100644
|
index 485888bc3e85054c4452c7abd70c65f997b26479..8e8906679c3d814e62740f0a31bc756eb8b634fc 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
@@ -3542,7 +3542,8 @@ public abstract class LivingEntity extends Entity {
|
@@ -3542,7 +3542,8 @@ public abstract class LivingEntity extends Entity {
|
||||||
@ -40,7 +40,7 @@ index 6c627e3f2c34557e11232fb0c5fa4f1718018ef5..e5684294b2d71c4496a47e72afe41b8a
|
|||||||
// Paper end
|
// Paper end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
index 77dd873eb5d28e83c3a9d8053ae4eaed848df1c5..cac821ce75f80c9fc51935415ccb840ff5887664 100644
|
index f4a219ba563aa153ae26128fe4e49ddc03fecc44..ba8b98f1a4b4c8865385033307dc0e7486d597be 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
@@ -29,6 +29,9 @@ import net.minecraft.world.entity.projectile.ThrownEgg;
|
@@ -29,6 +29,9 @@ import net.minecraft.world.entity.projectile.ThrownEgg;
|
||||||
@ -53,7 +53,7 @@ index 77dd873eb5d28e83c3a9d8053ae4eaed848df1c5..cac821ce75f80c9fc51935415ccb840f
|
|||||||
import org.apache.commons.lang.Validate;
|
import org.apache.commons.lang.Validate;
|
||||||
import org.bukkit.FluidCollisionMode;
|
import org.bukkit.FluidCollisionMode;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
@@ -559,6 +562,18 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
@@ -570,6 +573,18 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||||
return this.getHandle().hasLineOfSight(((CraftEntity) other).getHandle());
|
return this.getHandle().hasLineOfSight(((CraftEntity) other).getHandle());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Stinger API
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
index cac821ce75f80c9fc51935415ccb840ff5887664..b31cad6e5de47531736c0195d9160afb328595e7 100644
|
index ba8b98f1a4b4c8865385033307dc0e7486d597be..244123cd98171dcd8ea9e34b32d5ba8c2bd6b7f8 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
@@ -323,7 +323,28 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
@@ -334,7 +334,28 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||||
Preconditions.checkArgument(count >= 0, "New arrow amount must be >= 0");
|
Preconditions.checkArgument(count >= 0, "New arrow amount must be >= 0");
|
||||||
this.getHandle().getEntityData().set(net.minecraft.world.entity.LivingEntity.DATA_ARROW_COUNT_ID, count);
|
this.getHandle().getEntityData().set(net.minecraft.world.entity.LivingEntity.DATA_ARROW_COUNT_ID, count);
|
||||||
}
|
}
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add a consumer parameter to ProjectileSource#launchProjectile
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
index b31cad6e5de47531736c0195d9160afb328595e7..b3f963499290a0c4fe8991709df2ef414dfff359 100644
|
index 244123cd98171dcd8ea9e34b32d5ba8c2bd6b7f8..a4d916fcb12da37f9b75e844346578c160abea96 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
@@ -482,8 +482,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
@@ -493,8 +493,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -25,7 +25,7 @@ index b31cad6e5de47531736c0195d9160afb328595e7..b3f963499290a0c4fe8991709df2ef41
|
|||||||
Preconditions.checkState(!this.getHandle().generation, "Cannot launch projectile during world generation");
|
Preconditions.checkState(!this.getHandle().generation, "Cannot launch projectile during world generation");
|
||||||
|
|
||||||
net.minecraft.world.level.Level world = ((CraftWorld) getWorld()).getHandle();
|
net.minecraft.world.level.Level world = ((CraftWorld) getWorld()).getHandle();
|
||||||
@@ -566,6 +573,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
@@ -577,6 +584,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||||
if (velocity != null) {
|
if (velocity != null) {
|
||||||
((T) launch.getBukkitEntity()).setVelocity(velocity);
|
((T) launch.getBukkitEntity()).setVelocity(velocity);
|
||||||
}
|
}
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add entity knockback API
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
index b3f963499290a0c4fe8991709df2ef414dfff359..76ee8adfb6cccc15dde748b0796d1de7fc5507f8 100644
|
index a4d916fcb12da37f9b75e844346578c160abea96..3076831b3d26c6dd3bf0c0d0618151ce6ad0df82 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
@@ -977,5 +977,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
@@ -988,5 +988,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||||
}
|
}
|
||||||
throw new IllegalArgumentException(entityCategory + " is an unrecognized entity category");
|
throw new IllegalArgumentException(entityCategory + " is an unrecognized entity category");
|
||||||
}
|
}
|
||||||
|
@ -11,10 +11,10 @@ the logic associated with damaging them
|
|||||||
public net.minecraft.world.entity.LivingEntity entityEventForEquipmentBreak(Lnet/minecraft/world/entity/EquipmentSlot;)B
|
public net.minecraft.world.entity.LivingEntity entityEventForEquipmentBreak(Lnet/minecraft/world/entity/EquipmentSlot;)B
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
index 76ee8adfb6cccc15dde748b0796d1de7fc5507f8..fa2e865324c11b724c351cdf8c03bfc4c8a274f6 100644
|
index 3076831b3d26c6dd3bf0c0d0618151ce6ad0df82..fe9f52176d87944ac5743dced8cf4d0576089d06 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
@@ -978,6 +978,53 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
@@ -989,6 +989,53 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||||
throw new IllegalArgumentException(entityCategory + " is an unrecognized entity category");
|
throw new IllegalArgumentException(entityCategory + " is an unrecognized entity category");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Friction API
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
index cf0c087528fc6113a59e38b99fcf11406d1aa87c..9e075de3542bda8ae086c9ca68bcd00b16d565d0 100644
|
index 1274b40a424371b77d8df70ea5f4b2b7300e2a83..864ab97b7a6c62c376ca38dbbc65bc9406dfd62b 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
@@ -265,6 +265,7 @@ public abstract class LivingEntity extends Entity {
|
@@ -265,6 +265,7 @@ public abstract class LivingEntity extends Entity {
|
||||||
@ -132,10 +132,10 @@ index fea44ba6a6584b4a510af6a58cab07eecec6b68b..ecec5e17807a760769fc0ea79c2a0161
|
|||||||
public int getHealth() {
|
public int getHealth() {
|
||||||
return item.health;
|
return item.health;
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
index fa2e865324c11b724c351cdf8c03bfc4c8a274f6..316120a57802c45fb9b02a4daee207a0845c63be 100644
|
index fe9f52176d87944ac5743dced8cf4d0576089d06..09da9d3c85e36c2a78663f58a97963dbc795a367 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
@@ -1025,6 +1025,18 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
@@ -1036,6 +1036,18 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren