Ship update to OTEMod

This commit is contained in:
Tara 2023-01-08 01:50:47 -07:00
parent 9a73e1161c
commit 172c9b51ed
14 changed files with 480 additions and 30 deletions

View file

@ -2,10 +2,15 @@ package dev.zontreck.otemod.commands.zschem;
import com.mojang.brigadier.CommandDispatcher;
import dev.zontreck.libzontreck.chat.ChatColor;
import dev.zontreck.libzontreck.vectors.Vector3;
import dev.zontreck.otemod.OTEMod;
import dev.zontreck.otemod.chat.ChatServerOverride;
import dev.zontreck.otemod.zschem.MemoryHolder;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.commands.Commands;
import net.minecraft.network.chat.Component;
import net.minecraft.server.level.ServerPlayer;
public class SetPos2 {
@ -20,7 +25,13 @@ public class SetPos2 {
}
private static int setzPos2(CommandSourceStack source) {
MemoryHolder.setPos2(source.getPlayer(), new Vector3(source.getPosition()));
ServerPlayer play = source.getPlayer();
if(play==null)return 1;
MemoryHolder.setPos2(play, new Vector3(source.getPosition()));
MemoryHolder.setLevel(play, source.getLevel());
ChatServerOverride.broadcastTo(play.getUUID(), Component.literal(OTEMod.OTEPrefix+ChatColor.doColors(" !Dark_Green!Position 2 set!")), OTEMod.THE_SERVER);
return 0;
}