Releases: bradsk88/Questown
Final touches for "Hearts" update
- Declaring homepage and update URL
- Villager work improvements
- Villagers look at their work station while working
- Improvements to navigation edge-cases
- Added a cooldown between checks at the job board when there
is not work available.
- Tweaked timing for baker. Removed logs
- Tweaked farm-leaving pathfinding
- Also: Added
/qtspawn
command to spawn villagers (and removed apple
cheat) - Also: Farmers no longer try to walk down into ground.
- Also: Added
Forward-Port to 1.19: The "Hearts" Update
v1.19.2-0.0.6-alpha.2: Forward Port from 1.18
Crash fix and WIP Villager Advancements
- Crash Fix:
- This release utilizes the new
TownRoomDetector
fromRoomRecipes
to distribute room scanning over multiple ticks, rather than trying to scan the entire village within a single tick - which can cause crashes. - This means you will need to also update
RoomRecipes
- This release utilizes the new
- Debug Commands:
/qtdebug <flag pos>
and/qtdebugdoor <flat pos>
have been added/qtdebug
stops most of the ticking logic for the town/qtdebugdoor
gives the player a special debug item they can click below the door of any room to generate debug logs for improving the quality of bug reports.
- WORK IN PROGRESS: A new "advancement" UI has been added
- It works on local Minecraft, but not on a server
- It shows the villager's current job and all the other available jobs laid out like the "advancement" tree
- Temporary: You can click on any job to switch the villager to that job
- All "gatherer" jobs have been tweaked so they leave town for less time, but return with fewer items
- Untested: The "axe gatherer" job has three tiers "1/4 day", "1/2 day", "full day"
- The gatherer will leave for the stated time and return with 1, 3, and 6 items, respectively.
- Untested: A "rod gatherer" has been added and should return with fishing loot
- This release also includes updates to the codebase to make to easier for forward-and-back-port between 1.18 and 1.19
Backport from 1.19
Bug Fixes
Fix "flicker" bug when someone is waiting for timer
Fix time warp bug where tool work is not being done
Fix time warp exception when town has no space
Fix bug where time warp was resulting in extra items
Added hunger, dining, mood
- Hunger ticks down throughout the day and villagers start each day hungry
- Added plates and dining room
- Plates can be crafted by using glass pane on flag base
- When villagers dine at plate, the food they brought is rendered in the plate
- Added system for "claiming" job blocks
- This prevents multiple villagers from dining at one plate
- Added system for making sounds during villager work
- Added special rule for making interaction block one lower
- This allows villagers to stand "below" plate while dining
- Mood goes down if villager has nowhere good to eat
- Mood goes up if villager can find a spot to eat in a dining room
- Work speed is impacted by mood
- Added UI for seeing villager hunger and mood
- Added "expiry" system and used it for diner
- Diner expired to "No table diner", other jobs expire to "job seeker"
- Improvements to logging
- Farmer job brought back with rudimentary time warp function
- Proper work to improve farmer is planned ASAP
- Fixed crash when building job board (might randomly select "up" as sign direction)
- Villagers now stand still while working
v1.19.2-0.0.5-alpha.5: Huge refactor - time warp for all jobs
General philosophy: every job has its own "warper" and we grab that warper for each villager during the time warp phase of the town flag's loading process.
Each warper simulates the passage of time and then returns an updated town state which is passed into the next warper as the starting point.
Also:
- Store state before restoring villagers so they have the warped state
- Prevent a critical log when nothing is wrong
- Updating all jobs to be more declarative (and thus have warpers)
- Explicit "is player close" logic for time warp
Better handling of multi-villager warps:
First, we calculate the specific ticks where the work for each villager would be run and store a tuple of [tick, lambda function] in a list. Finally, we sort that list by tick and run each lambda in the sorted list. This should mean that each villager action (lambda) is run in the order that it would be run if this were happening in real-time.
Some light play testing shows that this seems to be working well.
Play testing
- Preventing infinite loop when loot table lookup fails
- Fixing job logic for tool-less jobs that require work
- Tested via time warp, NOT TESTED by playing
- Added some new villager skins (Thanks Niki)
- Added logic to show non-error graphics for some production statuses
- Added logic to remove entities from town state when killed
- Fixing world interaction logic to make crafters work properly
- Removed all while loops to avoid game-breaking freezes
- Fixed bug where villagers were taking more than one ingredient from town containers.
- Adjusted gatherers to prefer "no tool" work if it can produce the requested results.
- Fixing world interaction logic to make smelters work properly
- Adding translations for smelters
- TDD: Fix bug where gatherers do not leave Fixed: Gatherers no longer return home when job board is updated
- Make workers stand beside job block
... instead of walking around it randomly - Also removed some old TODOs that are no longer relevant
- Better "go to job" nav + skin logic fix
- Fixing handling of 1x1 rooms
- Setting some more status art for production jobs
- Fixing bug where job board was missing addable items
- Rendering item in Villager's hand
- Fixed a bug where work results had extra quanties on their NBT
- Added
qtfreeze
flag block command to make it easier to run theqtsetjob
on villagers (because they will stand still) - Introducing randomness so villagers will better share resources, job blocks, and requests
- Villagers will choose a random work room and block and then keep it until they have finished the work.
- Villagers will now "give up" on their current work if they go too long with no supplies in town.
v1.18.2-0.0.5-alpha.3-patch.1
1.18.2-specific fixes after backport
v1.18.2-0.0.5-alpha.3
Play testing: [Untested] Make qtsetjob work on server?