Fix NPE in OctopusForm

This commit is contained in:
Jack Lin 2015-06-30 01:39:04 +12:00
parent 89ee1470e8
commit 42c750862f

View file

@ -227,8 +227,9 @@ public class OctopusForm {
sourcelocation.add(vector);
Block newblock = sourcelocation.getBlock();
if (!newblock.equals(sourceblock)) {
source.revertBlock();
source = null;
if (source != null) {
source.revertBlock();
}
if (!GeneralMethods.isSolid(newblock)) {
source = new TempBlock(newblock, Material.STATIONARY_WATER, (byte) 8);
sourceblock = newblock;