CloudNetService / CloudNet

A modern application that can dynamically and easily deliver Minecraft oriented software
https://cloudnetservice.eu
Apache License 2.0
376 stars 119 forks source link

feat: allow customizing the npc head rotation #1497

Closed 0utplay closed 3 weeks ago

0utplay commented 1 month ago

Motivation

Currently npcs (if lookAtPlayer is disabled) always face towards 0:0. Some users requested to be able to change the rotation of the npc.

Modification

The rotation packets are now send according to the position and a new rotate command was added which makes simple rotation changes possible.

Result

NPCs can have custom rotations

0utplay commented 1 month ago

FYI: this PR requires a new (currently not published) npc-lib version. Until the version beta9 is published, this PR is blocked.

derklaro commented 1 month ago

@0utplay beta9 is available now, the version bump can be in this PR as well imo

github-actions[bot] commented 1 month ago

Test Results

 48 files  ±0   48 suites  ±0   2m 3s :stopwatch: -9s 420 tests ±0  420 :white_check_mark: ±0  0 :zzz: ±0  0 :x: ±0  751 runs  ±0  751 :white_check_mark: ±0  0 :zzz: ±0  0 :x: ±0 

Results for commit 9c7acf92. ± Comparison against base commit c37bd688.

This pull request removes 36 and adds 36 tests. Note that renamed tests count towards both. ``` eu.cloudnetservice.driver.document.DocumentSerialisationTest ‑ [4] {"b":1,"s":2,"i":3,"l":4,"f":5.0,"d":6.0,"c":"/","string":"Hello, World!","bol":true,"cloud":["Ben?","Yes","No","HoHoHoHo"],"world":{"insane":"!","this":"is","hello":"world"}}, PRETTY eu.cloudnetservice.driver.document.gson.JavaTimeSerializerTest ‑ [14] 2024-08-18 eu.cloudnetservice.driver.document.gson.JavaTimeSerializerTest ‑ [23] 16:05:05.295014907 eu.cloudnetservice.driver.document.gson.JavaTimeSerializerTest ‑ [28] 16:05:05.295073568Z eu.cloudnetservice.driver.document.gson.JavaTimeSerializerTest ‑ [29] 16:05:05.295095379Z eu.cloudnetservice.driver.document.gson.JavaTimeSerializerTest ‑ [30] 16:05:05.295103965+05:00 eu.cloudnetservice.driver.document.gson.JavaTimeSerializerTest ‑ [31] 16:05:05.295121077-03:00 eu.cloudnetservice.driver.document.gson.JavaTimeSerializerTest ‑ [34] 2024-08-18T16:05:05.295157787 eu.cloudnetservice.driver.document.gson.JavaTimeSerializerTest ‑ [39] 2024-08-18T16:05:05.295210827Z eu.cloudnetservice.driver.document.gson.JavaTimeSerializerTest ‑ [4] 2024-08-18T16:05:05.294784352Z … ``` ``` eu.cloudnetservice.driver.document.DocumentSerialisationTest ‑ [4] {"b":1,"s":2,"i":3,"l":4,"f":5.0,"d":6.0,"c":"/","string":"Hello, World!","bol":true,"cloud":["Ben?","Yes","No","HoHoHoHo"],"world":{"this":"is","insane":"!","hello":"world"}}, PRETTY eu.cloudnetservice.driver.document.gson.JavaTimeSerializerTest ‑ [14] 2024-09-09 eu.cloudnetservice.driver.document.gson.JavaTimeSerializerTest ‑ [23] 11:16:58.666572570 eu.cloudnetservice.driver.document.gson.JavaTimeSerializerTest ‑ [28] 11:16:58.666629948Z eu.cloudnetservice.driver.document.gson.JavaTimeSerializerTest ‑ [29] 11:16:58.666652390Z eu.cloudnetservice.driver.document.gson.JavaTimeSerializerTest ‑ [30] 11:16:58.666662418+05:00 eu.cloudnetservice.driver.document.gson.JavaTimeSerializerTest ‑ [31] 11:16:58.666681073-03:00 eu.cloudnetservice.driver.document.gson.JavaTimeSerializerTest ‑ [34] 2024-09-09T11:16:58.666730967 eu.cloudnetservice.driver.document.gson.JavaTimeSerializerTest ‑ [39] 2024-09-09T11:16:58.666788284Z eu.cloudnetservice.driver.document.gson.JavaTimeSerializerTest ‑ [4] 2024-09-09T11:16:58.664371750Z … ```

:recycle: This comment has been updated with latest results.