mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2026-01-03 14:22:26 +00:00
55 lines
2.5 KiB
Diff
55 lines
2.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: violetc <58360096+s-yh-china@users.noreply.github.com>
|
|
Date: Tue, 15 Aug 2023 22:40:42 +0800
|
|
Subject: [PATCH] Leaves: Fix vehicle teleport by end gateway
|
|
|
|
Original license: GPLv3
|
|
Original project: https://github.com/LeavesMC/Leaves
|
|
|
|
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 72a69569fab9d62c27c3ea4005c4e24816bdc5cd..0c36da54212a7e5ccc2277539daa79e014e0b689 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
|
|
@@ -107,7 +107,7 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity {
|
|
if (!list.isEmpty()) {
|
|
// Paper start - Ensure safe gateway teleport
|
|
for (Entity entity : list) {
|
|
- if (entity.canChangeDimensions()) {
|
|
+ if (org.dreeam.leaf.config.modules.gameplay.UseVanillaEndTeleport.enabled || entity.canChangeDimensions()) { // Leaf - be vanilla
|
|
TheEndGatewayBlockEntity.teleportEntity(world, pos, state, entity, blockEntity);
|
|
break;
|
|
}
|
|
diff --git a/src/main/java/org/dreeam/leaf/config/modules/gameplay/UseVanillaEndTeleport.java b/src/main/java/org/dreeam/leaf/config/modules/gameplay/UseVanillaEndTeleport.java
|
|
new file mode 100644
|
|
index 0000000000000000000000000000000000000000..778f428eaaf22236e52aa4b670f5ec34996ea862
|
|
--- /dev/null
|
|
+++ b/src/main/java/org/dreeam/leaf/config/modules/gameplay/UseVanillaEndTeleport.java
|
|
@@ -0,0 +1,27 @@
|
|
+package org.dreeam.leaf.config.modules.gameplay;
|
|
+
|
|
+import com.electronwill.nightconfig.core.file.CommentedFileConfig;
|
|
+import org.dreeam.leaf.config.ConfigInfo;
|
|
+import org.dreeam.leaf.config.EnumConfigCategory;
|
|
+import org.dreeam.leaf.config.IConfigModule;
|
|
+
|
|
+public class UseVanillaEndTeleport implements IConfigModule {
|
|
+
|
|
+ @Override
|
|
+ public EnumConfigCategory getCategory() {
|
|
+ return EnumConfigCategory.GAMEPLAY;
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public String getBaseName() {
|
|
+ return "use_vanilla_end_teleport";
|
|
+ }
|
|
+
|
|
+ @ConfigInfo(baseName = "enabled")
|
|
+ public static boolean enabled = false;
|
|
+
|
|
+ @Override
|
|
+ public void onLoaded(CommentedFileConfig config) {
|
|
+ config.setComment("gameplay.use_vanilla_end_teleport", "Enable to Use Vanilla End Gateway Teleport");
|
|
+ }
|
|
+}
|