Advanced Peripherals

Advanced Peripherals

29M Downloads

Player Detector Pocket Computer throws Java Exception when moved in player Inventory

RadSton opened this issue ยท 1 comments

commented

Describe

PlayerDetector code crashes because of a exception in Java Code when the pocket computer thats running the code is moved in the player inventory.

Steps to reproduce

  1. Get an Advanced Player Detector Pocket Computer
  2. Write a programm that uses the function PlayerDetector.getPlayerPos()
    (For testing purpose i would recommend a while true loop)
  3. Start the programm
  4. In the moment the getPlayerPos gets called move the pocket computer in the inventory from one slot to another

(See attached video)

My Lua Stacktrace:
image

and my "errorRecreation.lua":

local playerDetector = peripheral.wrap("back");

while true 
do
    os.queueEvent("anticrash");
    os.pullEvent("anticrash");
    player = playerDetector.getPlayerPos("radston12") -- get player position data of radston12
    print(player["x"] .. " " .. player["y"] .. " " .. player["z"])
end

Multiplayer?

No

Version

1.19.2-0.7.19a (Latest 1.19)

Minecraft, Forge and maybe other related mods versions

Minecraft 1.19.2, Forge 43.1.47, Advanced Peripherials 0.7.21b, CC: Tweaked 1.101.0, (all from the CurseForge launcher)

Screenshots or Videos

https://youtu.be/tfiqrOPeWo0

Crashlog/log

No response

commented

Interesting, the computer does not have an owner, so it returns null