mirror of
https://github.com/songoda/SongodaCore.git
synced 2024-11-23 10:35:18 +01:00
Fix NoSuchFieldError on Paper-Spigot 1.19.2 for SWorld#getLivingEntities
The field does not exist on Spigot (located in another class?). But `#getEntities()` does exactly what we need and Paper-Spigot still has it. SD-9374 SD-9377 SD-9392 SD-9401
This commit is contained in:
parent
92c653d9be
commit
5f43578869
@ -134,7 +134,7 @@ public class NmsManager {
|
||||
anvil = new com.songoda.core.nms.v1_19_R1.anvil.AnvilCore();
|
||||
nbt = new com.songoda.core.nms.v1_19_R1.nbt.NBTCoreImpl();
|
||||
world = new com.songoda.core.nms.v1_19_R1.world.WorldCoreImpl();
|
||||
}else{
|
||||
} else {
|
||||
player = new com.songoda.core.nms.v1_19_R1v2.entity.NMSPlayerImpl();
|
||||
anvil = new com.songoda.core.nms.v1_19_R1v2.anvil.AnvilCore();
|
||||
nbt = new com.songoda.core.nms.v1_19_R1v2.nbt.NBTCoreImpl();
|
||||
|
@ -23,7 +23,7 @@ public class SWorldImpl implements SWorld {
|
||||
List<LivingEntity> result = new ArrayList<>();
|
||||
|
||||
ServerLevel worldServer = ((CraftWorld) world).getHandle();
|
||||
LevelEntityGetter<Entity> entities = worldServer.entityManager.getEntityGetter();
|
||||
LevelEntityGetter<Entity> entities = worldServer.getEntities();
|
||||
|
||||
entities.getAll().forEach((mcEnt) -> {
|
||||
org.bukkit.entity.Entity bukkitEntity = mcEnt.getBukkitEntity();
|
||||
|
@ -23,7 +23,7 @@ public class SWorldImpl implements SWorld {
|
||||
List<LivingEntity> result = new ArrayList<>();
|
||||
|
||||
ServerLevel worldServer = ((CraftWorld) world).getHandle();
|
||||
LevelEntityGetter<Entity> entities = worldServer.entityManager.getEntityGetter();
|
||||
LevelEntityGetter<Entity> entities = worldServer.getEntities();
|
||||
|
||||
entities.getAll().forEach((mcEnt) -> {
|
||||
org.bukkit.entity.Entity bukkitEntity = mcEnt.getBukkitEntity();
|
||||
|
Loading…
Reference in New Issue
Block a user