mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-20 07:57:34 +01:00
cab333b217
Don't send requests of every player was found in the global api cache SpigotMC/Spigot@841270ff1e Correctly set the response code for the cached lookups and return the ... SpigotMC/Spigot@f170b7899c Don't try and re-set the global api cache on reload SpigotMC/Spigot@b410a00a66 Use a compile time sneaky throw hack. SpigotMC/Spigot@508462b96b Fix a missed rename in WorldGenGroundBush SpigotMC/Spigot@0614d8fae9
37 lines
1.6 KiB
Diff
37 lines
1.6 KiB
Diff
From dfedeeceb83c15c73c6295765a0a1c80d76798df Mon Sep 17 00:00:00 2001
|
|
From: Thinkofdeath <thethinkofdeath@gmail.com>
|
|
Date: Sat, 18 Jan 2014 14:27:03 +0000
|
|
Subject: [PATCH] Support vanilla's direction tag on fireballs
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityFireball.java b/src/main/java/net/minecraft/server/EntityFireball.java
|
|
index 02d90aa..663714d 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityFireball.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityFireball.java
|
|
@@ -199,6 +199,8 @@ public abstract class EntityFireball extends Entity {
|
|
nbttagcompound.setByte("inGround", (byte) (this.i ? 1 : 0));
|
|
// CraftBukkit - Fix direction being mismapped to invalid variables
|
|
nbttagcompound.set("power", this.a(new double[] { this.dirX, this.dirY, this.dirZ}));
|
|
+ // Spigot - Support vanilla's direction tag
|
|
+ nbttagcompound.set("direction", this.a(new double[] { this.motX, this.motY, this.motZ}));
|
|
}
|
|
|
|
public void a(NBTTagCompound nbttagcompound) {
|
|
@@ -215,6 +217,13 @@ public abstract class EntityFireball extends Entity {
|
|
this.dirY = nbttaglist.d(1);
|
|
this.dirZ = nbttaglist.d(2);
|
|
// CraftBukkit end
|
|
+ } else if (nbttagcompound.hasKeyOfType("direction", 9)) { // Spigot - Support vanilla's direction tag
|
|
+ NBTTagList nbttaglist = nbttagcompound.getList("direction", 6);
|
|
+
|
|
+ this.motX = nbttaglist.d(0);
|
|
+ this.motY = nbttaglist.d(1);
|
|
+ this.motZ = nbttaglist.d(2);
|
|
+
|
|
} else {
|
|
this.die();
|
|
}
|
|
--
|
|
1.9.1
|
|
|