From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
Date: Mon, 17 May 2021 04:46:23 -0500
Subject: [PATCH] Option to disable dragon egg teleporting


diff --git a/src/main/java/net/minecraft/world/level/block/DragonEggBlock.java b/src/main/java/net/minecraft/world/level/block/DragonEggBlock.java
index 78f51f3dd0e7249af69228479da932e9aea982d6..d9d4421f7f316281487828739168cfd6febf2bf5 100644
--- a/src/main/java/net/minecraft/world/level/block/DragonEggBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/DragonEggBlock.java
@@ -41,6 +41,7 @@ public class DragonEggBlock extends FallingBlock {
     }
 
     private void teleport(BlockState state, Level world, BlockPos pos) {
+        if (!world.purpurConfig.dragonEggTeleport) return; // Purpur
         for (int i = 0; i < 1000; ++i) {
             BlockPos blockposition1 = pos.offset(world.random.nextInt(16) - world.random.nextInt(16), world.random.nextInt(8) - world.random.nextInt(8), world.random.nextInt(16) - world.random.nextInt(16));
 
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index 198c94a5f41561d5692b8a68bd016b335d562579..bb6ae6c30251d5b8b036cf1797dc3a77932f489c 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -563,6 +563,11 @@ public class PurpurWorldConfig {
         });
     }
 
+    public boolean dragonEggTeleport = true;
+    private void dragonEggSettings() {
+        dragonEggTeleport = getBoolean("blocks.dragon_egg.teleport", dragonEggTeleport);
+    }
+
     public boolean baselessEndCrystalExplode = true;
     public double baselessEndCrystalExplosionPower = 6.0D;
     public boolean baselessEndCrystalExplosionFire = false;
