Giter Site home page Giter Site logo

elementzero's Introduction

status platform Telegram
Latest TagGitHub Releases (by Asset)

Run windows version of BDS in linux with Mod support (Yes, it is also can be run in windows)

Installation and usage instructions 👉 Wiki

Features

  1. Compatiable with official BDS
  2. And support behavior pack with custom item/recipes/scripts (* vanilla server does support them, but disabled in code)
  3. Can be run in windows and linux (with wine)
  4. Native modding support
  5. /transferserver is back!

FAQ

Q: Why not use a native linux version?
A: The windows version has noticeable performance improvements, even when running under wine.

Q: Can the Windows version run directly under wine?
A: No, because Microsoft uses Chakra.dll, which contains a lot of references to private dlls. (It also prevents you from running on systems prior to Windows 10.)

Q: How it works?
A: I created a dll that simply forwards all APIs to the open source version of Chakra engine i.e. ChakraCore. And this version can run directly under wine.

Build and install (optional)

  1. Download bedrock dedicated server binary
  2. Generate bedrock_server_mod.lib (see below)
  3. Install vcpkg and install dependencies (see below)
  4. Build it with Visual Studio 2019 (or use CMake manually see .githubn/workflows/ci.yaml)
  5. Copy Dist/* to bds folder (or use symlink)
  6. Run bedrock_server_mod.exe

Visual Studio 2019 workloads and components

  1. Microsoft.VisualStudio.Workload.NativeDesktop
  2. Microsoft.VisualStudio.Workload.ManagedDesktop
  3. Microsoft.VisualStudio.Component.VC.Tools.x86.x64
  4. Microsoft.VisualStudio.Component.Windows10SDK.18362
  5. Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Llvm.Clang

How to use vcpkg

  1. Install vcpkg in source tree cd vcpkg && bootstrap-vcpkg.bat
  2. Install dependencies by vcpkg\vcpkg.exe install @vcpkg.txt (run in $(SolutionDir))

How to get bedrock_server_mod.lib

  1. Download and install EatPdb
  2. Copy $(SolutionDir)\eatpdb.yaml to bds folder
  3. Run eatpdb exec eatpdb.yaml
  4. Open x64 Native Tools Command Prompt for VS 2019, then run lib /def:bedrock_server_mod.def /machine:x64
  5. Copy bedrock_server_mod.lib, addition_symbols.db, bedrock_server_mod.exe to $(SolutionDir)Lib\

LICENSE

GPLv3

elementzero's People

Contributors

codehz avatar extollite avatar sakuranaranbom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

elementzero's Issues

Mod commands never speak people words

So, whenever I use a command that one of the mods supplies, I never get an actual result from the command. Instead I get things like command.balance.success rather than actually getting my balance. I've tried this with every command and they all do the same thing. Even /warp list returns commands.warp.success.count.global, which renders basically all the custom commands useless. I've encountered this on three different computers using the same installation technique as provided in the Wiki. All 3 are running Windows 10. I can't tell if this is an actual bug or just placeholders.

Crash probably people hacking?

docker linux essential mods no encryption

Version: 1.14.60.5 with element-0 (200419)
OS: Windows
Server start: 2020-05-04 23:02:17 Greenwich S
Dmp timestamp: 2020-05-05 03:50:23 Greenwich S
Upload Date: 2020-05-05 03:50:23 Greenwich S
Session ID: 475c26ba-60ff-4367-bd45-799398fa8cf0
Commit hash: 37aca878ca1c71648b7646e6758b1cb97dba79b1
Build id: 3998270
CrashReporter Key: ec7e7127-c0b2-30fe-94c2-3bec1fb4892f

Crash
I [SERVER] (CrashHelper::dumpCrashHandlerAppCrashLog:37)        at enum EventResult ScriptServerBlockEventListener::onBlockExploded[class BlockPos const &,class Block const &,class Actor *] (UnknownFile:?)                                
        at ?processEvent@?$EventCoordinator@VNetworkPacketEventListener@@@@IEAAXV?$function@$$A6A?AW4EventResult@@PEAVNetworkPacketEventListener@@@Z@std@@@Z (UnknownFile:?)                                                                 
        at void Explosion::finalizeExplosion[void] (UnknownFile:?)
        at void Level::explode[class BlockSource &,class Actor *,class Vec3 const &,float,bool,bool,float,bool] (UnknownFile:?)                                                                                                              
        at bool BedBlock::use[class Player &,class BlockPos const &]const  (UnknownFile:?)
        at class Block const & BlockPalette::getBlock[unsigned int const &]const  (UnknownFile:?)
        at <lambda_68877bb2d245f68df98aec72c86f713f>::operator[] (UnknownFile:?)
        at void Container::createTransactionContext[class A6AXAEAVContainer::function,int,class ItemStack const &,class ItemStack const &] (UnknownFile:?)                                                                                   
        at void PlayerInventoryProxy::createTransactionContext[class A6AXAEAVContainer::function,int,class ItemStack const &,class ItemStack const &] (UnknownFile:?)                                                                        
        at enum InventoryTransactionError ItemUseInventoryTransaction::handle[class Player &,bool]const  (UnknownFile:?)                                                                                                                     
        at void ServerNetworkHandler::handle[class NetworkIdentifier const &,class InventoryTransactionPacket const &] (UnknownFile:?)                                                                                                       
        at bool NetworkHandler::_sortAndPacketizeEvents[class NetworkHandler::Connection &,class std::chrono::time_point<struct std::chrono::steady_clock,class std::chrono::duration<__int64,struct std::ratio<1,1000000000> > >] (UnknownFile:?)
        at <lambda_b4722b03a5659a91d48c3c8a5a3c372a>::operator[] (UnknownFile:?)
        at void NetworkHandler::runEvents[bool] (UnknownFile:?)
        at bool Minecraft::update[void] (UnknownFile:?)

abnormal program termination

[not really an issue] I want to help

Since this project is in an alpha development phase and I use and like it, I would like to help develop it, such as work on the documentation.

How can I do this?
Should I just make a pull request?

Docker: failed to load base mod

I tried to run the server fistly on Manjaro distribution, all was OK.
Next, following all instructions, I tried to run it on Debian and there is thrown error:

Failed to load base mod.

Startup Issue

When opening the MOD.exe the console appears to load fine, but hangs mid load.
Forcing the user to right click in the console window to fix the issue. Most of the time this results in a crash.

Support for moving between worlds

I would like to be able to move between worlds in "worlds" folder via one command or via scripting API. It’s just an indispensable feature, but the implementation is probably too complicated. I think others will agree with me.

[Not really an issue] Add me on discord?

Hey man, was wanting to ask you for paypal/patreon donation info via discord if thats cool with you. Love the work your doing and promptness of updating! Vl4dim1r#3832

Can't start server

Trying to run server not working:

user@Bluebot-SERVER:~/Desktop/server test/Dist$ wine64 ./bedrock_server_mod.exe 
Injected!0009:fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (0x22f550 1 C) semi-stub

HealthCheck 0009:fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (0x22f2d0 1 C) semi-stub
0009:fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (0x22ed60 1 C) semi-stub
0000000140000000 00000001400A5DE0
0009:fixme:ntdll:NtLockFile I/O completion on lock not implemented yet
0009:fixme:msvcp:_Mtx_init_in_situ unknown flags ignored: 2
0009:fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (0x22e920 1 C) semi-stub
0009:fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (0x22e750 1 C) semi-stub
0009:fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (0x22e1d0 1 C) semi-stub
0009:fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (0x22e420 1 C) semi-stub
2020-05-04 09:54:04 V [Base] (Mod::Base:123) Current thread id: 9
2020-05-04 09:54:04 I [Base] (Mod::Base:124) Base mod loaded, setting up CtrlC handler...
2020-05-04 09:54:04 V [LogDatabase] (Mod::Base:164) initialized (location log.db)
2020-05-04 09:54:04 I [ModLoader] (Mod::Base:108) Starting loading mods
wine: Call from 0x7bc5b50c to unimplemented function KERNEL32.dll.RaiseFailFastException, aborting
0009:err:module:attach_dlls "ChakraCore.dll" failed to initialize, aborting
0009:err:module:attach_dlls Initializing dlls for L"Z:\\home\\user\\Desktop\\server test\\Dist\\bedrock_server_mod.exe" failed, status 80000100
user@Bluebot-SERVER:~/Desktop/server test/Dist$ ls
addition_symbols.db     ChakraCore.dll  funchook.dll  log.db      Mods         vcruntime140_1.dll
Base.dll                Chakra.dll      Include       log.db-shm  sqlite3.dll  vcruntime140.dll
bedrock_server_mod.exe  custom.yaml     Lib           log.db-wal  user.db      yaml-cpp.dll
user@Bluebot-SERVER:~/Desktop/server test/Dist$ 

I have some questions and some suggestions...

I like this modloader, because i can use it on Windows and because it has already some cool features.
My questions are:

  • Why the spawn protection doesn't protect anything? And if possible, can i prevent players breaking only?
  • Why is this tool a little bit complicated to use?
  • Custom name and home are not working, can you fix them?

My suggestions are:

  • Add the possibility to add mods much easily and to make a config for each them
  • You should make a website for this project with a mod repository

I hope with these questions and suggestions i can improve the project.

Scripting API... but no documentation?

I can't find anything to do with the functions in the scripting API, even if you con't have any proper documentation could I at least see what each function does? Is there a file which contains every function?

How to run EZ by docker

[root@ecs-0rZQB dist]# docker run --rm -ti -p 19132:19132/udp -v /root/ez/dist:/data codehz/wine:bdlauncher-runtime

Injected!

HealthCheck 0000000140000000 0000000140054870

Failed to load base mod.

And I try many docker images,they are all back me the same error message.

My docker version is

Docker version 19.03.8, build afacb8b

My Server is CentOS7.6 X64

Thank you.

Suggestion: Provide server performance settings for lower end host devices

I think It would be a really cool addition to add some settings to reduce lag and keep server TPS more constant. This would for sure make hosting using the server mod more versatile and improve quality of the host. Also, apologies if I misused this tab as I am not reporting an issue, but I dont know where else I would add this.

[very confused]

im trying to get this on windows but im dumb.. it seems.
stuck on the first step: How to get bedrock_server_mod.lib

edit: not confused, was told to download the official bedrock server then extract the .tar.xz file onto where my bedrock server folder is located then run the bedrock_server_mod.exe

Dockerfile for automatic download etc

FROM busybox:latest                                 
WORKDIR /root                                       
COPY setup.sh .                                     
RUN chmod +x ./setup.sh ; ./setup.sh ; rm ./setup.sh
                                                    
FROM codehz/wine:bdlauncher-runtime                 
WORKDIR /data                                       
COPY --from=0 /root/ .                              

setup.sh

wget https://minecraft.azureedge.net/bin-win/bedrock-server-1.14.60.5.zip                          
unzip bedrock-server-1.14.60.5.zip                                                                 
wget https://github.com/Element-0/ElementZero/releases/download/200504/ElementZero-200504-win64.zip
unzip ElementZero-200504-win64.zip                                                                 
cp -r ./ElementZero-200504-win64/* ./                                                              
rm -rf ./ElementZero-200504-win64 ElementZero-200504-win64.zip bedrock-server-1.14.60.5.zip        

Crashes when joining the server [1.14.60.5]

OS:Windows 10
Server version:1.14.60.5
Element Zero version:latest release(tag:200414)

        at CxxThrowException (UnknownFile:?)
        at std::_Xinvalid_argument (UnknownFile:?)
        at PreInit (UnknownFile:?)
        at bool Blacklist::isBlocked[struct Blacklist::Entry const &]const  (UnknownFile:?)
        at void ServerNetworkHandler::handle[class NetworkIdentifier const &,class LoginPacket const &] (UnknownFile:?)
        at PreInit (UnknownFile:?)
        at bool NetworkHandler::_sortAndPacketizeEvents[class NetworkHandler::Connection &,class std::chrono::time_point<struct std::chrono::steady_clock,class std::chrono::duration<__int64,struct std::ratio<1,1000000000> > >] (UnknownFile:?)
        at void NetworkHandler::runEvents[bool] (UnknownFile:?)
        at void NetworkHandler::runEvents[bool] (UnknownFile:?)
        at bool Minecraft::update[void] (UnknownFile:?)
        at void ServerInstance::_update[void] (UnknownFile:?)
        at void ServerInstance::startServerThread[void] (UnknownFile:?)
        at bool SPSCQueue<class std::function<void >,512>::inner_enqueue<0,class std::function<void > >[class std::function<void > &&] (UnknownFile:?)
        at unsigned int std::_Pad::_Call_func[void *] (UnknownFile:?)
        at beginthreadex (UnknownFile:?)
        at BaseThreadInitThunk (UnknownFile:?)
        at RtlUserThreadStart (UnknownFile:?)

Server closes on start. 'DBStorage chain is invalid. Possibly encryption-related, or bad DBStorageConfig passed. Reason: Unable to decipher/decrypt LevelDB.'

I [SERVER] (DedicatedServer::start:217) Starting Server
I [SERVER] (DedicatedServer::start:218) Version 1.14.32.1 with element-0 (200329)
I [SERVER] (DedicatedServer::start:219) Session ID 2287691a-bcb6-4ae8-ba7c-01455aa6cb23
I [SERVER] (DedicatedServer::start:231) Level Name: Simply
I [SERVER] (DedicatedServer::start:256) Game mode: 2 Adventure
I [SERVER] (DedicatedServer::start:258) Difficulty: 1 EASY
I [DATABASE] (DBStorage::DBStorage:183) opening worlds/Simply/db
E [DATABASE] (DBStorage::DBStorage:270) DBStorage chain is invalid. Possibly encryption-related, or bad DBStorageConfig passed. Reason: Unable to decipher/decrypt LevelDB.
E [SERVER] (DedicatedServer::start:465) Network port occupied, can't start server.

transferserver - command unknown

Hi

as in title - when I type /transferserver Im getting info that command is unknown / check is this command exists or You have a right to use it

Am I doing something wrong?

show the time

Is there any way to show the time on the console? It is the basic function of BDS, but Element-0 does not show the time.

Also, the time in the log file does not match the time zone of my computer. How can I change the time zone?

Small bugs.

Unexpected server .exe quitting within seconds after starting up. I noticed that if the server runs for over about 10 seconds, it wont crash. I am using windows 10 home 10.0.18363 with the x64 c++ redistributable installed.

The host cannot type the "%" character in-game, it just sends a blank message.

The custom-name command does not have auto completion features upon loading the server IN SOME INSTANCES, unlike the vanilla commands where you can click "tab". Nothing showed after the "set" part of the command. This issue stopped happening after I disabled some other mods (built-in ones), but I figured it might be worth mentioning.

No access to memory location.

20.03 17:45:57 [服务器] 信息 wine-5.3
20.03 17:45:57 [服务器] 信息 Injected!
20.03 17:45:57 [服务器] 信息 HealthCheck 0000000140000000 0000000140054870
20.03 17:45:57 [服务器] 信息 Failed to load base mod.
20.03 17:45:57 [服务器] 信息 No access to memory location.

client stuck locating server - docker

everything seems fine server side but client is stuck locating server, same client works perfectly with https://hub.docker.com/r/roemer/bedrock-server

ubuntu@user:~$ sudo docker run --name=mcpemod  -ti -p 19132:19132/udp -v /home/user/mcpemod:/data codehz/wine:bdlauncher-runtime
Injected!
HealthCheck 0000000140000000 0000000140054870
V [Base] (Mod::Base:145) Current thread id: 9
I [Base] (Mod::Base:146) Base mod loaded, setting up CtrlC handler...
V [LogDatabase] (Mod::Base:163) initialized (location log.db)
V [ModLoader] (Mod::Base:87) Loaded Z:\data\Mods\Audit.dll
V [ModLoader] (Mod::Base:87) Loaded Z:\data\Mods\BasicAntiCheat.dll
V [ModLoader] (Mod::Base:87) Loaded Z:\data\Mods\Blacklist.dll
V [ModLoader] (Mod::Base:87) Loaded Z:\data\Mods\CommandSupport.dll
V [ModLoader] (Mod::Base:87) Loaded Z:\data\Mods\DebugTool.dll
V [ModLoader] (Mod::Base:87) Loaded Z:\data\Mods\Economy.dll
V [ModLoader] (Mod::Base:87) Loaded Z:\data\Mods\Essentials.dll
V [ModLoader] (Mod::Base:87) Loaded Z:\data\Mods\NoEncryption.dll
V [ModLoader] (Mod::Base:87) Loaded Z:\data\Mods\SpawnProtection.dll
I [ModLoader] (Mod::Base:135) Init BasicAntiCheat
I [ModLoader] (Mod::Base:135) Init CommandSupport
I [ModLoader] (Mod::Base:135) Init DebugTool
I [ModLoader] (Mod::Base:135) Init NoEncryption
I [ModLoader] (Mod::Base:135) Init Audit
I [ModLoader] (Mod::Base:135) Init Blacklist
V [Blacklist] (Mod::Blacklist:25) Initialize database blacklist.db
I [ModLoader] (Mod::Base:135) Init Economy
I [ModLoader] (Mod::Base:135) Init Essentials
I [ModLoader] (Mod::Base:135) Init SpawnProtection
I [SERVER] (DedicatedServer::initializeLogging:166) setting up server logging...
I [SERVER] (DedicatedServer::start:217) Starting Server
I [SERVER] (DedicatedServer::start:218) Version 1.14.32.1 with element-0 (200310)
I [SERVER] (DedicatedServer::start:219) Session ID 40356aea-d828-4d78-9be5-3a78f9c61bb3
I [SERVER] (DedicatedServer::start:231) Level Name: Bedrock level
I [SERVER] (DedicatedServer::start:256) Game mode: 0 Survival
I [SERVER] (DedicatedServer::start:258) Difficulty: 1 EASY
I [DATABASE] (DBStorage::DBStorage:183) opening worlds/Bedrock level/db
I [NETWORK] (RakPeerHelper::LogIPSupport:130) IPv4 supported, port: 19132
I [NETWORK] (RakPeerHelper::LogIPSupport:141) IPv6 not supported
I [SERVER] (DedicatedServer::start:529) Server started.
^RallallowI [SERVER] (ServerNetworkHandler::_onClientAuthenticated:1331) Player connected: PLAYER, xuid: 2533274971772643
V [PlayerDB] (Mod::Base:126) PLAYER joined (from 186.119.66.111|61153)

Mods?

Where can I find a collection of mods made for ElementZero?

Mod docs

Please may you tell me what the functions for mods are (like you did for scripts, just send me to the file that does that)?

server version update

ill resolve this once the next release is issued. The server exe is not compatible with bedrock edition 1.14.6. the mojang software is updated though.

What do the built-in mods do?

Please may you tell me the function of each mod and a quick rundown on how to use them.

Also: Please add a readme file to the mod templates, telling users to look at the issue, using it I can assemble a python scraping program to help make the mod catalogue!

Unable to load plugin

I use Ubuntu's docker application to start the BDS server with EZ, but I can't load any dll plugin
TIM图片20200420145200

AutoRestart ("Keep Alive Server") - Windows 10

Windows 10: how to configure your server to automatically restart after a crash.

Download shutter (scheduling application - this is safe to use if taken from the correct website).
Configure new events as follows:
1.) Process; name: bedrock_server_mod.exe. Trigger when: stops; check every (any number you want).
2.) Process; name: bedrock_server_mod.exe. Trigger when: starts; check every (any number you want).
Actions
1.) Run program (bedrock_server_mod.exe)
2.) Run preset; name: KA

Go to presets and click save/save as, and name it KA. Click save. To start the AutoRestart, click "Start".
Whenever your server crashes (generally from Hack Clients), the console/server will close. Shutter will reopen it and restart the checking process when the server reopens.

You can edit the shutter settings to run in the background and other stuff, but I'm not explaining that here.

Startup Error - Failed to load base mod.

I received the following error after building/testing on my workstation, then transferring to my windows dedicated server.

Injected! HealthCheck 00007FF65D5C0000 00007FF65D614 Failed to load base mod. The specified module could not be found.

I have installed the vc_redist.x64. Are there any other dependencies that need to be installed, or any hard filesystem links that need to be updated?
https://i.gyazo.com/499a3ba5c42d94bd3298d8a56f71d6df.png

Custom Name Key

I can't find anything anywhere that indicates what the custom-name-key is when trying to set a custom name. I keep getting syntax errors on that parameter when trying to set a custom name. What is it?

Too much verbose

Is there a way to reduce verbose output so that it looks more like the vanilla server software:
e.g: Get rid of the stuff in brackets (DBStorage: ......)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.