mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-08-20 09:57:09 +00:00
Merge branch 'smartcmd:main' into main
This commit is contained in:
commit
79ecd186c5
|
|
@ -557,8 +557,8 @@ int UIScene_LaunchMoreOptionsMenu::KeyboardCompleteSeedCallback(LPVOID lpParam,b
|
||||||
uint16_t pchText[128];
|
uint16_t pchText[128];
|
||||||
ZeroMemory(pchText, 128 * sizeof(uint16_t));
|
ZeroMemory(pchText, 128 * sizeof(uint16_t));
|
||||||
Win64_GetKeyboardText(pchText, 128);
|
Win64_GetKeyboardText(pchText, 128);
|
||||||
pClass->m_editSeed.setLabel((wchar_t *)pchText);
|
pClass->m_editSeed.setLabel(reinterpret_cast<wchar_t*>(pchText));
|
||||||
pClass->m_params->seed = (wchar_t *)pchText;
|
pClass->m_params->seed = static_cast<wstring>(reinterpret_cast<wchar_t*>(pchText));
|
||||||
#else
|
#else
|
||||||
#ifdef __PSVITA__
|
#ifdef __PSVITA__
|
||||||
uint16_t pchText[2048];
|
uint16_t pchText[2048];
|
||||||
|
|
@ -584,7 +584,7 @@ void UIScene_LaunchMoreOptionsMenu::getDirectEditInputs(vector<UIControl_TextInp
|
||||||
void UIScene_LaunchMoreOptionsMenu::onDirectEditFinished(UIControl_TextInput *input, UIControl_TextInput::EDirectEditResult result)
|
void UIScene_LaunchMoreOptionsMenu::onDirectEditFinished(UIControl_TextInput *input, UIControl_TextInput::EDirectEditResult result)
|
||||||
{
|
{
|
||||||
if (result == UIControl_TextInput::eDirectEdit_Confirmed)
|
if (result == UIControl_TextInput::eDirectEdit_Confirmed)
|
||||||
m_params->seed = input->getEditBuffer();
|
m_params->seed = static_cast<wstring>(input->getEditBuffer());
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -241,7 +241,7 @@ void HumanoidModel::setupAnim(float time, float r, float bob, float yRot, float
|
||||||
|
|
||||||
if (riding)
|
if (riding)
|
||||||
{
|
{
|
||||||
if(uiBitmaskOverrideAnim&(1<<eAnim_SmallModel) == 0)
|
if ((uiBitmaskOverrideAnim&(1<<eAnim_SmallModel)) == 0)
|
||||||
{
|
{
|
||||||
arm0->xRot += -HALF_PI * 0.4f;
|
arm0->xRot += -HALF_PI * 0.4f;
|
||||||
arm1->xRot += -HALF_PI * 0.4f;
|
arm1->xRot += -HALF_PI * 0.4f;
|
||||||
|
|
|
||||||
|
|
@ -286,6 +286,20 @@ void ItemInHandRenderer::renderItem(shared_ptr<LivingEntity> mob, shared_ptr<Ite
|
||||||
|
|
||||||
float xo = 0.0f;
|
float xo = 0.0f;
|
||||||
float yo = 0.3f;
|
float yo = 0.3f;
|
||||||
|
|
||||||
|
|
||||||
|
// Re position height of held item if skin is small
|
||||||
|
if (mob->getAnimOverrideBitmask() & (1 << HumanoidModel::eAnim_SmallModel))
|
||||||
|
{
|
||||||
|
if (mob->isRiding())
|
||||||
|
{
|
||||||
|
std::shared_ptr<Entity> ridingEntity = mob->riding;
|
||||||
|
if (ridingEntity != nullptr) // Safety check;
|
||||||
|
{
|
||||||
|
yo += 0.3f; // reverts the change in Boat.cpp for smaller models.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
glEnable(GL_RESCALE_NORMAL);
|
glEnable(GL_RESCALE_NORMAL);
|
||||||
glTranslatef(-xo, -yo, 0);
|
glTranslatef(-xo, -yo, 0);
|
||||||
|
|
|
||||||
|
|
@ -199,11 +199,26 @@ void PlayerRenderer::render(shared_ptr<Entity> _mob, double x, double y, double
|
||||||
armorParts1->sneaking = armorParts2->sneaking = humanoidModel->sneaking = mob->isSneaking();
|
armorParts1->sneaking = armorParts2->sneaking = humanoidModel->sneaking = mob->isSneaking();
|
||||||
|
|
||||||
double yp = y - mob->heightOffset;
|
double yp = y - mob->heightOffset;
|
||||||
if (mob->isSneaking() && !mob->instanceof(eTYPE_LOCALPLAYER))
|
if (mob->isSneaking())
|
||||||
{
|
{
|
||||||
yp -= 2 / 16.0f;
|
yp -= 2 / 16.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mob->getAnimOverrideBitmask() & (1 << HumanoidModel::eAnim_SmallModel))
|
||||||
|
{
|
||||||
|
if (mob->isRiding())
|
||||||
|
{
|
||||||
|
std::shared_ptr<Entity> ridingEntity = mob->riding;
|
||||||
|
if (ridingEntity != nullptr) // Safety check;
|
||||||
|
{
|
||||||
|
if (ridingEntity->instanceof(eTYPE_BOAT))
|
||||||
|
{
|
||||||
|
yp += 0.25f; // reverts the change in Boat.cpp for smaller models.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Check if an idle animation is needed
|
// Check if an idle animation is needed
|
||||||
if(mob->getAnimOverrideBitmask()&(1<<HumanoidModel::eAnim_HasIdle))
|
if(mob->getAnimOverrideBitmask()&(1<<HumanoidModel::eAnim_HasIdle))
|
||||||
{
|
{
|
||||||
|
|
@ -519,6 +534,29 @@ void PlayerRenderer::renderHand()
|
||||||
{
|
{
|
||||||
humanoidModel->arm0->render(1 / 16.0f,true);
|
humanoidModel->arm0->render(1 / 16.0f,true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//Render custom skin boxes on viewmodel - Botch
|
||||||
|
vector<ModelPart*>* additionalModelParts = Minecraft::GetInstance()->player->GetAdditionalModelParts();
|
||||||
|
if (!additionalModelParts) return; //If there are no custom boxes, return. This fixes bug where the game will crash if you select a skin with no additional boxes.
|
||||||
|
vector<ModelPart*> armchildren = humanoidModel->arm0->children;
|
||||||
|
std::unordered_set<ModelPart*> additionalModelPartSet(additionalModelParts->begin(), additionalModelParts->end());
|
||||||
|
for (const auto& x : armchildren) {
|
||||||
|
if (x) {
|
||||||
|
if (additionalModelPartSet.find(x) != additionalModelPartSet.end()) { //This is to verify box is still actually on current skin - Botch
|
||||||
|
glPushMatrix();
|
||||||
|
//We need to transform to match offset of arm - Botch
|
||||||
|
glTranslatef(-5 * 0.0625f, 2 * 0.0625f, 0);
|
||||||
|
glRotatef(0.1 * (180.0f / PI), 0, 0, 1);
|
||||||
|
x->visible = true;
|
||||||
|
x->render(1.0f / 16.0f, true);
|
||||||
|
x->visible = false;
|
||||||
|
glPopMatrix();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlayerRenderer::setupPosition(shared_ptr<LivingEntity> _mob, double x, double y, double z)
|
void PlayerRenderer::setupPosition(shared_ptr<LivingEntity> _mob, double x, double y, double z)
|
||||||
|
|
@ -580,4 +618,4 @@ ResourceLocation *PlayerRenderer::getTextureLocation(shared_ptr<Entity> entity)
|
||||||
{
|
{
|
||||||
shared_ptr<Player> player = dynamic_pointer_cast<Player>(entity);
|
shared_ptr<Player> player = dynamic_pointer_cast<Player>(entity);
|
||||||
return new ResourceLocation(static_cast<_TEXTURE_NAME>(player->getTexture()));
|
return new ResourceLocation(static_cast<_TEXTURE_NAME>(player->getTexture()));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ Boat::Boat(Level *level, double x, double y, double z) : Entity( level )
|
||||||
|
|
||||||
double Boat::getRideHeight()
|
double Boat::getRideHeight()
|
||||||
{
|
{
|
||||||
return heightOffset;
|
return heightOffset - 0.4f;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Boat::hurt(DamageSource *source, float hurtDamage)
|
bool Boat::hurt(DamageSource *source, float hurtDamage)
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
services:
|
services:
|
||||||
minecraft-lce-dedicated-server:
|
minecraft-lce-dedicated-server:
|
||||||
image: ghcr.io/kuwacom/minecraft-lce-dedicated-server:nightly
|
image: ghcr.io/smartcmd/minecraft-lce-dedicated-server:nightly
|
||||||
container_name: minecraft-lce-dedicated-server
|
container_name: minecraft-lce-dedicated-server
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
tty: true
|
tty: true
|
||||||
stdin_open: true
|
stdin_open: true
|
||||||
environment:
|
environment:
|
||||||
TZ: ${TZ:-Asia/Tokyo}
|
TZ: ${TZ:-Etc/UTC}
|
||||||
WINEARCH: win64
|
WINEARCH: win64
|
||||||
WINEPREFIX: /var/opt/wineprefix64
|
WINEPREFIX: /var/opt/wineprefix64
|
||||||
WINEDEBUG: -all
|
WINEDEBUG: -all
|
||||||
|
|
@ -15,12 +15,15 @@ services:
|
||||||
# minimum required virtual screen
|
# minimum required virtual screen
|
||||||
XVFB_DISPLAY: ${XVFB_DISPLAY:-:99}
|
XVFB_DISPLAY: ${XVFB_DISPLAY:-:99}
|
||||||
XVFB_SCREEN: ${XVFB_SCREEN:-720x1280x16}
|
XVFB_SCREEN: ${XVFB_SCREEN:-720x1280x16}
|
||||||
|
# ip & port the server will run on
|
||||||
|
SERVER_BIND_IP: ${SERVER_BIND_IP:-0.0.0.0}
|
||||||
|
SERVER_PORT: ${SERVER_PORT:-25565}
|
||||||
volumes:
|
volumes:
|
||||||
# - wineprefix64:/var/opt/wineprefix64
|
# - wineprefix64:/var/opt/wineprefix64
|
||||||
- ./server-data:/srv/persist
|
- ./server-data:/srv/persist
|
||||||
ports:
|
ports:
|
||||||
- "25565:25565/tcp"
|
- "$SERVER_PORT:$SERVER_PORT/tcp"
|
||||||
- "25565:25565/udp"
|
- "$SERVER_PORT:$SERVER_PORT/udp"
|
||||||
stop_grace_period: 30s
|
stop_grace_period: 30s
|
||||||
|
|
||||||
# volumes:
|
# volumes:
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ services:
|
||||||
tty: true
|
tty: true
|
||||||
stdin_open: true
|
stdin_open: true
|
||||||
environment:
|
environment:
|
||||||
TZ: ${TZ:-Asia/Tokyo}
|
TZ: ${TZ:-Etc/UTC}
|
||||||
WINEARCH: win64
|
WINEARCH: win64
|
||||||
WINEPREFIX: /var/opt/wineprefix64
|
WINEPREFIX: /var/opt/wineprefix64
|
||||||
WINEDEBUG: -all
|
WINEDEBUG: -all
|
||||||
|
|
@ -18,13 +18,16 @@ services:
|
||||||
SERVER_CLI_INPUT_MODE: ${SERVER_CLI_INPUT_MODE:-stream}
|
SERVER_CLI_INPUT_MODE: ${SERVER_CLI_INPUT_MODE:-stream}
|
||||||
# minimum required virtual screen
|
# minimum required virtual screen
|
||||||
XVFB_DISPLAY: ${XVFB_DISPLAY:-:99}
|
XVFB_DISPLAY: ${XVFB_DISPLAY:-:99}
|
||||||
XVFB_SCREEN: ${XVFB_SCREEN:-64x64x16}
|
XVFB_SCREEN: ${XVFB_SCREEN:-720x1280x16}
|
||||||
|
# ip & port the server will run on
|
||||||
|
SERVER_BIND_IP: ${SERVER_BIND_IP:-0.0.0.0}
|
||||||
|
SERVER_PORT: ${SERVER_PORT:-25565}
|
||||||
volumes:
|
volumes:
|
||||||
# - wineprefix64:/var/opt/wineprefix64
|
# - wineprefix64:/var/opt/wineprefix64
|
||||||
- ./server-data:/srv/persist
|
- ./server-data:/srv/persist
|
||||||
ports:
|
ports:
|
||||||
- "25565:25565/tcp"
|
- "$SERVER_PORT:$SERVER_PORT/tcp"
|
||||||
- "25565:25565/udp"
|
- "$SERVER_PORT:$SERVER_PORT/udp"
|
||||||
stop_grace_period: 30s
|
stop_grace_period: 30s
|
||||||
|
|
||||||
# volumes:
|
# volumes:
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,8 @@ set -euo pipefail
|
||||||
|
|
||||||
SERVER_DIR="/srv/mc"
|
SERVER_DIR="/srv/mc"
|
||||||
SERVER_EXE="Minecraft.Server.exe"
|
SERVER_EXE="Minecraft.Server.exe"
|
||||||
# ip & port are fixed since they run inside the container
|
SERVER_PORT="${SERVER_PORT:-25565}"
|
||||||
SERVER_PORT="25565"
|
SERVER_BIND_IP="${SERVER_BIND_IP:-0.0.0.0}"
|
||||||
SERVER_BIND_IP="0.0.0.0"
|
|
||||||
|
|
||||||
PERSIST_DIR="/srv/persist"
|
PERSIST_DIR="/srv/persist"
|
||||||
WINE_CMD=""
|
WINE_CMD=""
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue