Skip to content

Commit

Permalink
Fixed #17. Blockpos is immutable now.
Browse files Browse the repository at this point in the history
  • Loading branch information
dries007 committed Feb 26, 2017
1 parent 76080d7 commit 4fd32f2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions build.gradle
Expand Up @@ -28,6 +28,7 @@ configurations {
apply plugin: "net.minecraftforge.gradle.forge"
apply plugin: "idea-utils"
apply plugin: "maven"
//apply plugin: "signing"

group = "net.doubledoordev.d3core"
version = "1.3.0"
Expand Down Expand Up @@ -129,6 +130,10 @@ idea {
}
}

//signing {
// sign configurations.archives
//}

//noinspection GroovyAssignabilityCheck
uploadArchives {
if (project.hasProperty("dddUser") && project.hasProperty("dddUrl") && project.hasProperty("dddPass")) {
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/net/doubledoordev/d3core/util/EventHandler.java
Expand Up @@ -339,13 +339,13 @@ private void lilypad(EntityPlayer player)

BlockPos blockPos = new BlockPos((int)(player.posX),(int)(player.posY),(int)(player.posZ));

if (blockPos.getX() < 0) blockPos.add(-1,0,0);
if (blockPos.getZ() < 0) blockPos.add(0,0,-1);
if (blockPos.getX() < 0) blockPos = blockPos.add(-1,0,0);
if (blockPos.getZ() < 0) blockPos = blockPos.add(0,0,-1);

int limiter = world.getActualHeight() * 2;

while (world.getBlockState(blockPos).getMaterial() == Material.WATER && --limiter != 0) blockPos.add(0,1,0);
while (world.getBlockState(blockPos).getMaterial() == Material.AIR && --limiter != 0) blockPos.add(0,-1,0);
while (world.getBlockState(blockPos).getMaterial() == Material.WATER && --limiter != 0) blockPos = blockPos.add(0,1,0);
while (world.getBlockState(blockPos).getMaterial() == Material.AIR && --limiter != 0) blockPos = blockPos.add(0,-1,0);
if (limiter == 0) return;
if (world.getBlockState(blockPos).getMaterial() == Material.WATER)
{
Expand Down

0 comments on commit 4fd32f2

Please sign in to comment.