Initial commit

This commit is contained in:
Astatin3
2024-04-30 22:07:50 -06:00
commit 8565caa62a
8463 changed files with 4915934 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
#pragma once
#include <string>
const int protocol_version = ${PROTOCOL_VERSION};
const std::string game_version = "${BOTCRAFT_GAME_VERSION}";
@@ -0,0 +1,7 @@
@PACKAGE_INIT@
find_package(Threads)
if(NOT TARGET botcraft)
include(${CMAKE_CURRENT_LIST_DIR}/botcraft-targets.cmake)
endif()
@@ -0,0 +1,16 @@
if exist Assets\${BOTCRAFT_GAME_VERSION}\minecraft\ (
echo Minecraft ${BOTCRAFT_GAME_VERSION} assets already downloaded
) else (
echo Downloading Minecraft ${BOTCRAFT_GAME_VERSION} assets...
mkdir Assets\${BOTCRAFT_GAME_VERSION}\minecraft\
mkdir tmp
Rem Download ${BOTCRAFT_GAME_VERSION} client file
curl.exe --output tmp\client.jar --url ${VERSION_CLIENT_URL}
Rem Extract the following folders from the jar file: assets/minecraft/blockstates assets/minecraft/models/block assets/minecraft/textures/block assets/minecraft/textures/entity
tar.exe -x -f tmp\client.jar -C tmp assets/minecraft/blockstates assets/minecraft/models/block assets/minecraft/textures/block assets/minecraft/textures/entity
Rem copy the folders to correct destination
xcopy /s tmp\assets\minecraft\ Assets\${BOTCRAFT_GAME_VERSION}\minecraft\
Rem clean
rmdir /s /q tmp
echo Done!
)
@@ -0,0 +1,14 @@
#!/bin/bash
if [ -d "Assets/${BOTCRAFT_GAME_VERSION}/minecraft/" ]
then
echo "Minecraft ${BOTCRAFT_GAME_VERSION} assets already downloaded"
else
echo "Downloading Minecraft ${BOTCRAFT_GAME_VERSION} assets..."
mkdir tmp/
curl --output tmp/client.jar --url ${VERSION_CLIENT_URL}
unzip -q tmp/client.jar -d tmp/ 'assets/minecraft/blockstates/**' 'assets/minecraft/models/block/**' 'assets/minecraft/textures/block/**' 'assets/minecraft/textures/entity/**'
cp -r tmp/assets/minecraft/ Assets/${BOTCRAFT_GAME_VERSION}/
rm -rf ./tmp/
echo Done!
fi