#Villager Panicking not work

8 messages · Page 1 of 1 (latest)

rustic dock
#

I'm trying to check if a villager is panicking but it always return false.

        boolean scared = villager.isPanicking();
        String scaredDisplay = "Scared: " + (scared ? "Yes" : "No");
#

I'm getting the villager Entity by

 HitResult hit = MinecraftClient.getInstance().crosshairTarget;
        if (!(hit instanceof EntityHitResult entityHit))  return;
        if (!(entityHit.getEntity() instanceof VillagerEntity villager)) return;
#

oh okey it is because I'm getting the villager entity from the client my bad

#

[SOLVED] Villager Panicking not work

rustic dock
#

Villager Panicking not work

#

I've updated the flow:

# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://modmuss50.me/fabric.html
minecraft_version=1.21.10
yarn_mappings=1.21.10+build.2
loader_version=0.17.3
# Mod Properties
mod_version=1.0.0
maven_group=com.quarkz
archives_base_name=aivillageinspector
# Dependencies
# check this on https://modmuss50.me/fabric.html
fabric_version=0.136.0+1.21.10

the flow is:
render tick fires
check if the user is looking to a villager
if it is get the villager id
send the villager id to the server
server get the server_villager entity

            boolean scared = server_villager.isPanicking(); 
            boolean readytobreed = server_villager.isReadyToBreed();  

but it returns false

[17:00:33] [Server thread/INFO] (AiVillageInspector) Received VillagerInfoRequestC2SPayload packet
[17:00:33] [Server thread/INFO] (AiVillageInspector) scared: false readytobreed: false
#

Villagers looks pretty scared

rustic dock
#

bum,p