New Modules and update to 1.19.3 (#186)

This commit is contained in:
SodaXwX
2022-12-23 21:45:57 +08:00
committed by GitHub
parent 64933773a7
commit 3c14b3bc8f
33 changed files with 663 additions and 454 deletions

View File

@@ -10,8 +10,8 @@ import net.minecraft.nbt.*;
import anticope.rejects.utils.GiveUtils;
import meteordevelopment.meteorclient.systems.commands.Command;
import net.minecraft.registry.Registries;
import net.minecraft.text.Text;
import net.minecraft.util.registry.Registry;
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
@@ -34,7 +34,7 @@ public class GiveCommand extends Command {
ct.putInt("Time",1);
ct.putString("id", "minecraft:falling_block");
ct.put("BlockState", new NbtCompound());
ct.getCompound("BlockState").putString("Name", Registry.ITEM.getId(inHand.getItem()).toString());
ct.getCompound("BlockState").putString("Name", Registries.ITEM.getId(inHand.getItem()).toString());
if (inHand.hasNbt() && inHand.getNbt().contains("BlockEntityTag")) {
ct.put("TileEntityData", inHand.getNbt().getCompound("BlockEntityTag"));
}
@@ -44,7 +44,7 @@ public class GiveCommand extends Command {
} else {
ct.putString("id", "minecraft:item");
NbtCompound it = new NbtCompound();
it.putString("id", Registry.ITEM.getId(inHand.getItem()).toString());
it.putString("id", Registries.ITEM.getId(inHand.getItem()).toString());
it.putInt("Count",inHand.getCount());
if (inHand.hasNbt()) {
it.put("tag", inHand.getNbt());