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>
</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>
<!-- Filter resources for build.properties -->
<resources>

View File

@ -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++;
}
}
}
}