mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-04 07:17:46 +01:00
Fix spawn egg equality check and copy constructor
By: md_5 <git@md-5.net>
This commit is contained in:
parent
cd2a1a6d7e
commit
92a9fb31be
@ -111,6 +111,12 @@ public class CraftMetaSpawnEgg extends CraftMetaItem implements SpawnEggMeta {
|
||||
|
||||
CraftMetaSpawnEgg(CraftMetaItem meta) {
|
||||
super(meta);
|
||||
|
||||
if (!(meta instanceof CraftMetaSpawnEgg egg)) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.entityTag = egg.entityTag;
|
||||
}
|
||||
|
||||
CraftMetaSpawnEgg(DataComponentPatch tag) {
|
||||
@ -167,7 +173,7 @@ public class CraftMetaSpawnEgg extends CraftMetaItem implements SpawnEggMeta {
|
||||
}
|
||||
|
||||
boolean isSpawnEggEmpty() {
|
||||
return entityTag != null;
|
||||
return !(entityTag != null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user