mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-05-11 16:30:55 +00:00
Merge branch 'smartcmd:main' into feat/64x64-skins
This commit is contained in:
commit
831ec4b295
48
.github/workflows/clang-format.yml
vendored
48
.github/workflows/clang-format.yml
vendored
|
|
@ -1,48 +0,0 @@
|
|||
name: Check formatting
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- '**'
|
||||
- '!.gitignore'
|
||||
- '!*.md'
|
||||
- '!.github/**'
|
||||
- '.github/workflows/clang-format.yml'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
format-check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Fetch base commit
|
||||
run: git fetch origin ${{ github.event.pull_request.base.sha }}
|
||||
|
||||
- name: Install clang-format-20
|
||||
run: |
|
||||
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
|
||||
sudo add-apt-repository -y "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-20 main"
|
||||
sudo apt-get install -y -qq clang-format-20
|
||||
|
||||
- uses: reviewdog/action-setup@v1
|
||||
|
||||
- name: Check formatting on changed lines
|
||||
env:
|
||||
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
git clang-format-20 --binary clang-format-20 \
|
||||
--diff ${{ github.event.pull_request.base.sha }} -- \
|
||||
'*.c' '*.cpp' '*.cc' '*.h' '*.hpp' \
|
||||
| reviewdog \
|
||||
-name="clang-format" \
|
||||
-f=diff \
|
||||
-reporter=github-pr-check \
|
||||
-fail-level=error \
|
||||
-filter-mode=added
|
||||
11
.github/workflows/nightly-server.yml
vendored
11
.github/workflows/nightly-server.yml
vendored
|
|
@ -5,12 +5,11 @@ on:
|
|||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
paths:
|
||||
- '**'
|
||||
- '!.gitignore'
|
||||
- '!*.md'
|
||||
- '!.github/**'
|
||||
- '.github/workflows/nightly-server.yml'
|
||||
paths-ignore:
|
||||
- '.gitignore'
|
||||
- '*.md'
|
||||
- '.github/**'
|
||||
- '!.github/workflows/nightly-server.yml'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
|
|
|||
11
.github/workflows/nightly.yml
vendored
11
.github/workflows/nightly.yml
vendored
|
|
@ -5,12 +5,11 @@ on:
|
|||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
paths:
|
||||
- '**'
|
||||
- '!.gitignore'
|
||||
- '!*.md'
|
||||
- '!.github/**'
|
||||
- '.github/workflows/nightly.yml'
|
||||
paths-ignore:
|
||||
- '.gitignore'
|
||||
- '*.md'
|
||||
- '.github/**'
|
||||
- '!.github/workflows/nightly.yml'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
|
|
|||
10
.github/workflows/pull-request.yml
vendored
10
.github/workflows/pull-request.yml
vendored
|
|
@ -4,12 +4,10 @@ on:
|
|||
workflow_dispatch:
|
||||
pull_request:
|
||||
types: [opened, reopened, synchronize]
|
||||
paths:
|
||||
- '**'
|
||||
- '!.gitignore'
|
||||
- '!*.md'
|
||||
- '!.github/**'
|
||||
- '.github/workflows/pull-request.yml'
|
||||
paths-ignore:
|
||||
- '.gitignore'
|
||||
- '*.md'
|
||||
- '.github/*.md'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
|
|
|||
|
|
@ -358,7 +358,7 @@ void HumanoidModel::setupAnim(float time, float r, float bob, float yRot, float
|
|||
|
||||
if (riding)
|
||||
{
|
||||
if(uiBitmaskOverrideAnim&(1<<eAnim_SmallModel) == 0)
|
||||
if ((uiBitmaskOverrideAnim&(1<<eAnim_SmallModel)) == 0)
|
||||
{
|
||||
arm0->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 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);
|
||||
glTranslatef(-xo, -yo, 0);
|
||||
|
|
|
|||
|
|
@ -208,11 +208,26 @@ void PlayerRenderer::render(shared_ptr<Entity> _mob, double x, double y, double
|
|||
|
||||
armorParts1->sneaking = armorParts2->sneaking = resModel->sneaking = mob->isSneaking();
|
||||
double yp = y - mob->heightOffset;
|
||||
if (mob->isSneaking() && !mob->instanceof(eTYPE_LOCALPLAYER))
|
||||
if (mob->isSneaking())
|
||||
{
|
||||
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
|
||||
if(mob->getAnimOverrideBitmask()&(1<<HumanoidModel::eAnim_HasIdle))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ Boat::Boat(Level *level, double x, double y, double z) : Entity( level )
|
|||
|
||||
double Boat::getRideHeight()
|
||||
{
|
||||
return heightOffset;
|
||||
return heightOffset - 0.4f;
|
||||
}
|
||||
|
||||
bool Boat::hurt(DamageSource *source, float hurtDamage)
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
services:
|
||||
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
|
||||
restart: unless-stopped
|
||||
tty: true
|
||||
stdin_open: true
|
||||
environment:
|
||||
TZ: ${TZ:-Asia/Tokyo}
|
||||
TZ: ${TZ:-Etc/UTC}
|
||||
WINEARCH: win64
|
||||
WINEPREFIX: /var/opt/wineprefix64
|
||||
WINEDEBUG: -all
|
||||
|
|
@ -15,12 +15,15 @@ services:
|
|||
# minimum required virtual screen
|
||||
XVFB_DISPLAY: ${XVFB_DISPLAY:-:99}
|
||||
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:
|
||||
# - wineprefix64:/var/opt/wineprefix64
|
||||
- ./server-data:/srv/persist
|
||||
ports:
|
||||
- "25565:25565/tcp"
|
||||
- "25565:25565/udp"
|
||||
- "$SERVER_PORT:$SERVER_PORT/tcp"
|
||||
- "$SERVER_PORT:$SERVER_PORT/udp"
|
||||
stop_grace_period: 30s
|
||||
|
||||
# volumes:
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ services:
|
|||
tty: true
|
||||
stdin_open: true
|
||||
environment:
|
||||
TZ: ${TZ:-Asia/Tokyo}
|
||||
TZ: ${TZ:-Etc/UTC}
|
||||
WINEARCH: win64
|
||||
WINEPREFIX: /var/opt/wineprefix64
|
||||
WINEDEBUG: -all
|
||||
|
|
@ -18,13 +18,16 @@ services:
|
|||
SERVER_CLI_INPUT_MODE: ${SERVER_CLI_INPUT_MODE:-stream}
|
||||
# minimum required virtual screen
|
||||
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:
|
||||
# - wineprefix64:/var/opt/wineprefix64
|
||||
- ./server-data:/srv/persist
|
||||
ports:
|
||||
- "25565:25565/tcp"
|
||||
- "25565:25565/udp"
|
||||
- "$SERVER_PORT:$SERVER_PORT/tcp"
|
||||
- "$SERVER_PORT:$SERVER_PORT/udp"
|
||||
stop_grace_period: 30s
|
||||
|
||||
# volumes:
|
||||
|
|
|
|||
|
|
@ -3,9 +3,8 @@ set -euo pipefail
|
|||
|
||||
SERVER_DIR="/srv/mc"
|
||||
SERVER_EXE="Minecraft.Server.exe"
|
||||
# ip & port are fixed since they run inside the container
|
||||
SERVER_PORT="25565"
|
||||
SERVER_BIND_IP="0.0.0.0"
|
||||
SERVER_PORT="${SERVER_PORT:-25565}"
|
||||
SERVER_BIND_IP="${SERVER_BIND_IP:-0.0.0.0}"
|
||||
|
||||
PERSIST_DIR="/srv/persist"
|
||||
WINE_CMD=""
|
||||
|
|
|
|||
Loading…
Reference in a new issue