Hello
I try to stop a spawned item from stacking with each other.
I create the item like its described in the docs:
ItemStack gold = ItemStack.builder().itemType(ItemTypes.GOLD_INGOT).build();
gold.offer(Keys.DISPLAY_NAME, Text.of(TextColors.GOLD, "Gold"));
Extent extent = _spawnLocation.getExtent();
Entity item = extent.createEntity(EntityTypes.ITEM, _spawnLocation.getPosition());
item.offer(Keys.REPRESENTED_ITEM, gold.createSnapshot());
I then spawn them when a mob gets killed by a player. If they stack i cant work with them correctly.
Is there a way to set a max stack size or something similar?
I tried to cancel the ItemMergeItemEvent
but it just never gets called, i dont know why.
Thanks