mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-30 21:17:53 +01:00
mark BundleMeta experimental, shorten material nsid access
This commit is contained in:
parent
868c5ba044
commit
220a4db768
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user