Closed wheelerchristopherg closed 8 years ago
Those functions yield internally, so there may be enough time between the calls for you to leave the range of the sensor.
It happens standing still too, if your standing in the right spot
Fixed some time ago in OpenMods/OpenPeripheral-Addons@51614ff017a174f3f7918f03375b3dd598716c36
I was trying to sense data from players in the range of a sensor block but when I moved to a certain point, the getPlayerData() function could not get my data even though getPlayerName() was able to see that I was there.
I have CC 1.6.3, OpenModsLib 0.5.1, OpenPeripheral Core 0.4.1, OpenPeripheral Addons 0.1.5, and Forge 9.11.1.965 installed for Minecraft 1.6.4.
Steps to reproduce: First, run this code on a computer in game with a wrapped sensor block:
Second, walk around along the outside of the sensors range until the program crashes. It should give the error "Entity not found."
Since it was able to see the players name, it should have been able to acquire the rest of the players data. I think this is just a simple range discrepancy.