Fix bucket pickup with scale-aware aiming and build-local Botcraft patches
This commit is contained in:
1 parent
0a6193f68e
commit
12c7332337
10 files changed
+416
-40
No files matched your search
@@ -0,0 +1,29 @@
|
||||
diff --git a/botcraft/src/Game/Entities/entities/player/PlayerEntity.cpp b/botcraft/src/Game/Entities/entities/player/PlayerEntity.cpp
|
||||
index c62026d6..f7f4760a 100644
|
||||
--- a/botcraft/src/Game/Entities/entities/player/PlayerEntity.cpp
|
||||
+++ b/botcraft/src/Game/Entities/entities/player/PlayerEntity.cpp
|
||||
@@ -376,16 +376,21 @@ namespace Botcraft
|
||||
double PlayerEntity::GetEyeHeightImpl() const
|
||||
{
|
||||
#if PROTOCOL_VERSION > 404 /* > 1.13.2 */
|
||||
+#if PROTOCOL_VERSION > 765 /* > 1.20.4 */
|
||||
+ const double scale = attributes.at(EntityAttribute::Type::Scale).GetValue();
|
||||
+#else
|
||||
+ constexpr double scale = 1.0;
|
||||
+#endif
|
||||
switch (GetDataPoseImpl())
|
||||
{
|
||||
case Pose::Swimming:
|
||||
case Pose::FallFlying:
|
||||
case Pose::SpinAttack:
|
||||
- return 0.4;
|
||||
+ return 0.4 * scale;
|
||||
case Pose::Crouching:
|
||||
- return 1.27;
|
||||
+ return 1.27 * scale;
|
||||
default:
|
||||
- return 1.62;
|
||||
+ return 1.62 * scale;
|
||||
}
|
||||
#else
|
||||
return 1.62;
|
||||
Reference in new issue
Block a user