mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-11-01 09:59:18 +00:00
safety check for moved earth, otherwise this move could be used on top of a bunch of raised earth to glitch out blocks and sometimes leave lava sources making a mess in the world
This commit is contained in:
parent
be896ecf32
commit
83afd7142f
|
@ -1,11 +1,15 @@
|
||||||
package com.projectkorra.projectkorra.earthbending.lava;
|
package com.projectkorra.projectkorra.earthbending.lava;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import com.projectkorra.projectkorra.GeneralMethods;
|
||||||
import java.util.List;
|
import com.projectkorra.projectkorra.ProjectKorra;
|
||||||
import java.util.Map;
|
import com.projectkorra.projectkorra.ability.CoreAbility;
|
||||||
import java.util.Random;
|
import com.projectkorra.projectkorra.ability.EarthAbility;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import com.projectkorra.projectkorra.ability.LavaAbility;
|
||||||
|
import com.projectkorra.projectkorra.attribute.Attribute;
|
||||||
|
import com.projectkorra.projectkorra.util.BlockSource;
|
||||||
|
import com.projectkorra.projectkorra.util.ClickType;
|
||||||
|
import com.projectkorra.projectkorra.util.ParticleEffect;
|
||||||
|
import com.projectkorra.projectkorra.util.TempBlock;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
|
@ -14,15 +18,11 @@ import org.bukkit.block.BlockFace;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
|
|
||||||
import com.projectkorra.projectkorra.GeneralMethods;
|
import java.util.ArrayList;
|
||||||
import com.projectkorra.projectkorra.ProjectKorra;
|
import java.util.List;
|
||||||
import com.projectkorra.projectkorra.ability.CoreAbility;
|
import java.util.Map;
|
||||||
import com.projectkorra.projectkorra.ability.LavaAbility;
|
import java.util.Random;
|
||||||
import com.projectkorra.projectkorra.attribute.Attribute;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import com.projectkorra.projectkorra.util.BlockSource;
|
|
||||||
import com.projectkorra.projectkorra.util.ClickType;
|
|
||||||
import com.projectkorra.projectkorra.util.ParticleEffect;
|
|
||||||
import com.projectkorra.projectkorra.util.TempBlock;
|
|
||||||
|
|
||||||
public class LavaFlow extends LavaAbility {
|
public class LavaFlow extends LavaAbility {
|
||||||
|
|
||||||
|
@ -386,6 +386,9 @@ public class LavaFlow extends LavaAbility {
|
||||||
*/
|
*/
|
||||||
public void createLava(final Block block) {
|
public void createLava(final Block block) {
|
||||||
if (isEarth(block) || isSand(block) || isMetal(block)) {
|
if (isEarth(block) || isSand(block) || isMetal(block)) {
|
||||||
|
if (EarthAbility.getMovedEarth().containsKey(block)){
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (isPlant(block.getRelative(BlockFace.UP)) || isSnow(block.getRelative(BlockFace.UP))) {
|
if (isPlant(block.getRelative(BlockFace.UP)) || isSnow(block.getRelative(BlockFace.UP))) {
|
||||||
final Block above = block.getRelative(BlockFace.UP);
|
final Block above = block.getRelative(BlockFace.UP);
|
||||||
final Block above2 = above.getRelative(BlockFace.UP);
|
final Block above2 = above.getRelative(BlockFace.UP);
|
||||||
|
|
Loading…
Reference in a new issue