Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 12:30:06 +01:00
Update chorus fruit tele event destination.
Dieser Commit ist enthalten in:
Ursprung
d6a61e3e5d
Commit
9e8c377287
@ -12,7 +12,7 @@
|
|||||||
public class ItemChorusFruit extends ItemFood {
|
public class ItemChorusFruit extends ItemFood {
|
||||||
|
|
||||||
public ItemChorusFruit(int i, float f) {
|
public ItemChorusFruit(int i, float f) {
|
||||||
@@ -19,6 +25,17 @@
|
@@ -19,7 +25,21 @@
|
||||||
double d4 = MathHelper.a(entityliving.locY + (double) (entityliving.getRandom().nextInt(16) - 8), 0.0D, (double) (world.Z() - 1));
|
double d4 = MathHelper.a(entityliving.locY + (double) (entityliving.getRandom().nextInt(16) - 8), 0.0D, (double) (world.Z() - 1));
|
||||||
double d5 = entityliving.locZ + (entityliving.getRandom().nextDouble() - 0.5D) * 16.0D;
|
double d5 = entityliving.locZ + (entityliving.getRandom().nextDouble() - 0.5D) * 16.0D;
|
||||||
|
|
||||||
@ -24,9 +24,13 @@
|
|||||||
+ if (teleEvent.isCancelled()) {
|
+ if (teleEvent.isCancelled()) {
|
||||||
+ break;
|
+ break;
|
||||||
+ }
|
+ }
|
||||||
|
+ d3 = teleEvent.getTo().getX();
|
||||||
|
+ d4 = teleEvent.getTo().getY();
|
||||||
|
+ d5 = teleEvent.getTo().getZ();
|
||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
|
||||||
+
|
+
|
||||||
if (entityliving.k(d3, d4, d5)) {
|
if (entityliving.k(d3, d4, d5)) {
|
||||||
|
+ // CraftBukkit end
|
||||||
world.a((EntityHuman) null, d0, d1, d2, SoundEffects.af, SoundCategory.PLAYERS, 1.0F, 1.0F);
|
world.a((EntityHuman) null, d0, d1, d2, SoundEffects.af, SoundCategory.PLAYERS, 1.0F, 1.0F);
|
||||||
entityliving.a(SoundEffects.af, 1.0F, 1.0F);
|
entityliving.a(SoundEffects.af, 1.0F, 1.0F);
|
||||||
|
break;
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren