Fix Particle API. Fix an NPE occuring if effect.getData is null, and fix the constructor of the Packet63 not using the right arguments.
This commit is contained in:
parent
0b52cb2bfd
commit
aa0f27bcd9
@ -1,4 +1,4 @@
|
||||
From fed3c705d2772fbbec3712989132a63c6bf2006e Mon Sep 17 00:00:00 2001
|
||||
From 4fde28828a4820deccf067f854ecae8e3eb8996b Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Sun, 2 Jun 2013 16:14:30 +1000
|
||||
Subject: [PATCH] Particle API
|
||||
@ -43,7 +43,7 @@ index 7de0de5..7eca388 100644
|
||||
datavalue = 0;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 4439ebc..536a4d6 100644
|
||||
index 4439ebc..56d3d32 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -885,31 +885,21 @@ public class CraftWorld implements World {
|
||||
@ -109,7 +109,7 @@ index 4439ebc..536a4d6 100644
|
||||
+ StringBuilder particleFullName = new StringBuilder();
|
||||
+ particleFullName.append( effect.getName() );
|
||||
+
|
||||
+ if ( effect.getData() != null && effect.getData().equals( Material.class ) || effect.getData().equals( org.bukkit.material.MaterialData.class ) )
|
||||
+ if ( effect.getData() != null && ( effect.getData().equals( Material.class ) || effect.getData().equals( org.bukkit.material.MaterialData.class ) ) )
|
||||
+ {
|
||||
+ particleFullName.append( '_' ).append( id );
|
||||
+ }
|
||||
@ -118,7 +118,7 @@ index 4439ebc..536a4d6 100644
|
||||
+ {
|
||||
+ particleFullName.append( '_' ).append( data );
|
||||
+ }
|
||||
+ packet = new Packet63WorldParticles( effect.getName(), (float) location.getX(), (float) location.getY(), (float) location.getZ(), offsetX, offsetY, offsetZ, particleCount, radius );
|
||||
+ packet = new Packet63WorldParticles( particleFullName.toString(), (float) location.getX(), (float) location.getY(), (float) location.getZ(), offsetX, offsetY, offsetZ, speed, particleCount );
|
||||
+ }
|
||||
+
|
||||
+ int distance;
|
||||
@ -236,5 +236,5 @@ index 3d39d07..8ee2c3b 100644
|
||||
|
||||
public Spigot spigot()
|
||||
--
|
||||
1.8.1.2
|
||||
1.8.3
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user