PneumaticCraft: Repressurized

PneumaticCraft: Repressurized

50M Downloads

Drones stop working when outside a certain range from a player

xRebellion opened this issue ยท 3 comments

commented

Minecraft Version

1.16.4

Forge Version

35.1.36

Mod Version

2.9.0-111

Describe your problem, including steps to reproduce it

Drones seem to freeze whenever players get out of their range. Around 48-64 blocks is their limit. The program I used is here: https://pastebin.com/stzM12UF (Although using a normal guard drone should also do the same). In order to reproduce the said bug

  1. Spawn a zombie somewhere, then set the drone somewhere else far enough but still within range.
  2. Chunkload the area between the zombie and the drone (this should be done before, preferably)
  3. Move away far enough from both of them
  4. See that the drone stopped moving after a certain range. (The effect is easier seen when using a minimap)

This can also be reproduced using the teleport widget more easily (by making a drone that teleports to a certain spot (64 blocks away at least) after a certain delay, then we teleport there, just to find that the drone never arrive).

Any other comments?

This might be because of how minecraft's mob AI by default stops working when player goes out a certain range, as I assume PNC's drones uses minecraft's mob AI, but that's just a guess.

commented

Can't reproduce this. As long as the area's chunk loaded, the drone behaves exactly as I'd expect, regardless of how far away I am.

I created a program to get a sword from a (chunkloaded) chest, wait a few seconds, teleport about 110 blocks away and kill all the pigs in a (chunkloaded) pen there. Deployed the drone, teleported myself 1000 blocks away immediately, and waited for a minute or so. Teleported back to the pig pen to find the drone there and all pigs dead, as expected.

Using vanilla /forceload command to chunkload, by the way.

I am inclined to think you have some other mod loaded which is interfering here. I know you mentioned earlier that you're not using Performant, but is there anything else?

commented
commented

I think I may have found what caused it -- apparently there's an option on optifine called "lazy chunk loading" which was apparently turned on. My bad for not noticing it in the first place. Now I tried turning it off and it worked perfectly as expected. Really sorry for that