Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-15 11:00:06 +01:00
Also apply the "vanished players don't have rights" patch to Fishing Hook entities.
Dieser Commit ist enthalten in:
Ursprung
0d986bbce5
Commit
60136e77fe
@ -1,11 +1,11 @@
|
||||
From c07179e4c0ba3839530a95a6826f2459cc58ebe0 Mon Sep 17 00:00:00 2001
|
||||
From 4c8e5bf4bb19ffc86e578b04deaa1ec1746a0201 Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||
Date: Sat, 7 Mar 2015 19:50:01 -0600
|
||||
Subject: [PATCH] Vanished players don't have rights
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java
|
||||
index 46f6374..6aa8cad 100644
|
||||
index 3a80776..eac0363 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityArrow.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityArrow.java
|
||||
@@ -220,6 +220,14 @@ public class EntityArrow extends Entity implements IProjectile {
|
||||
@ -23,8 +23,27 @@ index 46f6374..6aa8cad 100644
|
||||
if (movingobjectposition != null) {
|
||||
org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this); // CraftBukkit - Call event
|
||||
if (movingobjectposition.entity != null) {
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java
|
||||
index 503e78a..00ffff0 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityFishingHook.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityFishingHook.java
|
||||
@@ -187,6 +187,14 @@ public class EntityFishingHook extends Entity {
|
||||
movingobjectposition = new MovingObjectPosition(entity);
|
||||
}
|
||||
|
||||
+ // PaperSpigot start - Allow fishing hooks to fly through vanished players the shooter can't see
|
||||
+ if (movingobjectposition != null && movingobjectposition.entity instanceof EntityPlayer && owner != null && owner instanceof EntityPlayer) {
|
||||
+ if (!((EntityPlayer) owner).getBukkitEntity().canSee(((EntityPlayer) movingobjectposition.entity).getBukkitEntity())) {
|
||||
+ movingobjectposition = null;
|
||||
+ }
|
||||
+ }
|
||||
+ // PaperSpigot end
|
||||
+
|
||||
if (movingobjectposition != null) {
|
||||
org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this); // Craftbukkit - Call event
|
||||
if (movingobjectposition.entity != null) {
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityProjectile.java b/src/main/java/net/minecraft/server/EntityProjectile.java
|
||||
index d4e5971..fbcb6ac 100644
|
||||
index 72478be..e7cca3c 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityProjectile.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityProjectile.java
|
||||
@@ -147,6 +147,14 @@ public abstract class EntityProjectile extends Entity implements IProjectile {
|
||||
@ -43,7 +62,7 @@ index d4e5971..fbcb6ac 100644
|
||||
if (movingobjectposition.type == MovingObjectPosition.EnumMovingObjectType.BLOCK && this.world.getType(movingobjectposition.a()).getBlock() == Blocks.PORTAL) {
|
||||
this.d(movingobjectposition.a());
|
||||
diff --git a/src/main/java/net/minecraft/server/ItemBlock.java b/src/main/java/net/minecraft/server/ItemBlock.java
|
||||
index 451a0bb..24601c7 100644
|
||||
index 57b3d9d..0cd4175 100644
|
||||
--- a/src/main/java/net/minecraft/server/ItemBlock.java
|
||||
+++ b/src/main/java/net/minecraft/server/ItemBlock.java
|
||||
@@ -25,7 +25,7 @@ public class ItemBlock extends Item {
|
||||
@ -56,7 +75,7 @@ index 451a0bb..24601c7 100644
|
||||
IBlockData iblockdata1 = this.a.getPlacedState(world, blockposition, enumdirection, f, f1, f2, i, entityhuman);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index c9cb7cd..50d4984 100644
|
||||
index bb46799..d184f8a 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -1673,6 +1673,13 @@ public abstract class World implements IBlockAccess {
|
||||
@ -74,5 +93,5 @@ index c9cb7cd..50d4984 100644
|
||||
return false;
|
||||
}
|
||||
--
|
||||
2.4.0.windows.2
|
||||
2.6.3.windows.1
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
From 1140e6e20ae136b79caad18e198f7d552c0ba542 Mon Sep 17 00:00:00 2001
|
||||
From 212022045788f038265c3d8e51e5858e17b56f05 Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||
Date: Sat, 7 Mar 2015 21:00:13 -0600
|
||||
Subject: [PATCH] Configurable fishing time ranges
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java
|
||||
index 503e78a..f7d1539 100644
|
||||
index 00ffff0..df6ce0d 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityFishingHook.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityFishingHook.java
|
||||
@@ -331,7 +331,7 @@ public class EntityFishingHook extends Entity {
|
||||
@@ -339,7 +339,7 @@ public class EntityFishingHook extends Entity {
|
||||
this.ax = MathHelper.nextInt(this.random, 20, 80);
|
||||
}
|
||||
} else {
|
||||
@ -35,5 +35,5 @@ index db40fb8..5ae9afb 100644
|
||||
+ }
|
||||
}
|
||||
--
|
||||
2.5.1
|
||||
2.6.3.windows.1
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren