Apply hotfix preventing logins

This commit is contained in:
zontreck 2024-04-30 16:04:39 -07:00
parent a98b180a87
commit ede61453cb
5 changed files with 12 additions and 8 deletions

View file

@ -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

View file

@ -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()));

View file

@ -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;

View file

@ -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))

View file

@ -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()));