GTNewHorizons / GT-New-Horizons-Modpack

A big progressive questing modpack for Minecraft 1.7.10 balanced around the mod GregTech.
https://www.gtnewhorizons.com/
Other
1.01k stars 305 forks source link

Add Baubles functionality to AR Glasses #6862

Closed S4mpsa closed 4 years ago

S4mpsa commented 4 years ago

Which modpack version are you using?

2.0.9.1a #

If in multiplayer; On which server does this happen?

Zeta #

What did you try to do, and what did you expect to happen?

Equipping the AR glasses into a Baubles slot. #

What happened instead? (Attach screenshots if needed)

The glasses can only be equipped in the helmet slot. (OpenGlasses 2 has this functionality as default, implementation here. #

What do you suggest instead/what changes do you propose?

Add/backport the Baubles functionality to our version of OpenGlasses, OG1 1.7.10 repository here https://github.com/Starchasers/OCGlasses/tree/master, the license permits modification.

Ethryan commented 4 years ago

You can equip them in the Tinker Mask slot.

S4mpsa commented 4 years ago

The... OpenGlasses AR Glasses? I am not able to equip them in any slot but the helmet slot: https://i.imgur.com/gMoolSk.gif

Maybe you mixed them up with the Holo Glasses?

dvdmandt commented 4 years ago

Note that you are not actually looking for Baubles but Tinkers or Travellers gear. Baubles only has slots for two rings, one amulet and one belt slot.

I started looking into this when you requested it a few weeks back. It shouldn't be too hard, but it wasn't as simple as I had hoped for IIRC.

S4mpsa commented 4 years ago

That's good to know Is the implementation in OG2 of any help? I assume we would need to fork the repo for GTNH to add it.

dvdmandt commented 4 years ago

Well, "need" is relative, but we probably should. I think there are like two tasks. The first is to make the item equipable in that slot, which probably requires additional dependencies etc, but other than that is fairly easy. I think it needs to implement an interface and return an ID for which slot it should be in or something. The other part is to make the overlay detect that they are equipped, probably here https://github.com/Starchasers/OCGlasses/blob/98d4e3bc417e85886bb6e8869f883085c4e1294b/src/main/java/com/bymarcin/openglasses/surface/ClientSurface.java#L65 and/or here https://github.com/Starchasers/OCGlasses/blob/98d4e3bc417e85886bb6e8869f883085c4e1294b/src/main/java/com/bymarcin/openglasses/event/ClientEventHandler.java#L22

dvdmandt commented 4 years ago

(just realized we already have OCGlasses cloned by the way)

repo-alt commented 4 years ago

I added the baubles support, but 1.7.10 branch is of course horribly outdated

repo-alt commented 4 years ago

I was unable to make the glasses render on the player model when in the bauble slot. Maybe someone with more knowledge will fix that

Prometheus0000 commented 4 years ago

There's also the 'getting killed in one hit bug with them on' if you see that anywhere in the code. Does that actually have a ticket?

Though if it's not counted as armor maybe that would be avoided anyway?

S4mpsa commented 4 years ago

That does not, mostly because I could not find any reason for that to happen when going through all of OG source code so I just deemed it unfixable

repo-alt commented 4 years ago

There is no reason. The bug does not reproduce with just OC, OpenGlasses & Baubles