9
0
mirror of https://github.com/WiIIiam278/HuskSync.git synced 2025-12-19 14:59:21 +00:00

fix: Breaking chage in fabric API

This commit is contained in:
동헌희
2024-07-07 15:21:19 +09:00
committed by Dong Heon Hee
parent 32ac57e2a4
commit 93f7294859
2 changed files with 12 additions and 16 deletions

View File

@@ -24,7 +24,6 @@ import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import com.google.gson.annotations.SerializedName;
import lombok.*;
import net.fabricmc.fabric.api.dimension.v1.FabricDimensions;
import net.minecraft.advancement.AdvancementProgress;
import net.minecraft.advancement.PlayerAdvancementTracker;
import net.minecraft.enchantment.EnchantmentHelper;
@@ -433,19 +432,16 @@ public abstract class FabricData implements Data {
final MinecraftServer server = plugin.getMinecraftServer();
try {
player.dismountVehicle();
FabricDimensions.teleport(
player,
player.teleportTo(
new TeleportTarget(
server.getWorld(server.getWorldRegistryKeys().stream()
.filter(key -> key.getValue().equals(Identifier.tryParse(world.name())))
.findFirst().orElseThrow(
() -> new IllegalStateException("Invalid world")
)),
new TeleportTarget(
new Vec3d(x, y, z),
Vec3d.ZERO,
yaw,
pitch
)
.filter(key -> key.getValue().equals(Identifier.tryParse(world.name())))
.findFirst().orElseThrow(
() -> new IllegalStateException("Invalid world")
)),
player,
TeleportTarget.NO_OP
)
);
} catch (Throwable e) {
throw new IllegalStateException("Failed to apply location", e);

View File

@@ -14,10 +14,10 @@ postgres_driver_version=42.7.3
mongodb_driver_version=5.1.0
snappy_version=1.1.10.5
fabric_minecraft_version=1.20.1
fabric_minecraft_version=1.21
fabric_loader_version=0.15.11
fabric_yarn_mappings=1.20.1+build.10
fabric_api_version=0.92.2+1.20.1
fabric_yarn_mappings=1.21+build.7
fabric_api_version=0.100.4+1.21
adventure_platform_fabric_version=5.9.0
fabric_permissions_api_version=0.2-SNAPSHOT
sgui_version=1.2.2+1.20