From 736ced3a513a579c48dbf0a35cb2e404b217e606 Mon Sep 17 00:00:00 2001 From: Sollace Date: Thu, 4 Apr 2019 12:58:18 +0200 Subject: [PATCH] Changed mechanics for which blocks can be placed on clouds --- .../unicopia/block/ICloudBlock.java | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/minelittlepony/unicopia/block/ICloudBlock.java b/src/main/java/com/minelittlepony/unicopia/block/ICloudBlock.java index b8ab2e60..ab7e682e 100644 --- a/src/main/java/com/minelittlepony/unicopia/block/ICloudBlock.java +++ b/src/main/java/com/minelittlepony/unicopia/block/ICloudBlock.java @@ -50,24 +50,20 @@ public interface ICloudBlock { return false; } - if (isPlacementExcempt(block)) { + if (block instanceof ICloudBlock) { + CloudType other = ((ICloudBlock)block).getCloudMaterialType(block.getDefaultState()); - if (block instanceof ICloudBlock) { - CloudType other = ((ICloudBlock)block).getCloudMaterialType(block.getDefaultState()); - - if (other.canInteract(player)) { - return false; - } + if (other.canInteract(player)) { + return false; } + } - if (Predicates.INTERACT_WITH_CLOUDS.apply(player)) { - return type == CloudType.NORMAL; - } + if (!Predicates.INTERACT_WITH_CLOUDS.apply(player)) { return type != CloudType.ENCHANTED; } - if (!(block instanceof ICloudBlock)) { - return type != CloudType.ENCHANTED; + if (type == CloudType.NORMAL) { + return !isPlacementExcempt(block); } } }