namespace Minecraft.Server.FourKit.Entity; using Minecraft.Server.FourKit.Inventory; /// /// Represents a dropped item on the ground. /// public class Item : Entity { private ItemStack _itemStack; internal Item(int entityId, int dimId, double x, double y, double z, ItemStack itemStack) { SetEntityIdInternal(entityId); SetEntityTypeInternal(EntityType.DROPPED_ITEM); SetDimensionInternal(dimId); SetLocation(new Location(FourKit.getWorld(dimId), x, y, z)); _itemStack = itemStack; } /// /// Gets the item stack associated with this item. /// /// An item stack. public ItemStack getItemStack() => _itemStack; /// /// Sets the item stack of this item. /// /// The new item stack. public void setItemStack(ItemStack stack) => _itemStack = stack; }