From ede61453cb7e94d913790ddeffb57bcc3121008f Mon Sep 17 00:00:00 2001 From: zontreck Date: Tue, 30 Apr 2024 16:04:39 -0700 Subject: [PATCH] Apply hotfix preventing logins --- gradle.properties | 2 +- .../essentials/commands/homes/SetHomeCommand.java | 3 ++- .../commands/teleport/TeleportDestination.java | 9 +++++---- .../essentials/commands/warps/RTPWarpCommand.java | 3 ++- .../essentials/commands/warps/SetWarpCommand.java | 3 ++- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/gradle.properties b/gradle.properties index 4576309..91757d8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -48,7 +48,7 @@ mod_name=Aria's Essentials # The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default. mod_license=GPLv3 # The mod version. See https://semver.org/ -mod_version=1201.2.043024.0433 +mod_version=1201.2.043024.1600 # The group ID for the mod. It is only important when publishing as an artifact to a Maven repository. # This should match the base package used for the mod sources. # See https://maven.apache.org/guides/mini/guide-naming-conventions.html diff --git a/src/main/java/dev/zontreck/essentials/commands/homes/SetHomeCommand.java b/src/main/java/dev/zontreck/essentials/commands/homes/SetHomeCommand.java index 92f1c36..ea936c8 100644 --- a/src/main/java/dev/zontreck/essentials/commands/homes/SetHomeCommand.java +++ b/src/main/java/dev/zontreck/essentials/commands/homes/SetHomeCommand.java @@ -17,6 +17,7 @@ import dev.zontreck.essentials.homes.Home; import dev.zontreck.libzontreck.chat.ChatColor; import dev.zontreck.essentials.configs.server.AEServerConfig; import dev.zontreck.libzontreck.util.ChatHelpers; +import dev.zontreck.libzontreck.vectors.Vector2f; import dev.zontreck.libzontreck.vectors.Vector2i; import dev.zontreck.libzontreck.vectors.Vector3d; import net.minecraft.commands.CommandSourceStack; @@ -69,7 +70,7 @@ public class SetHomeCommand { Vec3 position = p.position(); Vec2 rot = p.getRotationVector(); - TeleportDestination dest = new TeleportDestination(new Vector3d(position), new Vector2i(rot), p.serverLevel()); + TeleportDestination dest = new TeleportDestination(new Vector3d(position), new Vector2f(rot), p.serverLevel()); BlockState bs = p.serverLevel().getBlockState(dest.Position.moveDown().asBlockPos()); Home newhome = new Home(p, homeName, dest, new ItemStack(p.getBlockStateOn().getBlock().asItem())); diff --git a/src/main/java/dev/zontreck/essentials/commands/teleport/TeleportDestination.java b/src/main/java/dev/zontreck/essentials/commands/teleport/TeleportDestination.java index 539e9ec..04c9fb1 100644 --- a/src/main/java/dev/zontreck/essentials/commands/teleport/TeleportDestination.java +++ b/src/main/java/dev/zontreck/essentials/commands/teleport/TeleportDestination.java @@ -1,6 +1,7 @@ package dev.zontreck.essentials.commands.teleport; import dev.zontreck.libzontreck.api.Vector2; +import dev.zontreck.libzontreck.vectors.Vector2f; import dev.zontreck.libzontreck.vectors.Vector2i; import dev.zontreck.libzontreck.vectors.Vector3d; import dev.zontreck.libzontreck.vectors.WorldPosition; @@ -14,20 +15,20 @@ import net.minecraft.server.level.ServerLevel; **/ public class TeleportDestination extends WorldPosition { - public Vector2i Rotation; + public Vector2f Rotation; public TeleportDestination(CompoundTag tag) throws InvalidDeserialization { super(tag, true); - Rotation = Vector2i.parseString(tag.getString("Rotation")); + Rotation = Vector2f.parseString(tag.getString("Rotation")); } - public TeleportDestination(Vector3d pos, Vector2i rot, String dim) + public TeleportDestination(Vector3d pos, Vector2f rot, String dim) { super(pos, dim); Rotation = rot; } - public TeleportDestination(Vector3d pos, Vector2i rot, ServerLevel dim) + public TeleportDestination(Vector3d pos, Vector2f rot, ServerLevel dim) { super(pos,dim); Rotation=rot; diff --git a/src/main/java/dev/zontreck/essentials/commands/warps/RTPWarpCommand.java b/src/main/java/dev/zontreck/essentials/commands/warps/RTPWarpCommand.java index 0403dd7..d588bab 100644 --- a/src/main/java/dev/zontreck/essentials/commands/warps/RTPWarpCommand.java +++ b/src/main/java/dev/zontreck/essentials/commands/warps/RTPWarpCommand.java @@ -15,6 +15,7 @@ import dev.zontreck.essentials.warps.Warp; import dev.zontreck.essentials.warps.WarpsProvider; import dev.zontreck.libzontreck.chat.ChatColor; import dev.zontreck.libzontreck.util.ChatHelpers; +import dev.zontreck.libzontreck.vectors.Vector2f; import dev.zontreck.libzontreck.vectors.Vector2i; import dev.zontreck.libzontreck.vectors.Vector3d; import net.minecraft.commands.CommandSourceStack; @@ -50,7 +51,7 @@ public class RTPWarpCommand { Vec3 position = p.position(); Vec2 rot = p.getRotationVector(); - TeleportDestination dest = new TeleportDestination(new Vector3d(position), new Vector2i(rot), p.serverLevel()); + TeleportDestination dest = new TeleportDestination(new Vector3d(position), new Vector2f(rot), p.serverLevel()); Warp warp = new Warp(p.getUUID(), string, true, true, dest, new ItemStack(p.getFeetBlockState().getBlock().asItem())); WarpCreatedEvent event = new WarpCreatedEvent(warp); if(MinecraftForge.EVENT_BUS.post(event)) diff --git a/src/main/java/dev/zontreck/essentials/commands/warps/SetWarpCommand.java b/src/main/java/dev/zontreck/essentials/commands/warps/SetWarpCommand.java index 0cf1fc8..323f55c 100644 --- a/src/main/java/dev/zontreck/essentials/commands/warps/SetWarpCommand.java +++ b/src/main/java/dev/zontreck/essentials/commands/warps/SetWarpCommand.java @@ -15,6 +15,7 @@ import dev.zontreck.essentials.warps.Warp; import dev.zontreck.essentials.warps.WarpsProvider; import dev.zontreck.libzontreck.chat.ChatColor; import dev.zontreck.libzontreck.util.ChatHelpers; +import dev.zontreck.libzontreck.vectors.Vector2f; import dev.zontreck.libzontreck.vectors.Vector2i; import dev.zontreck.libzontreck.vectors.Vector3d; import net.minecraft.commands.CommandSourceStack; @@ -52,7 +53,7 @@ public class SetWarpCommand { Vec3 position = p.position(); Vec2 rot = p.getRotationVector(); - TeleportDestination dest = new TeleportDestination(new Vector3d(position), new Vector2i(rot), p.serverLevel()); + TeleportDestination dest = new TeleportDestination(new Vector3d(position), new Vector2f(rot), p.serverLevel()); BlockState bs = p.serverLevel().getBlockState(dest.Position.moveDown().asBlockPos()); Warp w = new Warp(p.getUUID(), string, false, true, dest, new ItemStack(bs.getBlock().asItem()));