From 9b0ca5cf55ba9c64eefdd8e1863f274fe08a8111 Mon Sep 17 00:00:00 2001 From: LemADEC Date: Mon, 13 Feb 2017 02:17:46 +0100 Subject: [PATCH] Added quantity to effect handling --- .../cr0s/warpdrive/block/TileEntityLaser.java | 2 +- .../warpdrive/data/EnumForceFieldUpgrade.java | 6 +++--- .../warpdrive/network/MessageSpawnParticle.java | 16 +++++++++++----- .../cr0s/warpdrive/network/PacketHandler.java | 13 ++++++++----- 4 files changed, 23 insertions(+), 14 deletions(-) diff --git a/src/main/java/cr0s/warpdrive/block/TileEntityLaser.java b/src/main/java/cr0s/warpdrive/block/TileEntityLaser.java index 2d16342e..aa11ea92 100644 --- a/src/main/java/cr0s/warpdrive/block/TileEntityLaser.java +++ b/src/main/java/cr0s/warpdrive/block/TileEntityLaser.java @@ -395,7 +395,7 @@ public class TileEntityLaser extends TileEntityAbstractLaser implements IBeamFre -0.2D * vDirection.x + 0.05 * (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()), -0.2D * vDirection.y + 0.05 * (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()), -0.2D * vDirection.z + 0.05 * (worldObj.rand.nextFloat() - worldObj.rand.nextFloat())); - PacketHandler.sendSpawnParticlePacket(worldObj, "explode", origin, direction, r, g, b, r, g, b, 96); + PacketHandler.sendSpawnParticlePacket(worldObj, "explode", (byte) 5, origin, direction, r, g, b, r, g, b, 96); // apply custom damages if (block instanceof IDamageReceiver) { diff --git a/src/main/java/cr0s/warpdrive/data/EnumForceFieldUpgrade.java b/src/main/java/cr0s/warpdrive/data/EnumForceFieldUpgrade.java index 75714814..fd41714e 100644 --- a/src/main/java/cr0s/warpdrive/data/EnumForceFieldUpgrade.java +++ b/src/main/java/cr0s/warpdrive/data/EnumForceFieldUpgrade.java @@ -274,7 +274,7 @@ public enum EnumForceFieldUpgrade implements IForceFieldUpgrade, IForceFieldUpgr v3Direction.scale(0.20D); PacketHandler.sendBeamPacket(world, v3Projector, v3Entity, 0.25F, 0.38F, 0.75F, 10, 0, 50); - PacketHandler.sendSpawnParticlePacket(world, "snowshovel", v3Entity, v3Direction, + PacketHandler.sendSpawnParticlePacket(world, "snowshovel", (byte) 5, v3Entity, v3Direction, 0.20F + 0.10F * world.rand.nextFloat(), 0.25F + 0.25F * world.rand.nextFloat(), 0.60F + 0.30F * world.rand.nextFloat(), 0.0F, 0.0F, 0.0F, 32); return 10; @@ -292,7 +292,7 @@ public enum EnumForceFieldUpgrade implements IForceFieldUpgrade, IForceFieldUpgr v3Direction.scale(0.20D); PacketHandler.sendBeamPacket(world, v3Projector, v3Entity, 0.95F, 0.52F, 0.38F, 10, 0, 50); - PacketHandler.sendSpawnParticlePacket(world, "snowshovel", v3Entity, v3Direction, + PacketHandler.sendSpawnParticlePacket(world, "snowshovel", (byte) 5, v3Entity, v3Direction, 0.90F + 0.10F * world.rand.nextFloat(), 0.35F + 0.25F * world.rand.nextFloat(), 0.30F + 0.15F * world.rand.nextFloat(), 0.0F, 0.0F, 0.0F, 32); /* @@ -313,7 +313,7 @@ public enum EnumForceFieldUpgrade implements IForceFieldUpgrade, IForceFieldUpgr v3Direction.scale(0.15D); PacketHandler.sendBeamPacket(world, v3Projector, v3Entity, 0.35F, 0.57F, 0.87F, 10, 0, 50); - PacketHandler.sendSpawnParticlePacket(world, "fireworksSpark", v3Entity, v3Direction, + PacketHandler.sendSpawnParticlePacket(world, "fireworksSpark", (byte) 5, v3Entity, v3Direction, 0.20F + 0.30F * world.rand.nextFloat(), 0.50F + 0.15F * world.rand.nextFloat(), 0.75F + 0.25F * world.rand.nextFloat(), 0.10F + 0.20F * world.rand.nextFloat(), 0.10F + 0.30F * world.rand.nextFloat(), 0.20F + 0.10F * world.rand.nextFloat(), 32); diff --git a/src/main/java/cr0s/warpdrive/network/MessageSpawnParticle.java b/src/main/java/cr0s/warpdrive/network/MessageSpawnParticle.java index a5ef7ccc..2d7e1bdb 100644 --- a/src/main/java/cr0s/warpdrive/network/MessageSpawnParticle.java +++ b/src/main/java/cr0s/warpdrive/network/MessageSpawnParticle.java @@ -21,6 +21,7 @@ import cr0s.warpdrive.data.Vector3; public class MessageSpawnParticle implements IMessage, IMessageHandler { private String type; + private byte quantity; private Vector3 origin; private Vector3 direction; private float baseRed; @@ -34,10 +35,11 @@ public class MessageSpawnParticle implements IMessage, IMessageHandler