mirror of
https://git.neolegacy.dev/neoStudiosLCE/neoLegacy.git
synced 2026-11-21 17:23:56 +01:00
TU46 Test content and patches
TU46 Test content, added missing commits by amending commit and cherry-picking to new branch, ready for iggy guis and tu46 bug fixes
This commit is contained in:
1 parent
8d6b69f599
commit
ff562d1644
497 files changed
+11187
-771
No files matched your search
@@ -2,6 +2,7 @@
|
||||
#include "SkeletonModel.h"
|
||||
#include "../Minecraft.World/Mth.h"
|
||||
#include "../Minecraft.World/net.minecraft.world.entity.monster.h"
|
||||
#include "../Minecraft.World/net.minecraft.world.item.h"
|
||||
#include "ModelPart.h"
|
||||
|
||||
void SkeletonModel::_init(float g)
|
||||
@@ -44,12 +45,21 @@ SkeletonModel::SkeletonModel(float g) : ZombieModel(g, 0, 64, 32)
|
||||
void SkeletonModel::prepareMobModel(shared_ptr<LivingEntity> mob, float time, float r, float a)
|
||||
{
|
||||
ZombieModel::prepareMobModel(mob, time, r, a);
|
||||
|
||||
bowAndArrow = dynamic_pointer_cast<Skeleton>(mob)->getSkeletonType() == Skeleton::TYPE_WITHER;
|
||||
}
|
||||
|
||||
void SkeletonModel::setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, shared_ptr<Entity> entity, unsigned int uiBitmaskOverrideAnim)
|
||||
{
|
||||
bowAndArrow=true;
|
||||
ZombieModel::setupAnim(time, r, bob, yRot, xRot, scale, entity, uiBitmaskOverrideAnim);
|
||||
shared_ptr<Skeleton> skeleton = dynamic_pointer_cast<Skeleton>(entity);
|
||||
shared_ptr<ItemInstance> carried = skeleton != nullptr ? skeleton->getCarriedItem() : nullptr;
|
||||
bool holdingBow = carried != nullptr && carried->id == Item::bow_Id;
|
||||
bool aggressive = skeleton != nullptr && skeleton->isAggressive();
|
||||
bowAndArrow = holdingBow && aggressive;
|
||||
if (aggressive && !holdingBow)
|
||||
{
|
||||
ZombieModel::setupAnim(time, r, bob, yRot, xRot, scale, entity, uiBitmaskOverrideAnim);
|
||||
}
|
||||
else
|
||||
{
|
||||
HumanoidModel::setupAnim(time, r, bob, yRot, xRot, scale, entity, uiBitmaskOverrideAnim);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user