Problem with some Entity functions #28
Labels
resolution: invalid
Issue or Request has no basis.
resolution: won't fix
Issue will not be resolved or feature not added.
type: bug
Something doesn't work as it was intended to.
version: 1.19.4
Game version 1.19.4
Expected behavior
Expected do get results from:
Observed/Actual behavior
[14:45:39] [Region Scheduler Thread #0/ERROR]: Could not pass event ServerTickEndEvent to CoolProtection v1.6
java.lang.IllegalStateException: Cannot getEntities asynchronously
at io.papermc.paper.util.TickThread.ensureTickThread(TickThread.java:86) ~[folia-1.19.4.jar:git-Folia-"7072994"] at net.minecraft.world.level.Level.getEntities(Level.java:1157) ~[folia-1.19.4.jar:git-Folia-"7072994"]
at org.bukkit.craftbukkit.v1_19_R3.CraftWorld.getNearbyEntities(CraftWorld.java:1099) ~[folia-1.19.4.jar:git-Folia-"7072994"]
at org.bukkit.craftbukkit.v1_19_R3.CraftWorld.getNearbyEntities(CraftWorld.java:1085) ~[folia-1.19.4.jar:git-Folia-"7072994"]
at org.bukkit.craftbukkit.v1_19_R3.CraftWorld.getNearbyEntities(CraftWorld.java:1076) ~[folia-1.19.4.jar:git-Folia-"7072994"]
at org.bukkit.World.getNearbyEntitiesByType(World.java:1074) ~[folia-api-1.19.4-R0.1-SNAPSHOT.jar:?]
at org.bukkit.World.getNearbyEntitiesByType(World.java:1025) ~[folia-api-1.19.4-R0.1-SNAPSHOT.jar:?]
at org.bukkit.World.getNearbyLivingEntities(World.java:856) ~[folia-api-1.19.4-R0.1-SNAPSHOT.jar:?]
Steps/models to reproduce
Call
public void test(Player player) {
int currentLiving = player.getWorld().getLivingEntities().size();
int currentEntities = player.getWorld().getEntities().size();
int currentChunkEntities = player.getLocation().getChunk().getEntities().length;
//Fails from here
//print..
}
Plugin and Datapack List
1 plugin been adapted
Folia version
[14:52:02 INFO]: Checking version, please wait...
[14:52:03 INFO]: This server is running Folia version git-Folia-"7072994" (MC: 1.19.4) (Implementing API version 1.19.4-R0.1-SNAPSHOT) (Git: 7072994)
You are running the latest version
Previous version: git-Folia-"00cfbaa" (MC: 1.19.4)
Other
No response
The text was updated successfully, but these errors were encountered: