Update to 1.19

This commit is contained in:
MonkeySaint
2022-06-10 15:37:58 -04:00
committed by Cloudburst
parent f0b189634f
commit f8dd3787d1
35 changed files with 170 additions and 164 deletions

View File

@@ -10,7 +10,6 @@ import net.minecraft.nbt.*;
import anticope.rejects.utils.GiveUtils;
import meteordevelopment.meteorclient.systems.commands.Command;
import net.minecraft.text.LiteralText;
import net.minecraft.text.Text;
import net.minecraft.util.registry.Registry;
@@ -73,7 +72,7 @@ public class GiveCommand extends Command {
tag.putBoolean("Interpret", true);
tag.putBoolean("NoGravity", true);
tag.putBoolean("CustomNameVisible", true);
tag.putString("CustomName", Text.Serializer.toJson(new LiteralText(message)));
tag.putString("CustomName", Text.Serializer.toJson(Text.literal(message)));
tag.put("Pos", NbtList);
stack.setSubNbt("EntityTag", tag);
GiveUtils.giveItem(stack);
@@ -84,7 +83,7 @@ public class GiveCommand extends Command {
String message = ctx.getArgument("message", String.class).replace("&", "\247");
ItemStack stack = new ItemStack(Items.BAT_SPAWN_EGG);
NbtCompound tag = new NbtCompound();
tag.putString("CustomName", Text.Serializer.toJson(new LiteralText(message)));
tag.putString("CustomName", Text.Serializer.toJson(Text.literal(message)));
tag.putBoolean("NoAI", true);
tag.putBoolean("Silent", true);
tag.putBoolean("PersistenceRequired", true);