mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Option to disable dragon egg teleporting
This commit is contained in:
committed by
granny
parent
ef8520ee3f
commit
adcdaf66a2
@@ -1,36 +0,0 @@
|
|||||||
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/net/minecraft/world/level/block/DragonEggBlock.java b/net/minecraft/world/level/block/DragonEggBlock.java
|
|
||||||
index 30d15686b1a81de7ac28feb0c6188eb007c6f2fd..b6799db00e157892dd4339a01d2ca36092c8e491 100644
|
|
||||||
--- a/net/minecraft/world/level/block/DragonEggBlock.java
|
|
||||||
+++ b/net/minecraft/world/level/block/DragonEggBlock.java
|
|
||||||
@@ -48,8 +48,8 @@ public class DragonEggBlock extends FallingBlock {
|
|
||||||
}
|
|
||||||
|
|
||||||
private void teleport(BlockState state, Level world, BlockPos pos) {
|
|
||||||
+ if (!world.purpurConfig.dragonEggTeleport) return; // Purpur
|
|
||||||
WorldBorder worldborder = world.getWorldBorder();
|
|
||||||
-
|
|
||||||
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/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
||||||
index b5712c7aa0de07736c7e6ae0686ed36ed3629235..427e257d7e53d0dc5fbd4acbaa2c1d1f2a12fff8 100644
|
|
||||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
||||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
||||||
@@ -499,6 +499,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;
|
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
--- a/net/minecraft/world/level/block/DragonEggBlock.java
|
||||||
|
+++ b/net/minecraft/world/level/block/DragonEggBlock.java
|
||||||
|
@@ -46,6 +_,7 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
private void teleport(BlockState state, Level level, BlockPos pos) {
|
||||||
|
+ if (!level.purpurConfig.dragonEggTeleport) return; // Purpur - Option to disable dragon egg teleporting
|
||||||
|
WorldBorder worldBorder = level.getWorldBorder();
|
||||||
|
|
||||||
|
for (int i = 0; i < 1000; i++) {
|
||||||
@@ -491,6 +491,11 @@ public class PurpurWorldConfig {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean dragonEggTeleport = true;
|
||||||
|
private void dragonEggSettings() {
|
||||||
|
dragonEggTeleport = getBoolean("blocks.dragon_egg.teleport", dragonEggTeleport);
|
||||||
|
}
|
||||||
|
|
||||||
public boolean baselessEndCrystalExplode = true;
|
public boolean baselessEndCrystalExplode = true;
|
||||||
public double baselessEndCrystalExplosionPower = 6.0D;
|
public double baselessEndCrystalExplosionPower = 6.0D;
|
||||||
public boolean baselessEndCrystalExplosionFire = false;
|
public boolean baselessEndCrystalExplosionFire = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user