Created
January 18, 2014 08:22
-
-
Save anonymous/8487734 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public boolean transmuteBlock(int block1, int block2, World w, int x, int y, int z, int size) { | |
// if the blockID is the same as block1 | |
if (w.getBlockId(x, y, z) == block1) { | |
// then change it to block2 | |
w.setBlock(x, y, z, block2); | |
// else if the blockID is the same as block2 | |
} else if (w.getBlockId(x, y, z) == block2) { | |
// then change it to block1 | |
w.setBlock(x, y, z, block1); | |
} | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment