Files
Purpur/patches/server/0164-Option-to-disable-dragon-egg-teleporting.patch
granny ffeb49da1e ignore item_model component for don't run with scissors feature alongside custom_model_data component
by default, the "don't run with scissors" feature will not activate for shears that have an `item_model` component or `custom_model_data` component.

adds a new world config option at `gameplay-mechanics.item.shears.damage-if-sprinting-item-model` that allows specifying a custom item model ResourceLocation (`purpurmc:scissors` by default) for use with this feature.
2024-12-06 06:05:14 -08:00

37 lines
1.9 KiB
Diff

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 30d15686b1a81de7ac28feb0c6188eb007c6f2fd..b6799db00e157892dd4339a01d2ca36092c8e491 100644
--- a/src/main/java/net/minecraft/world/level/block/DragonEggBlock.java
+++ b/src/main/java/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;