-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Readd Leaves: Fix vehicle teleport by end gateway
- Loading branch information
1 parent
9ded554
commit 300d3f2
Showing
44 changed files
with
58 additions
and
4 deletions.
There are no files selected for viewing
54 changes: 54 additions & 0 deletions
54
patches/server/0035-Leaves-Fix-vehicle-teleport-by-end-gateway.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
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 5717b1c2fd5b16d439499296edd35d72b6613212..2cc37cf1c3e8f7c8fdd6c1b9cfad02283f8f1dec 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 | ||
@@ -229,7 +229,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"); | ||
+ } | ||
+} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.