diff --git a/TwosideKeeper.jar b/TwosideKeeper.jar index 3d1858f..67d9af4 100644 Binary files a/TwosideKeeper.jar and b/TwosideKeeper.jar differ diff --git a/src/sig/plugin/TwosideKeeper/HelperStructures/Common/BlockModifyQueue.java b/src/sig/plugin/TwosideKeeper/HelperStructures/Common/BlockModifyQueue.java index 820a771..8096729 100644 --- a/src/sig/plugin/TwosideKeeper/HelperStructures/Common/BlockModifyQueue.java +++ b/src/sig/plugin/TwosideKeeper/HelperStructures/Common/BlockModifyQueue.java @@ -26,8 +26,8 @@ public class BlockModifyQueue{ this.b=b; this.checktype=checktype; this.finaltype=finaltype; - this.checkdata=0; - this.finaldata=0; + this.checkdata=checkdata; + this.finaldata=finaldata; this.usedata=true; } diff --git a/src/sig/plugin/TwosideKeeper/HelperStructures/Effects/LavaPlume.java b/src/sig/plugin/TwosideKeeper/HelperStructures/Effects/LavaPlume.java index 790aef8..ced56d4 100644 --- a/src/sig/plugin/TwosideKeeper/HelperStructures/Effects/LavaPlume.java +++ b/src/sig/plugin/TwosideKeeper/HelperStructures/Effects/LavaPlume.java @@ -20,6 +20,7 @@ import org.inventivetalent.glow.GlowAPI; import net.minecraft.server.v1_9_R1.EnumParticle; import sig.plugin.TwosideKeeper.TwosideKeeper; import sig.plugin.TwosideKeeper.aPluginAPIWrapper; +import sig.plugin.TwosideKeeper.HelperStructures.Common.BlockModifyQueue; import sig.plugin.TwosideKeeper.HelperStructures.Utils.SoundUtils; public class LavaPlume { @@ -85,14 +86,16 @@ public class LavaPlume { } } else { if (fb.getLocation().getY()>lavayreached) { + int tickdelay=0; for (int y=lavayreached;y blocklist = new ArrayList(); int rely = (int)(y-fb.getLocation().getY()); - if (state1 && !UpdateLavaBlock(fb.getLocation().add(1,rely,0).getBlock())) {state1=false;} - if (state2 && !UpdateLavaBlock(fb.getLocation().add(-1,rely,0).getBlock())) {state2=false;} - if (state3 && !UpdateLavaBlock(fb.getLocation().add(0,rely,1).getBlock())) {state3=false;} - if (state4 && !UpdateLavaBlock(fb.getLocation().add(0,rely,-1).getBlock())) {state4=false;} + if (state1 && !UpdateLavaBlock(fb.getLocation().add(1,rely,0).getBlock(),tickdelay)) {state1=false;} + if (state2 && !UpdateLavaBlock(fb.getLocation().add(-1,rely,0).getBlock(),tickdelay)) {state2=false;} + if (state3 && !UpdateLavaBlock(fb.getLocation().add(0,rely,1).getBlock(),tickdelay)) {state3=false;} + if (state4 && !UpdateLavaBlock(fb.getLocation().add(0,rely,-1).getBlock(),tickdelay)) {state4=false;} + tickdelay++; } lavayreached=(int)fb.getLocation().getY(); } else @@ -103,12 +106,15 @@ public class LavaPlume { } } - private boolean UpdateLavaBlock(Block lavamod) { + private boolean UpdateLavaBlock(Block lavamod,int tickdelay) { if (lavamod.getType()==Material.AIR || lavamod.getType()==Material.LAVA) { - if (lavamod.getType()==Material.AIR) { - lavamod.setType(Material.LAVA); - lavamod.setData((byte)8); - } + Bukkit.getScheduler().scheduleSyncDelayedTask(TwosideKeeper.plugin, ()->{ + if (lavamod.getType()==Material.AIR) { + lavamod.setType(Material.LAVA); + lavamod.setData((byte)8); + //TwosideKeeper.blockqueue.add(new BlockModifyQueue(lavamod,Material.AIR,(byte)0,Material.LAVA,(byte)8)); + } + },tickdelay); this.lavablocks.add(new TemporaryLava(lavamod,(int)(3*fb.getVelocity().getY())+6)); if (Math.random()<=0.1) { SoundUtils.playGlobalSound(lavamod.getLocation(), Sound.ENTITY_BLAZE_SHOOT, 0.6f, 0.6f); diff --git a/src/sig/plugin/TwosideKeeper/runServerTick.java b/src/sig/plugin/TwosideKeeper/runServerTick.java index 5e91869..b37b4ad 100644 --- a/src/sig/plugin/TwosideKeeper/runServerTick.java +++ b/src/sig/plugin/TwosideKeeper/runServerTick.java @@ -3,12 +3,15 @@ package sig.plugin.TwosideKeeper; import sig.plugin.TwosideKeeper.HelperStructures.Common.BlockModifyQueue; public class runServerTick implements Runnable{ + final int queuespd = 3; @Override public void run() { - if (TwosideKeeper.blockqueue.size()>0) { - BlockModifyQueue bmq = TwosideKeeper.blockqueue.remove(0); - bmq.run(); + for (int i=queuespd;i>0;i--) { + if (TwosideKeeper.blockqueue.size()>0) { + BlockModifyQueue bmq = TwosideKeeper.blockqueue.remove(0); + bmq.run(); + } } }