mirror of
https://git.neolegacy.dev/neoStudiosLCE/neoLegacy.git
synced 2026-11-27 05:59:32 +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
@@ -1,6 +1,7 @@
|
||||
#include "stdafx.h"
|
||||
#include "com.mojang.nbt.h"
|
||||
#include "net.minecraft.network.packet.h"
|
||||
#include "net.minecraft.world.level.h"
|
||||
#include "SkullTileEntity.h"
|
||||
|
||||
SkullTileEntity::SkullTileEntity()
|
||||
@@ -8,6 +9,8 @@ SkullTileEntity::SkullTileEntity()
|
||||
skullType = 0;
|
||||
rotation = 0;
|
||||
extraType = L"";
|
||||
mouthAnimation = 0;
|
||||
powered = false;
|
||||
}
|
||||
|
||||
void SkullTileEntity::save(CompoundTag *tag)
|
||||
@@ -69,4 +72,23 @@ shared_ptr<TileEntity> SkullTileEntity::clone()
|
||||
result->rotation = rotation;
|
||||
result->extraType = extraType;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
void SkullTileEntity::tick()
|
||||
{
|
||||
if (skullType != TYPE_DRAGON || level == nullptr) return;
|
||||
|
||||
if (level->hasNeighborSignal(x, y, z))
|
||||
{
|
||||
powered = true;
|
||||
++mouthAnimation;
|
||||
}
|
||||
else
|
||||
{
|
||||
powered = false;
|
||||
}
|
||||
}
|
||||
|
||||
float SkullTileEntity::getMouthAnimation(float a)
|
||||
{
|
||||
return powered ? static_cast<float>(mouthAnimation) + a : static_cast<float>(mouthAnimation);
|
||||
}
|
||||
Reference in new issue
Block a user