9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-26 10:29:13 +00:00

添加选项,我是joker

This commit is contained in:
lilingfengdev
2024-01-17 14:38:35 +08:00
parent fe49584f43
commit 1cfdc3aa29
2 changed files with 46 additions and 1 deletions

View File

@@ -65,6 +65,6 @@ index c51b54bcb96d06197d6265055e2e9e44858cd224..156765eeee6ab46f18e34cf62dde1a7d
}
+ public static boolean disableMovedWronglyThreshold = false;
+ private static void getDisableMovedWronglyThreshold() {
+ disableMovedWronglyThreshold = getBoolean("disableMovedWronglyThreshold",disableMovedWronglyThreshold,"Disable Moved Wrongly Threshold");
+ disableMovedWronglyThreshold = getBoolean("disableMovedWronglyThreshold",disableMovedWronglyThreshold,:"Disable Moved Wrongly Threshold")
+ }
}

View File

@@ -0,0 +1,45 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: lilingfengdev <145678359+lilingfengdev@users.noreply.github.com>
Date: Wed, 17 Jan 2024 14:29:37 +0800
Subject: [PATCH] Leaves be vanilla end gateway
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
index 5d9f25da1bd502b0047abc64ef7602968ee3cb20..2ca123ecd7cac2c7fdaafcc2c58c8c126adcf94a 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
@@ -38,6 +38,9 @@ import org.bukkit.craftbukkit.entity.CraftPlayer;
import org.bukkit.craftbukkit.util.CraftLocation;
import org.bukkit.event.player.PlayerTeleportEvent;
// CraftBukkit end
+// Leaf start
+import org.dreeam.leaf.LeafConfig;
+// Leaf end
public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity {
@@ -107,7 +110,7 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity {
if (!list.isEmpty()) {
// Paper start
for (Entity entity : list) {
- if (entity.canChangeDimensions()) {
+ if (LeafConfig.vanillaEndTeleport || entity.canChangeDimensions()) { // Leaf - be vanilla
TheEndGatewayBlockEntity.teleportEntity(world, pos, state, entity, blockEntity);
break;
}
diff --git a/src/main/java/org/dreeam/leaf/LeafConfig.java b/src/main/java/org/dreeam/leaf/LeafConfig.java
index 156765eeee6ab46f18e34cf62dde1a7d878932cc..728082120af5a7afe20078b3fa6d80605f5ff6c7 100644
--- a/src/main/java/org/dreeam/leaf/LeafConfig.java
+++ b/src/main/java/org/dreeam/leaf/LeafConfig.java
@@ -315,6 +315,10 @@ public class LeafConfig {
}
public static boolean disableMovedWronglyThreshold = false;
private static void getDisableMovedWronglyThreshold() {
- disableMovedWronglyThreshold = getBoolean("disableMovedWronglyThreshold",disableMovedWronglyThreshold,:"Disable Moved Wrongly Threshold")
+ disableMovedWronglyThreshold = getBoolean("disableMovedWronglyThreshold",disableMovedWronglyThreshold,"Disable Moved Wrongly Threshold");
+ }
+ public static boolean vanillaEndTeleport = false;
+ private static void getVanillaTeleport() {
+ vanillaEndTeleport = getBoolean("vanillaEndTeleport",vanillaEndTeleport,"Vanilla End Gateway Teleport");
}
}