eccentricdevotion / TARDIS

A Spigot / Paper plugin for all Doctor Who fans - create and use a TARDIS! It's bigger on the inside!
GNU General Public License v3.0
82 stars 28 forks source link

Handles and outside the tardis #190

Closed Zacatero closed 4 years ago

Zacatero commented 4 years ago

Handles works fine if you are inside the tardis and Handles is inside.. BUT if Handles is inside and you are outside, it gives this message whether you're wearing the communicator or not: "You must be wearing a communicator to talk to Handles when he is in the TARDIS"

PrincessRTFM commented 4 years ago

Handles doesn't work inside for me when I place him... it tells me I need a communicator unless he's in my inventory. (Or maybe that was fixed in one of the recent couple of updates, I haven't checked again lately... next time I'm on, I will.)

Zacatero commented 4 years ago

Handles doesn't work inside for me when I place him... it tells me I need a communicator unless he's in my inventory. (Or maybe that was fixed in one of the recent couple of updates, I haven't checked again lately... next time I'm on, I will.)

Standing inside, Handles placed, Communicator on my head... it works fine. But if I walk out the door it says I need a communicator to talk to handles, even though Im still wearing it.

PrincessRTFM commented 4 years ago

Ah. I don't have the communicator inside.

eccentricdevotion commented 4 years ago

TARDIS Handles Communicator test

PrincessRTFM commented 4 years ago

Just tried it again and it's working as expected now. Either something changed since I updated to 1.15.2, or I accidentally removed Handles somehow. My problem's gone, but I'm not trying to use Handles from outside, so the original issue is still a thing.

PrincessRTFM commented 4 years ago

Reporting in with the same problem, actually... I'm outside, I re-equipped the communicator while outside, and told Handles to lock the door. Got an error about needing to wear the communicator while he's in the TARDIS.

eccentricdevotion commented 4 years ago

Code for checking if you are wearing a communicator is here: https://github.com/eccentricdevotion/TARDIS/blob/v4.0/src/main/java/me/eccentric_nz/TARDIS/handles/TARDISHandlesRequest.java#L78 Though versions prior to build 1995 check for mushroom stem (it was working either way for me)

eccentricdevotion commented 4 years ago

When you equip it does it look like a leather helmet? It shouldn't...

PrincessRTFM commented 4 years ago

The item texture is still the communicator, but the armour texture is a leather helmet, using the latest TRP.zip and b1995.

PrincessRTFM commented 4 years ago

On the line right below the one you linked:

if (communicator == null || !communicator.hasItemMeta() || !communicator.getType().equals(Material.BIRCH_BUTTON) || !communicator.getItemMeta().getDisplayName().equals("TARDIS Communicator"))

You're checking if the communicator item, a leather helmet, has a material type of BIRCH_BUTTON there?

eccentricdevotion commented 4 years ago

Yes - you can't currently use a custom model for a helmet, so when you equip the communicator, a TARDIS task changes it to a BIRCH_BUTTON after 1 tick - https://github.com/eccentricdevotion/TARDIS/blob/v4.0/src/main/java/me/eccentric_nz/TARDIS/listeners/TARDISAccessoryListener.java#L40 If you're seeing a leather helmet after putting the communicator in your helmet slot it hasn't worked - unlike me you're probably using a shortcut to equip it rather than opening the inventory and putting it there manually?

eccentricdevotion commented 4 years ago

I wonder if there is another event I could listener for - ArmorEquipEvent perhaps?

PrincessRTFM commented 4 years ago

Aha! No, I (like OP, I expect) shift-clicked it into place. After placing it manually, it changed.

roberestarkk commented 4 years ago

As an aside, would it be at all possible to implement the communicator in such a way that we wouldn't need to sacrifice an armour slot for it? The head slot has a few particularly useful exclusive enchants as well.

nbd if not, can just use /tardis to do a lot of it, but would be especially neat if, ideally, we didn't have to equip it at all and it could instead be in inventory/hotbar/hand or something

eccentricdevotion commented 4 years ago

I think configurable? Helmet or Offhand would be my take on it

PrincessRTFM commented 4 years ago

The only things I really use Handles for instead of the /tardis commands are locking and unlocking the door. Although, if Handles could engage the handbrake by command, that'd be kinda convenient too... I'm assuming that takeoff (can we also get take off as a variant?) is to disengage, and Eccentric said that land is to find a random location and go there, so that would allow me to use "voice" commands to fly my TARDIS. Also, sometimes I go off to do other things while flying and it'd be cool to be able to park by yelling to Handles from my workshop.

Actually, I feel like takeoff/take off would be good for disengaging the handbrake, travel [...] random [...] would be a good way to pick a random spot according to the repeaters, the other travel commands could just set a destination, and then land/park would be good to re-engage the handbrake. Voice-controlled time travel!

Zacatero commented 4 years ago

That was my issue then @eccentricdevotion I was always seeing it as a leather helmet.