Apply hotfix preventing logins
This commit is contained in:
parent
a98b180a87
commit
ede61453cb
5 changed files with 12 additions and 8 deletions
|
@ -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.
|
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
|
||||||
mod_license=GPLv3
|
mod_license=GPLv3
|
||||||
# The mod version. See https://semver.org/
|
# 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.
|
# 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.
|
# This should match the base package used for the mod sources.
|
||||||
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
|
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||||
|
|
|
@ -17,6 +17,7 @@ import dev.zontreck.essentials.homes.Home;
|
||||||
import dev.zontreck.libzontreck.chat.ChatColor;
|
import dev.zontreck.libzontreck.chat.ChatColor;
|
||||||
import dev.zontreck.essentials.configs.server.AEServerConfig;
|
import dev.zontreck.essentials.configs.server.AEServerConfig;
|
||||||
import dev.zontreck.libzontreck.util.ChatHelpers;
|
import dev.zontreck.libzontreck.util.ChatHelpers;
|
||||||
|
import dev.zontreck.libzontreck.vectors.Vector2f;
|
||||||
import dev.zontreck.libzontreck.vectors.Vector2i;
|
import dev.zontreck.libzontreck.vectors.Vector2i;
|
||||||
import dev.zontreck.libzontreck.vectors.Vector3d;
|
import dev.zontreck.libzontreck.vectors.Vector3d;
|
||||||
import net.minecraft.commands.CommandSourceStack;
|
import net.minecraft.commands.CommandSourceStack;
|
||||||
|
@ -69,7 +70,7 @@ public class SetHomeCommand {
|
||||||
Vec3 position = p.position();
|
Vec3 position = p.position();
|
||||||
Vec2 rot = p.getRotationVector();
|
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());
|
BlockState bs = p.serverLevel().getBlockState(dest.Position.moveDown().asBlockPos());
|
||||||
|
|
||||||
Home newhome = new Home(p, homeName, dest, new ItemStack(p.getBlockStateOn().getBlock().asItem()));
|
Home newhome = new Home(p, homeName, dest, new ItemStack(p.getBlockStateOn().getBlock().asItem()));
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package dev.zontreck.essentials.commands.teleport;
|
package dev.zontreck.essentials.commands.teleport;
|
||||||
|
|
||||||
import dev.zontreck.libzontreck.api.Vector2;
|
import dev.zontreck.libzontreck.api.Vector2;
|
||||||
|
import dev.zontreck.libzontreck.vectors.Vector2f;
|
||||||
import dev.zontreck.libzontreck.vectors.Vector2i;
|
import dev.zontreck.libzontreck.vectors.Vector2i;
|
||||||
import dev.zontreck.libzontreck.vectors.Vector3d;
|
import dev.zontreck.libzontreck.vectors.Vector3d;
|
||||||
import dev.zontreck.libzontreck.vectors.WorldPosition;
|
import dev.zontreck.libzontreck.vectors.WorldPosition;
|
||||||
|
@ -14,20 +15,20 @@ import net.minecraft.server.level.ServerLevel;
|
||||||
**/
|
**/
|
||||||
public class TeleportDestination extends WorldPosition
|
public class TeleportDestination extends WorldPosition
|
||||||
{
|
{
|
||||||
public Vector2i Rotation;
|
public Vector2f Rotation;
|
||||||
|
|
||||||
public TeleportDestination(CompoundTag tag) throws InvalidDeserialization
|
public TeleportDestination(CompoundTag tag) throws InvalidDeserialization
|
||||||
{
|
{
|
||||||
super(tag, true);
|
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);
|
super(pos, dim);
|
||||||
Rotation = rot;
|
Rotation = rot;
|
||||||
}
|
}
|
||||||
|
|
||||||
public TeleportDestination(Vector3d pos, Vector2i rot, ServerLevel dim)
|
public TeleportDestination(Vector3d pos, Vector2f rot, ServerLevel dim)
|
||||||
{
|
{
|
||||||
super(pos,dim);
|
super(pos,dim);
|
||||||
Rotation=rot;
|
Rotation=rot;
|
||||||
|
|
|
@ -15,6 +15,7 @@ import dev.zontreck.essentials.warps.Warp;
|
||||||
import dev.zontreck.essentials.warps.WarpsProvider;
|
import dev.zontreck.essentials.warps.WarpsProvider;
|
||||||
import dev.zontreck.libzontreck.chat.ChatColor;
|
import dev.zontreck.libzontreck.chat.ChatColor;
|
||||||
import dev.zontreck.libzontreck.util.ChatHelpers;
|
import dev.zontreck.libzontreck.util.ChatHelpers;
|
||||||
|
import dev.zontreck.libzontreck.vectors.Vector2f;
|
||||||
import dev.zontreck.libzontreck.vectors.Vector2i;
|
import dev.zontreck.libzontreck.vectors.Vector2i;
|
||||||
import dev.zontreck.libzontreck.vectors.Vector3d;
|
import dev.zontreck.libzontreck.vectors.Vector3d;
|
||||||
import net.minecraft.commands.CommandSourceStack;
|
import net.minecraft.commands.CommandSourceStack;
|
||||||
|
@ -50,7 +51,7 @@ public class RTPWarpCommand {
|
||||||
Vec3 position = p.position();
|
Vec3 position = p.position();
|
||||||
Vec2 rot = p.getRotationVector();
|
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()));
|
Warp warp = new Warp(p.getUUID(), string, true, true, dest, new ItemStack(p.getFeetBlockState().getBlock().asItem()));
|
||||||
WarpCreatedEvent event = new WarpCreatedEvent(warp);
|
WarpCreatedEvent event = new WarpCreatedEvent(warp);
|
||||||
if(MinecraftForge.EVENT_BUS.post(event))
|
if(MinecraftForge.EVENT_BUS.post(event))
|
||||||
|
|
|
@ -15,6 +15,7 @@ import dev.zontreck.essentials.warps.Warp;
|
||||||
import dev.zontreck.essentials.warps.WarpsProvider;
|
import dev.zontreck.essentials.warps.WarpsProvider;
|
||||||
import dev.zontreck.libzontreck.chat.ChatColor;
|
import dev.zontreck.libzontreck.chat.ChatColor;
|
||||||
import dev.zontreck.libzontreck.util.ChatHelpers;
|
import dev.zontreck.libzontreck.util.ChatHelpers;
|
||||||
|
import dev.zontreck.libzontreck.vectors.Vector2f;
|
||||||
import dev.zontreck.libzontreck.vectors.Vector2i;
|
import dev.zontreck.libzontreck.vectors.Vector2i;
|
||||||
import dev.zontreck.libzontreck.vectors.Vector3d;
|
import dev.zontreck.libzontreck.vectors.Vector3d;
|
||||||
import net.minecraft.commands.CommandSourceStack;
|
import net.minecraft.commands.CommandSourceStack;
|
||||||
|
@ -52,7 +53,7 @@ public class SetWarpCommand {
|
||||||
Vec3 position = p.position();
|
Vec3 position = p.position();
|
||||||
Vec2 rot = p.getRotationVector();
|
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());
|
BlockState bs = p.serverLevel().getBlockState(dest.Position.moveDown().asBlockPos());
|
||||||
|
|
||||||
Warp w = new Warp(p.getUUID(), string, false, true, dest, new ItemStack(bs.getBlock().asItem()));
|
Warp w = new Warp(p.getUUID(), string, false, true, dest, new ItemStack(bs.getBlock().asItem()));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue