mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-12 09:51:12 +01:00
19972e09b8
5a0150f586ed3eb15fe6f1f596d1a5a7d806f0f9 Fix ITEM_BREAK e6a3911057bd94d8bd7021cbb4923fb84fb106d1 Upstream merge d1cdcf8d4c3639f956474f02ed662517cffbe23e Remove old patch 068df64aeee368377e1673667bffc7a6dcf90554 Rebuild all patches
36 lines
1.6 KiB
Diff
36 lines
1.6 KiB
Diff
From 07704d776ea0fce7002e03adb07994549e61358d 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 31af702..6f2b506 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityFireball.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityFireball.java
|
|
@@ -200,6 +200,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) {
|
|
@@ -221,6 +223,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();
|
|
}
|
|
--
|
|
2.1.0
|
|
|