From 93e63611484b6cfabd557168ff71bb59646c3351 Mon Sep 17 00:00:00 2001 From: ZeroEpoch1969 <13510767+ZeroEpoch1969@users.noreply.github.com> Date: Sun, 1 Dec 2019 16:37:19 -0700 Subject: [PATCH] ok retard --- pom.xml | 8 ++++++++ .../totalfreedommod/command/Command_ro.java | 13 +++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index a3f4b83d..565ad15d 100644 --- a/pom.xml +++ b/pom.xml @@ -189,6 +189,14 @@ + + + github + GitHub TFPatches Apache Maven Packages + https://maven.pkg.github.com/tfpatches/TotalFreedomMod + + + diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_ro.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_ro.java index c6c8fd07..f115c52a 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_ro.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_ro.java @@ -144,13 +144,13 @@ public class Command_ro extends FreedomCommand { Block block = centerBlock.getRelative(xOffset, yOffset, zOffset); BlockData data = block.getBlockData(); - if (block.getType().equals(fromMaterial) || data instanceof Waterlogged) + if (block.getLocation().distanceSquared(center) < (radius * radius)) { - if (block.getLocation().distanceSquared(center) < (radius * radius)) + if (fromMaterial.equals(Material.WATER) && data instanceof Waterlogged) { - if (fromMaterial.equals(Material.WATER) && data instanceof Waterlogged) + if (data instanceof Waterlogged) { - Waterlogged waterloggedData = (Waterlogged) data; + Waterlogged waterloggedData = (Waterlogged)data; waterloggedData.setWaterlogged(false); block.setBlockData(waterloggedData); affected++; @@ -159,6 +159,11 @@ public class Command_ro extends FreedomCommand block.setType(toMaterial); affected++; } + else if (block.getType().equals(fromMaterial)) + { + block.setType(toMaterial); + affected++; + } } } }