OpenBlocks

OpenBlocks

56M Downloads

Luggage

linuxcodefire opened this issue ยท 6 comments

commented

When i hover over Luggage it says sitting false... how do i make it true?

commented

SItting would be very nice.. I have two chests.. One is a tool box that carries my quarry, wrenches, pipes, etc, etc.. Named "Tool box" obviously.. however I don't need it following me around all the time, I'd like to be able to make it "sit" at my base so its not filling itself up with random junk while im out and about. I could shift-rightclick and throw it in a chest, I know.. But a sit function would be much "cooler" as I could tell it to "stay" after I set up my quarry. and leave it there till my quarry is finished ;)
A possible fix I guess could be make it "wrenchable" or such to pick it up, and use shift rightclick for a sit function?... Regardless, the chest is Still an Excellent feature though. ;)
PS: sorry, just realized you previously marked as closed.

commented

Where it says it's sitting? Any screenshot?

commented

I think you mean this.
2015-08-05_10 54 52
This is "caused" by the mod WAWLA, an extension of Waila.
I am pretty sure this is because EntityLuggage extends EntityTameable.

commented

yes

commented

As i thought, the mod responsible for this is WAWLA, and, more specificly these lines of code.
I think the only way to do this on OpenBlock's end is by adding a check to the first if statement using ASM.
A possible edit could be

 if (entity instanceof EntityTameable && cfg.getConfig(CONFIG_PET_SITTING) && !(entity instanceof openblocks.common.entity.EntityLuggage)) {

where && !(entity instanceof openblocks.common.entity.EntityLuggage) is the added part.

To answer to the OP question, at the moment there is no way to change the value of that line, because (long code digression starts) usually on EntityTameables the interact method (which is called when a player right-clicks the entity) sets the sitting state of the entity, toggling it, like here:

this.aiSit.setSitting(!this.isSitting());

This "functionality" is overridden in EntityLuggage to allow you to open his inventory on right-click and to pick it up on shift-right-click (code viewable here).
(end of long code digression)

commented

Thank you for extensive explanation!

Anyway, my response: I'm not fixing that, since "sitting" does not make any sense for luggage right now.