More Tweaks
All checks were successful
CI / Build (AMD64, Server) (push) Successful in 18m25s
CI / Build (AMD64, Client) (push) Successful in 18m34s
CI / Build (ARM64, Client) (push) Successful in 18m27s
CI / Build (ARM64, Server) (push) Successful in 18m26s
CI / Build (ARMHF, Server) (push) Successful in 13m50s
CI / Build (ARMHF, Client) (push) Successful in 17m22s
CI / Test (Client) (push) Successful in 18m4s
CI / Test (Server) (push) Successful in 15m22s
CI / Release (push) Has been skipped
CI / Build Example Mods (push) Successful in 10m42s

This commit is contained in:
TheBrokenRail 2024-06-12 02:33:29 -04:00
parent 1bf19268f0
commit 8bc90dae04
6 changed files with 22 additions and 35 deletions

View File

@ -84,15 +84,6 @@ endif()
# Buld Dependencies
add_subdirectory(dependencies)
# Version
set_property(
DIRECTORY
APPEND
PROPERTY CMAKE_CONFIGURE_DEPENDS VERSION
)
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/VERSION" MCPI_VERSION)
file(TIMESTAMP "${CMAKE_CURRENT_SOURCE_DIR}/VERSION" MCPI_VERSION_DATE "%Y-%m-%d" UTC)
# Build libreborn
add_subdirectory(libreborn)

View File

@ -1,19 +0,0 @@
FROM debian:bullseye-slim
# Install
RUN \
apt-get update && \
apt-get install -y tini qemu-user && \
apt-get --fix-broken install -y && \
rm -rf /var/lib/apt/lists/*
# Copy
ADD ./out/server-amd64 /app
# Setup Working Directory
RUN mkdir /data
WORKDIR /data
# Setup Entrypoint
ENTRYPOINT ["/usr/bin/tini", "--"]
CMD ["/app/usr/bin/minecraft-pi-reborn-server"]

View File

@ -71,5 +71,14 @@ mcpi_option(SKIN_SERVER "Skin Server" STRING "https://raw.githubusercontent.com/
# Discord Invite URL
mcpi_option(DISCORD_INVITE "Discord Invite URL" STRING "https://discord.gg/mcpi-revival-740287937727561779")
# Version
set_property(
DIRECTORY
APPEND
PROPERTY CMAKE_CONFIGURE_DEPENDS VERSION
)
file(STRINGS "${CMAKE_CURRENT_LIST_DIR}/../../VERSION" MCPI_VERSION)
file(TIMESTAMP "${CMAKE_CURRENT_LIST_DIR}/../../VERSION" MCPI_VERSION_DATE "%Y-%m-%d" UTC)
# Documentation URL
mcpi_option(DOCUMENTATION "Documentation URL" STRING "https://gitea.thebrokenrail.com/minecraft-pi-reborn/minecraft-pi-reborn/src/branch/master/docs/")
mcpi_option(DOCUMENTATION "Documentation URL" STRING "https://gitea.thebrokenrail.com/minecraft-pi-reborn/minecraft-pi-reborn/src/tag/${MCPI_VERSION}/docs/")

View File

@ -72,7 +72,7 @@ static long long int get_time() {
}
// Store Time When World Loaded
static int world_loaded = 0;
static bool world_loaded = false;
static long long int world_loaded_time;
#ifndef MCPI_HEADLESS_MODE
static unsigned long long int world_loaded_frames;
@ -92,10 +92,14 @@ static void Minecraft_update_injection(Minecraft *minecraft) {
loaded = true;
}
// Get Current Time
long long int now = get_time();
// Detect World Loaded
if (!world_loaded && minecraft->isLevelGenerated()) {
world_loaded = 1;
world_loaded_time = get_time();
world_loaded = true;
INFO("Loaded");
world_loaded_time = now;
#ifndef MCPI_HEADLESS_MODE
world_loaded_frames = frames;
#endif
@ -105,7 +109,7 @@ static void Minecraft_update_injection(Minecraft *minecraft) {
// Run Benchmark
if (!exit_requested && world_loaded) {
// Get Time
long long int current_time = get_time() - world_loaded_time;
long long int current_time = now - world_loaded_time;
#ifndef MCPI_HEADLESS_MODE
unsigned long long int current_frames = frames - world_loaded_frames;
#endif

View File

@ -532,7 +532,7 @@ static void Tesselator_vertexUV_injection(Tesselator_vertexUV_t original, Tessel
// Call Original Method
original(tesselator, x, y, z, u, v);
}
static bool ChestTileEntity_shouldSave_injection(__attribute__((unused)) unsigned char *tile_entity) {
static bool ChestTileEntity_shouldSave_injection(__attribute__((unused)) ChestTileEntity_shouldSave_t original, __attribute__((unused)) ChestTileEntity *tile_entity) {
return true;
}
@ -926,7 +926,7 @@ void init_misc() {
overwrite_calls(ContainerMenu_constructor, ContainerMenu_injection);
overwrite_calls(ContainerMenu_destructor_complete, ContainerMenu_destructor_injection);
}
patch_address((void *) 0x115b48, (void *) ChestTileEntity_shouldSave_injection);
overwrite_calls(ChestTileEntity_shouldSave, ChestTileEntity_shouldSave_injection);
#ifndef MCPI_HEADLESS_MODE
// Replace Block Highlight With Outline

View File

@ -1,3 +1,5 @@
vtable 0x115b40;
extends TileEntity;
constructor () = 0xcfa78;