Backport updates
This commit is contained in:
parent
6cec3dcbbc
commit
728b2467a3
766 changed files with 32570 additions and 268 deletions
|
@ -7,7 +7,6 @@ import java.sql.SQLException;
|
|||
import com.mojang.brigadier.CommandDispatcher;
|
||||
import com.mojang.brigadier.arguments.StringArgumentType;
|
||||
|
||||
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||
import dev.zontreck.essentials.Messages;
|
||||
import dev.zontreck.essentials.commands.teleport.TeleportDestination;
|
||||
import dev.zontreck.essentials.events.CommandExecutionEvent;
|
||||
|
@ -16,8 +15,9 @@ 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.Vector2;
|
||||
import dev.zontreck.libzontreck.vectors.Vector3;
|
||||
import dev.zontreck.libzontreck.vectors.Vector2f;
|
||||
import dev.zontreck.libzontreck.vectors.Vector2i;
|
||||
import dev.zontreck.libzontreck.vectors.Vector3d;
|
||||
import net.minecraft.commands.CommandSourceStack;
|
||||
import net.minecraft.commands.Commands;
|
||||
import net.minecraft.network.chat.Component;
|
||||
|
@ -41,12 +41,7 @@ public class RTPWarpCommand {
|
|||
|
||||
private static int setWarp(CommandSourceStack source, String string) {
|
||||
|
||||
CommandExecutionEvent exec = null;
|
||||
try {
|
||||
exec = new CommandExecutionEvent(source.getPlayerOrException(), "setwarp");
|
||||
} catch (CommandSyntaxException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
var exec = new CommandExecutionEvent(source.getPlayer(), "setwarp");
|
||||
if(MinecraftForge.EVENT_BUS.post(exec))
|
||||
{
|
||||
return 0;
|
||||
|
@ -56,7 +51,7 @@ public class RTPWarpCommand {
|
|||
Vec3 position = p.position();
|
||||
Vec2 rot = p.getRotationVector();
|
||||
|
||||
TeleportDestination dest = new TeleportDestination(new Vector3(position), new Vector2(rot), p.getLevel());
|
||||
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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue