Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AR-Controller: calling "getPlayerRotationY/Z" throws a Null-Exception for the owner #307

Closed
RedCookieLP opened this issue Jun 13, 2022 · 4 comments
Labels
1.19x bug Something isn't working Priority-High
Milestone

Comments

@RedCookieLP
Copy link

Descripe

I just tried out the AR Goggles and the AR Controller for the first time. I "bound" the AR-Controller in the Lua-Shell in a computer and in the listing for all the possible functions I've found these two (they're in the title). I know that AR is bugged, according to the wiki, but still, I tried it.

It spit a NullPointer-exception back:

java.lang.NullPointerException: Cannot invoke "net.minecraft.world.entity.player.Player
.m_146908_() because the return value of 
"de.srendi.advancedperipherals.common.addons.computercraft.owner.BlockEntityPeripheralOwner.getOwner()"
is null

Also, I don't if it's intended, but calling getConfiguration returns an empty... "Table"? "Entry"?... Whatever the data-structure is: It's empty

PS: I'm using Version 0.7.15b, included in "All the Mods 7 v0.4.10", I couldn't select the newer version further down...

Steps to reproduce

  1. Place down an AR-Controller and a computer of your choice (I used the advanced computer from CC:Tweaked).

  2. If you haven't placed them directly next to each other: Connect them via modems and cables and activate the modems by clicking on them.

  3. Get yourself a pair of AR-Goggles and link them with the AR-Controller by putting them in your hand and clicking on the AR-Controller. A message saying Successfully linked AR-Goggles should appear and the Goggles themselfes should have the bound controller stored in them (hover over the goggles with your cursor).

  4. Put your glasses on (or don't, either way it doesn't work)

  5. Open the Lua-Shell in the computer connected with the controller and bind it using something like
    ar = peripheral.find("arController")

  6. Finally: Call ar.getPlayerRotationY() or ar.getPlayerRotationZ().

A NullPointer exception is thrown (in my case at least).

Multiplayer?

No

Version

1.18.2-0.7.14b (Latest 1.18)

Minecraft, Forge and maybe other related mods versions

Forge - 40.1.31 and Minecraft - 1.18.1 in "All The Mods 7" - 0.4.10

Screenshots or Videos

No response

Crashlog/log

No response

@SirEndii
Copy link
Member

This is a weird issue. Do the other functions work?

@SirEndii SirEndii added bug Something isn't working waiting for feedback Waiting for feedback from author 1.18x labels Jun 15, 2022
@RedCookieLP
Copy link
Author

RedCookieLP commented Jun 15, 2022

I didn't try out much, but clear, drawString, fill and all those functions worked fine, but like I said, I didn't try out much. Of all the functions I tested, the three mentioned in the first post don't work or return empty.

I can do some more testing later and report what happened.

@RedCookieLP
Copy link
Author

Ok, I think I've tested every function now. All but these functions work:

  • getPlayerRotationY -- NullPointer-Exception
  • getPlayerRotationZ -- NullPointer-Exception
  • getConfiguration -- just returns an emtpy config ({}), might be intended...
  • fillCircle -- No circle visible/rendered
  • fillCircleWithId -- No circle visible/rendered

The other functions work flawlessly, as far as I can tell...

@SirEndii SirEndii added Priority-High and removed waiting for feedback Waiting for feedback from author labels Jun 15, 2022
@SirEndii SirEndii added this to the 0.7.x milestone Jun 15, 2022
@SirEndii
Copy link
Member

SirEndii commented Jul 6, 2022

Update
Every rotation related function does not work and will not until the AR rework for 0.8r. This has some bigger reasons related to how the ar system currently works.

getConfiguration returns an empty table because it's not implemented in the ar controller. So yes, it's intended.

I'll see what I can do about the circle functions

@SirEndii SirEndii added 1.19x and removed 1.18x labels Sep 1, 2022
@SirEndii SirEndii modified the milestones: 0.7.x, 0.8r Sep 1, 2022
@SirEndii SirEndii moved this to Needs Bug Review in AP 0.8 Smart Glasses Backlog Feb 19, 2024
@SirEndii SirEndii moved this from Needs Bug Review to Not an Issue in AP 0.8 Smart Glasses Backlog Aug 17, 2024
@SirEndii SirEndii moved this from Todo to Invalid in Advanced Peripherals Aug 17, 2024
@github-project-automation github-project-automation bot moved this from Not an Issue to Done in AP 0.8 Smart Glasses Backlog Aug 17, 2024
@github-project-automation github-project-automation bot moved this from Invalid to Done in Advanced Peripherals Aug 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.19x bug Something isn't working Priority-High
Projects
Status: To Be Released
Development

No branches or pull requests

2 participants