Changed mechanics for which blocks can be placed on clouds

This commit is contained in:
Sollace 2019-04-04 12:58:18 +02:00
parent 5b18c7c0f6
commit 736ced3a51

View file

@ -50,24 +50,20 @@ public interface ICloudBlock {
return false; return false;
} }
if (isPlacementExcempt(block)) { if (block instanceof ICloudBlock) {
CloudType other = ((ICloudBlock)block).getCloudMaterialType(block.getDefaultState());
if (block instanceof ICloudBlock) { if (other.canInteract(player)) {
CloudType other = ((ICloudBlock)block).getCloudMaterialType(block.getDefaultState()); return false;
if (other.canInteract(player)) {
return false;
}
} }
}
if (Predicates.INTERACT_WITH_CLOUDS.apply(player)) { if (!Predicates.INTERACT_WITH_CLOUDS.apply(player)) {
return type == CloudType.NORMAL;
}
return type != CloudType.ENCHANTED; return type != CloudType.ENCHANTED;
} }
if (!(block instanceof ICloudBlock)) { if (type == CloudType.NORMAL) {
return type != CloudType.ENCHANTED; return !isPlacementExcempt(block);
} }
} }
} }