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

Aperta
#8,726 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

  • #8735 di @YuuGR1337 — chiusa senza merge

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
java
Ambito
backend

Direzione di ricerca

Start with the reported EntitySnapshot.convert method and reproduce the issue using a zombie spawn egg from the creative inventory, including in the test environment. Trace why the conversion returns nothing; done means spawn egg entity of player's tool returns the spawn egg's entity.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug documentation priority: low server issue
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.
Lingua principale
Java
Stelle
1.3k
Fork
456
Merge medio
4g 14h
PR unite (30g)
6

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di SkriptLang/Skript

Tutte le issue di SkriptLang/Skript

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.