Skip to content

Spawn egg entity of player's tool doesn't work #8726

Description

@TheLimeGlass

Skript/Server Version

2.15.3
mc 1.21.5
SkBee 3.19

Bug Description

The example message spawn egg entity of player's tool doesn't work. Returns nothing.

Expected Behavior

To return the spawn egg of a zombie spawn egg taken from creative inventory

Steps to Reproduce

Grab a zombie spawn egg taken from creative inventory and run the example

Errors or Screenshots

No response

Other

problem

	@Override
	public @Nullable EntitySnapshot convert(Object object) {
		ItemStack itemStack = ItemUtils.asItemStack(object);
		if (itemStack == null || !(itemStack.getItemMeta() instanceof SpawnEggMeta eggMeta))
			return null;
		return eggMeta.getSpawnedEntity();
	}

Happens in the test environment too, the whole expression just doesn't work.

Agreement

  • I have read the guidelines above and affirm I am following them with this report.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn issue that needs to be fixed. Alternatively, a PR fixing an issue.documentationRelated to Skript's official documentation.priority: lowIssues that are not harmful to the experience but are related to useful changes or additions.server issueThis is an issue with the Spigot/Paper/etc server, and should be reported to the server software.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    Status
    Planned Issues

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions