From 679045bbad5ac4bd2b0b728361dbf07216035a81 Mon Sep 17 00:00:00 2001 From: Brianna Date: Tue, 10 Sep 2019 19:15:31 -0400 Subject: [PATCH 1/3] Melting particles only show when something is actually melted. --- .../epicfurnaces/tasks/FurnaceTask.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/songoda/epicfurnaces/tasks/FurnaceTask.java b/src/main/java/com/songoda/epicfurnaces/tasks/FurnaceTask.java index 6561225..71b520a 100644 --- a/src/main/java/com/songoda/epicfurnaces/tasks/FurnaceTask.java +++ b/src/main/java/com/songoda/epicfurnaces/tasks/FurnaceTask.java @@ -5,6 +5,8 @@ import com.songoda.epicfurnaces.EpicFurnaces; import com.songoda.epicfurnaces.furnace.Furnace; import com.songoda.epicfurnaces.settings.Settings; import java.util.HashSet; + +import com.sun.org.apache.bcel.internal.generic.FADD; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.block.Block; @@ -76,19 +78,19 @@ public class FurnaceTask extends BukkitRunnable { if (block.getType() == Material.AIR || block.getRelative(BlockFace.UP).getType() != Material.AIR) continue; + if (block.getType() == Material.SNOW) + block.setType(Material.AIR); + else if (block.getType() == Material.ICE || block.getType() == Material.PACKED_ICE) + block.setType(Material.WATER); + else + continue; if (doParticles) { - float xx = (float) (0 + (Math.random() * .75)); float yy = (float) (0 + (Math.random() * 1)); float zz = (float) (0 + (Math.random() * .75)); - - CompatibleParticleHandler.spawnParticles(CompatibleParticleHandler.ParticleType.SMOKE_NORMAL, location, 25, xx, yy, zz); - } - if (block.getType() == Material.SNOW) { - block.setType(Material.AIR); - } else if (block.getType() == Material.ICE || block.getType() == Material.PACKED_ICE) { - block.setType(Material.WATER); + + CompatibleParticleHandler.spawnParticles(CompatibleParticleHandler.ParticleType.SMOKE_NORMAL, location, 25, xx, yy, zz, 0); } } } From 101819461df2677ae06455cc10111f0baa502ba0 Mon Sep 17 00:00:00 2001 From: Brianna Date: Tue, 10 Sep 2019 19:16:53 -0400 Subject: [PATCH 2/3] furnace smoke doesn't fly --- src/main/java/com/songoda/epicfurnaces/tasks/FurnaceTask.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/songoda/epicfurnaces/tasks/FurnaceTask.java b/src/main/java/com/songoda/epicfurnaces/tasks/FurnaceTask.java index 71b520a..c2ee7fd 100644 --- a/src/main/java/com/songoda/epicfurnaces/tasks/FurnaceTask.java +++ b/src/main/java/com/songoda/epicfurnaces/tasks/FurnaceTask.java @@ -122,7 +122,7 @@ public class FurnaceTask extends BukkitRunnable { float yy = (float) (0 + (Math.random() * 1)); float zz = (float) (0 + (Math.random() * .75)); - CompatibleParticleHandler.spawnParticles(CompatibleParticleHandler.ParticleType.SMOKE_NORMAL, location, 25, xx, yy, zz); + CompatibleParticleHandler.spawnParticles(CompatibleParticleHandler.ParticleType.SMOKE_NORMAL, location, 25, xx, yy, zz, 0); } } } From 72fd42177422cb7220db93e9eb75f15ee404970c Mon Sep 17 00:00:00 2001 From: Brianna Date: Tue, 10 Sep 2019 19:39:12 -0400 Subject: [PATCH 3/3] Fixed name syncing. --- src/main/java/com/songoda/epicfurnaces/furnace/Furnace.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/com/songoda/epicfurnaces/furnace/Furnace.java b/src/main/java/com/songoda/epicfurnaces/furnace/Furnace.java index 0e46e73..501e4c4 100644 --- a/src/main/java/com/songoda/epicfurnaces/furnace/Furnace.java +++ b/src/main/java/com/songoda/epicfurnaces/furnace/Furnace.java @@ -172,7 +172,6 @@ public class Furnace { } private void syncName() { - if (!(location.getBlock() instanceof Furnace)) return; org.bukkit.block.Furnace furnace = (org.bukkit.block.Furnace) location.getBlock().getState(); if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_10)) furnace.setCustomName(Methods.formatName(level.getLevel(), uses, false));