#Help

1 messages · Page 1 of 1 (latest)

serene vessel
#

hmm, which item and how

#
import { ItemStack, system } from "@minecraft/server";

system.afterEvents.scriptEventReceive.subscribe(({ sourceEntity: e, id }) => {
  if (id !== "Give:Item") return;

  const inventory = e.getComponent("inventory")?.container;
  if (!inventory) return;

  inventory.addItem(new ItemStack("minecraft:emerald", 1));
});
#

here is a base