mark BundleMeta experimental, shorten material nsid access

This commit is contained in:
Matt Worzala 2021-08-30 18:09:08 -04:00
parent 868c5ba044
commit 220a4db768
No known key found for this signature in database
GPG Key ID: 439DBBE092854841
2 changed files with 2 additions and 3 deletions

View File

@ -255,7 +255,7 @@ public final class ItemStack implements TagReadable, HoverEventSource<HoverEvent
@ApiStatus.Experimental
public @NotNull NBTCompound toItemNBT() {
final NBTCompound nbtCompound = new NBTCompound();
nbtCompound.setString("id", getMaterial().namespace().asString());
nbtCompound.setString("id", getMaterial().name());
nbtCompound.setByte("Count", (byte) getAmount());
nbtCompound.set("tag", getMeta().toNBT());
return nbtCompound;

View File

@ -5,16 +5,15 @@ import net.minestom.server.item.ItemMetaBuilder;
import net.minestom.server.item.ItemStack;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jglrxavpok.hephaistos.nbt.NBTCompound;
import org.jglrxavpok.hephaistos.nbt.NBTList;
import org.jglrxavpok.hephaistos.nbt.NBTTypes;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.function.Supplier;
@ApiStatus.Experimental
public class BundleMeta extends ItemMeta implements ItemMetaBuilder.Provider<BundleMeta.Builder> {
private final List<ItemStack> items;