ok retard

This commit is contained in:
ZeroEpoch1969 2019-12-01 16:37:19 -07:00
parent 7572f77ab6
commit 93e6361148
No known key found for this signature in database
GPG Key ID: A7BAB4E14F089CF3
2 changed files with 17 additions and 4 deletions

View File

@ -189,6 +189,14 @@
</dependency> </dependency>
</dependencies> </dependencies>
<distributionManagement>
<repository>
<id>github</id>
<name>GitHub TFPatches Apache Maven Packages</name>
<url>https://maven.pkg.github.com/tfpatches/TotalFreedomMod</url>
</repository>
</distributionManagement>
<build> <build>
<!-- Filter resources for build.properties --> <!-- Filter resources for build.properties -->
<resources> <resources>

View File

@ -144,13 +144,13 @@ public class Command_ro extends FreedomCommand
{ {
Block block = centerBlock.getRelative(xOffset, yOffset, zOffset); Block block = centerBlock.getRelative(xOffset, yOffset, zOffset);
BlockData data = block.getBlockData(); 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); waterloggedData.setWaterlogged(false);
block.setBlockData(waterloggedData); block.setBlockData(waterloggedData);
affected++; affected++;
@ -159,6 +159,11 @@ public class Command_ro extends FreedomCommand
block.setType(toMaterial); block.setType(toMaterial);
affected++; affected++;
} }
else if (block.getType().equals(fromMaterial))
{
block.setType(toMaterial);
affected++;
}
} }
} }
} }