diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/glue/SuperGlueEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/glue/SuperGlueEntity.java index c4b58507d..5eca4e99b 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/glue/SuperGlueEntity.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/glue/SuperGlueEntity.java @@ -13,6 +13,7 @@ import com.simibubi.create.modules.schematics.ISpecialEntityItemRequirement; import com.simibubi.create.modules.schematics.ItemRequirement; import com.simibubi.create.modules.schematics.ItemRequirement.ItemUseType; +import net.minecraft.block.BlockState; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.player.ClientPlayerEntity; import net.minecraft.client.world.ClientWorld; @@ -164,11 +165,13 @@ public class SuperGlueEntity extends Entity implements IEntityAdditionalSpawnDat } public static boolean isValidFace(World world, BlockPos pos, Direction direction) { + BlockState state = world.getBlockState(pos); + if (BlockMovementTraits.isBlockAttachedTowards(state, direction)) + return true; if (!BlockMovementTraits.movementNecessary(world, pos)) return false; - if (BlockMovementTraits.notSupportive(world.getBlockState(pos), direction)) { + if (BlockMovementTraits.notSupportive(state, direction)) return false; - } return true; } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/glue/SuperGlueRenderer.java b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/glue/SuperGlueRenderer.java index 5765ebcc6..11717232f 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/glue/SuperGlueRenderer.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/glue/SuperGlueRenderer.java @@ -83,7 +83,7 @@ public class SuperGlueRenderer extends EntityRenderer { return false; BlockPos pos = entity.hangingPosition; BlockPos pos2 = pos.offset(entity.getFacingDirection().getOpposite()); - return !SuperGlueEntity.isValidFace(entity.world, pos2, entity.getFacingDirection()) || !SuperGlueEntity.isValidFace(entity.world, pos, entity.getFacingDirection().getOpposite()); + return SuperGlueEntity.isValidFace(entity.world, pos2, entity.getFacingDirection()) != SuperGlueEntity.isValidFace(entity.world, pos, entity.getFacingDirection().getOpposite()); } private void initQuads() {