mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-22 16:39:22 +00:00
59 lines
2.8 KiB
Diff
59 lines
2.8 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
|
|
|
|
Removed since 1.21
|
|
|
|
Original license: GPLv3
|
|
Original project: https://github.com/LeavesMC/Leaves
|
|
|
|
Commit: e234432bd99e1c4b07c24d1dd247977226a7516a
|
|
|
|
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 0e58011d22536051a18388c2d45fd1a30c2f5ffd..2910af920a746f90529f94038922e2a9e6ad3bc1 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
|
|
@@ -223,7 +223,7 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity {
|
|
|
|
entity1.setPortalCooldown();
|
|
((ServerPlayer) entity1).connection.teleport(teleEvent.getTo());
|
|
- entity1.teleportPassengers(); // Paper - teleport passengers as well, preventing invisible passengers post teleport.
|
|
+ if (!org.dreeam.leaf.config.modules.gameplay.UseVanillaEndTeleport.enabled) entity1.teleportPassengers(); // Paper - teleport passengers as well, preventing invisible passengers post teleport. // Leaf - Leaves - vanilla
|
|
TheEndGatewayBlockEntity.triggerCooldown(world, pos, state, blockEntity); // CraftBukkit - call at end of method
|
|
return;
|
|
|
|
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");
|
|
+ }
|
|
+}
|