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:
@@ -24,7 +24,6 @@ import com.google.common.collect.Maps;
|
|||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import net.fabricmc.fabric.api.dimension.v1.FabricDimensions;
|
|
||||||
import net.minecraft.advancement.AdvancementProgress;
|
import net.minecraft.advancement.AdvancementProgress;
|
||||||
import net.minecraft.advancement.PlayerAdvancementTracker;
|
import net.minecraft.advancement.PlayerAdvancementTracker;
|
||||||
import net.minecraft.enchantment.EnchantmentHelper;
|
import net.minecraft.enchantment.EnchantmentHelper;
|
||||||
@@ -433,19 +432,16 @@ public abstract class FabricData implements Data {
|
|||||||
final MinecraftServer server = plugin.getMinecraftServer();
|
final MinecraftServer server = plugin.getMinecraftServer();
|
||||||
try {
|
try {
|
||||||
player.dismountVehicle();
|
player.dismountVehicle();
|
||||||
FabricDimensions.teleport(
|
player.teleportTo(
|
||||||
player,
|
new TeleportTarget(
|
||||||
server.getWorld(server.getWorldRegistryKeys().stream()
|
server.getWorld(server.getWorldRegistryKeys().stream()
|
||||||
.filter(key -> key.getValue().equals(Identifier.tryParse(world.name())))
|
.filter(key -> key.getValue().equals(Identifier.tryParse(world.name())))
|
||||||
.findFirst().orElseThrow(
|
.findFirst().orElseThrow(
|
||||||
() -> new IllegalStateException("Invalid world")
|
() -> new IllegalStateException("Invalid world")
|
||||||
)),
|
)),
|
||||||
new TeleportTarget(
|
player,
|
||||||
new Vec3d(x, y, z),
|
TeleportTarget.NO_OP
|
||||||
Vec3d.ZERO,
|
)
|
||||||
yaw,
|
|
||||||
pitch
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
throw new IllegalStateException("Failed to apply location", e);
|
throw new IllegalStateException("Failed to apply location", e);
|
||||||
|
|||||||
@@ -14,10 +14,10 @@ postgres_driver_version=42.7.3
|
|||||||
mongodb_driver_version=5.1.0
|
mongodb_driver_version=5.1.0
|
||||||
snappy_version=1.1.10.5
|
snappy_version=1.1.10.5
|
||||||
|
|
||||||
fabric_minecraft_version=1.20.1
|
fabric_minecraft_version=1.21
|
||||||
fabric_loader_version=0.15.11
|
fabric_loader_version=0.15.11
|
||||||
fabric_yarn_mappings=1.20.1+build.10
|
fabric_yarn_mappings=1.21+build.7
|
||||||
fabric_api_version=0.92.2+1.20.1
|
fabric_api_version=0.100.4+1.21
|
||||||
adventure_platform_fabric_version=5.9.0
|
adventure_platform_fabric_version=5.9.0
|
||||||
fabric_permissions_api_version=0.2-SNAPSHOT
|
fabric_permissions_api_version=0.2-SNAPSHOT
|
||||||
sgui_version=1.2.2+1.20
|
sgui_version=1.2.2+1.20
|
||||||
Reference in New Issue
Block a user