From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
Date: Mon, 17 Aug 2020 17:34:33 -0500
Subject: [PATCH] Crying obsidian valid for portal frames


diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
index 47726a4394d1876d054c6f1c3f5408a81b623e69..d3026d8911c73e23315a545b9eb0753306c0e825 100644
--- a/src/main/java/net/minecraft/server/Block.java
+++ b/src/main/java/net/minecraft/server/Block.java
@@ -100,6 +100,7 @@ public class Block extends BlockBase implements IMaterial {
         return tag.isTagged(this);
     }
 
+    public boolean equals(Block block) { return a(block); } // Purpur - OBFHELPER
     public boolean a(Block block) {
         return this == block;
     }
diff --git a/src/main/java/net/minecraft/server/BlockBase.java b/src/main/java/net/minecraft/server/BlockBase.java
index 6aea156d7c7a9ca8a357aad6a6781d7209c9b8ae..b40f5167d2a9772658c115091f13706fbb4959b7 100644
--- a/src/main/java/net/minecraft/server/BlockBase.java
+++ b/src/main/java/net/minecraft/server/BlockBase.java
@@ -687,6 +687,7 @@ public abstract class BlockBase {
             return this.getBlock().a(tag) && predicate.test(this);
         }
 
+        public boolean equals(Block block) { return a(block); } // Purpur - OBFHELPER
         public boolean a(Block block) {
             return this.getBlock().a(block);
         }
diff --git a/src/main/java/net/minecraft/server/BlockPortalShape.java b/src/main/java/net/minecraft/server/BlockPortalShape.java
index 6ef81aeb4c63bc6c23163796dbd977602ca2f540..9ea3c30b679da4e77b86d96d0cc476732040f184 100644
--- a/src/main/java/net/minecraft/server/BlockPortalShape.java
+++ b/src/main/java/net/minecraft/server/BlockPortalShape.java
@@ -14,7 +14,7 @@ import org.bukkit.event.world.PortalCreateEvent;
 public class BlockPortalShape {
 
     private static final BlockBase.e a = (iblockdata, iblockaccess, blockposition) -> {
-        return iblockdata.a(Blocks.OBSIDIAN);
+        return iblockdata.equals(Blocks.OBSIDIAN) || (net.pl3x.purpur.PurpurConfig.cryingObsidianValidForPortalFrame && iblockdata.equals(Blocks.CRYING_OBSIDIAN)); // Purpur
     };
     private final GeneratorAccess b;
     private final EnumDirection.EnumAxis c;
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
index 59f3122aab9940cb3c3c1efb2664ab0835656d48..a5febd7671ae1818edb18955d5e8176303c92c93 100644
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
@@ -179,6 +179,7 @@ public class PurpurConfig {
     public static boolean barrelSixRows = false;
     public static boolean enderChestSixRows = false;
     public static boolean enderChestPermissionRows = false;
+    public static boolean cryingObsidianValidForPortalFrame = false;
     private static void blockSettings() {
         if (version < 3) {
             boolean oldValue = getBoolean("settings.barrel.packed-barrels", true);
@@ -193,6 +194,7 @@ public class PurpurConfig {
         enderChestSixRows = getBoolean("settings.blocks.ender_chest.six-rows", enderChestSixRows);
         InventoryType.ENDER_CHEST.setDefaultSize(enderChestSixRows ? 54 : 27);
         enderChestPermissionRows = getBoolean("settings.blocks.ender_chest.use-permissions-for-rows", enderChestPermissionRows);
+        cryingObsidianValidForPortalFrame = getBoolean("settings.blocks.crying_obsidian.valid-for-portal-frame", cryingObsidianValidForPortalFrame);
     }
 
     public static boolean endermanShortHeight = false;
