gXLg / libr-getter

Allows you to bruteforce a librarian villager for the desired enchantment
MIT License
14 stars 1 forks source link

Manual mode #26

Open SamAurel opened 3 months ago

SamAurel commented 3 months ago

Is it possible to create a manual mode where the player places and replaces the lectern and as soon as a goal has been found it just blocks you from breaking the lectern until you stop the process?

I ask this for 2 reasons:

Best regards, Sam Aurel (Discord: @samaurel)

SamAurel commented 3 months ago

Found a suboptimal but working workaround for the villager not immediately retaking the job because of too long delay between breaking and placing the lectern. I used "/lectern config autotool false" and am now breaking the lectern with a lectern so as to not have the mod switch between tool and lecern. Breaking speed is obviously decreased but overall speed is highly increased, because the long waiting periods are averted.

gXLg commented 3 months ago

I don't see a reason, why the villagee would take longer to get new job if there was a delay with placement. LibrGetter will anyways wait at least one tick for the villager to lose his profession. As from the technical part of this issue - I haven't seen anything in Minecraft's code which whould make villagers work like you described, but maybe I just overlooked something. Anyways, I will research a bit more and come back when I have a fix

SamAurel commented 3 months ago

In my experience villagers try to retake a profession in a very short amount of time after their workstation got destroyed, which is why when doing it manually I have lecterns in my offhand and press break and place at the same time. Once a villager has completely lost their profession they dont look for a new one until certain times of day and the extra time to switch between tool and lectern increases the risk of them no longer looking.

This is not knowledge I have from reading code or the wiki but personal observation. I can only say that since using the lectern to break the lectern the villagers got consistently reemployed.

SamAurel commented 3 months ago

I think the most workable fix in the shortterm is the aforementioned manual mode. My main problem when training librarians is not the breaking and replacing of lecterns but checking the offers as well as keeping tabs on the enchants I want and the relevant prices. A manual mode that maybe has a slightly different activation command like "/librget manual start", only pays attention to the villager losing and regaining his profession, reads and reports the offer, crossreferences it with the database and maybe intercepts attempts to break the lectern again until the mode is stopped or for like 5 seconds.

I currently have it configured to actionbar true and notify true so having a minimalist tool that just checks offers and manages the overhead would be fantastic and would also feel less cheaty. :)

gXLg commented 3 months ago

Currently pretty busy, but I will maybe implement these things in the next week

SamAurel commented 3 months ago

Yea no worries, I just wanted to provide the outcome of my experiences. Real life obviously takes priority. Could you inform me on discord when you have something new, because I look forward to testing it out and ideally give helpful feedback (Im rarely on github and I wanna close this tab in the meantime). Have a good time and take care. :)