cubicmc / cubic-server Goto Github PK
View Code? Open in Web Editor NEWA fast and extensible C++ Minecraft server implementation
Home Page: https://cubicmc.org
License: GNU General Public License v3.0
A fast and extensible C++ Minecraft server implementation
Home Page: https://cubicmc.org
License: GNU General Public License v3.0
No idea but it would be better to use function mocking to test the whole
Originally posted by @huntears in #16 (comment)
Too many files in root, looks bad
Version tested :
Steps :
Issue :
For every tests here please create the files in `/tmp` as this would avoid any bad collisions
Originally posted by @huntears in #16 (comment)
When dropping an item you cannot leave it on the floor as you pick it up instantly after dropping it.
The current architecture does not allow for this packet to be parsed since it is not length prefixed.
We should at least support it at some point
The global palette is needed in the serialization of chunk section with more than 256 different block.
As of now, the implemented global palette is only temporary
When eating, we need to release the click button to finish eating an item
The network compression introduced by #205 is currently not working when using the Krypton mod, why it is not working is unknown but it is working with any clients not using this mod.
Note: It might be worth testing cubic-server behind Velocity as Krypton uses their implementation of packet compression/decompression.
For now, the binding of the 'Enter' key is to be fixed, as the binding works with other keys (such as 'Esc' key (current binding)). As sending commands with the 'Esc' key instead of the 'Enter' one is not user-friendly, a fix is needed.
Do the gtk interface but in ncurses
We need to generate some code to translate protocol ids to internal structures and vice versa, something like this :
#include <cstdint>
#include <unordered_map>
#include <string>
using namespace std;
enum class Blocks {
MINECRAFT_ACACIA_PRESSURE_PLATE,
};
struct Block {
Blocks type;
SomeMapType properties;
constexpr string toName() const {
switch (this->type) {
case Blocks::MINECRAFT_ACACIA_PRESSURE_PLATE:
return "minecraft:acacia_pressure_plate";
}
}
constexpr uint64_t toProtocol() const {
switch (this->type) {
case Blocks::MINECRAFT_ACACIA_PRESSURE_PLATE:
if constexpr (this->properties == SomeMapType({
{"powered", "true"}
}))
return 4186;
if constexpr (this->properties == SomeMapType({
{"powered", "false"}
}))
return 4187;
}
}
};
// "minecraft:acacia_pressure_plate": {
// "properties": {
// "powered": [
// "true",
// "false"
// ]
// },
// "states": [
// {
// "id": 4186,
// "properties": {
// "powered": "true"
// }
// },
// {
// "default": true,
// "id": 4187,
// "properties": {
// "powered": "false"
// }
// }
// ]
// },
Should be done next sprint
Currently the code for parsing a packet is as follow
static const auto h = ParsePacket<Handshake>()
.prop<int32_t>(popVarInt, offsetof(Handshake, prot_version))
.prop<std::string>(popString, offsetof(Handshake, addr))
.prop<uint16_t>(popUnsignedShort, offsetof(Handshake, port))
.prop<int32_t>(popVarInt, offsetof(Handshake, next_state));
return h.parse(buffer);
What would be really nice is to find a way to make the parser creation completely at compile time, but I currently do not have the knowledge to do so.
The main problem would be the functions passed as parameters of prop, as the value of function pointers is determined at link time and not compile time, which fails the constexpr.
Should be a pretty easy fix, we just need to close the connection of the faulty client, this will do for now
For example torches and flowers don't drop anything
Sometimes an access to the chunk column map will fail and permanently lock a chunk to the void.
We forget to catch an exception for entity fetching
Heyo,
There's an issue with the binary, since it requires blocks-x.xx.x.json
& registries-x.xx.x.json
, where x.xx.x
is the actual Minecraft version.
How about embeding those config files inside the binary so the user / sysadmin musn't move them into the workdir too?
Eventually look for those files in /usr/share/cubic-server
if the above solution is impossible.
It is currently hardcoded this way but having proper drops could be nice.
You cannot land in creative mode as of now, you just hover on top of the ground.
Global
from identifier in types.hpp
playerPickupItem()
)If we want to change version, we need to rewrite the entire protocol and loose the compatibility with the last one.
The objective here is to have a sort of library able to handle the protocol externally
In Server::_gameTick
the server might iterate over a client that is getting instantiated which can result in a crash (You can trigger it pretty easily by removing the sleep in Server::_gameLoop
).
Add a mutex on the client list might fix it, but that begs the question if we need a mutex for all the containers accessed from multiple threads... To be seen I guess
Crash happening on master when starting software.
Compilation using cmake + g++12
Launch with no arguments (will investigate and try to fix the issue)
It should just catch it and then close the client connection
cubic-server/cubic-server/Client.cpp
Line 81 in 7840915
Currently no threads are being re-used, therefore it allocates 3 threads per tick (Which is a lot).
We need a thread-pool for that
In ClientPacket.hpp
enum and declaration have not the same order
Currently only ipv4 connections are accepted by the server, but it must also support ipv6
Heyo,
Is AUR package from cubic-server
will be available in the future?
From the interface, I have no proper way of getting the logs to be displayed.
From the interface, I have no way of getting a list of online players to be displayed.
Currently there is one argument being parsed and it is the -h
, it is using a simple strcmp
but a whole argument parser would be better for future arguments.
What the ConfigHandler has to do if the file does not exist ?
For now, it just print in std::cerr the error
Does it have to create a new file ?
Does it have to crash and tell the user that the file does not exist ?
Some things to change but overall it is what we need, maybe a use of `std::filesystem` could be nice
Originally posted by @huntears in #16 (review)
We are currently calling the Mojang API like crazy while not caring for rate limits, this should be addressed at some point.
Change the main "CMake" workflow to several workflows with explicit names
It can depend on if you're moving or not, which sounds really bad
Related PR: #222
Maybe a TextView is more accurate for this job.
Good evening,
Would there be a list of needed dependencies (i.e. gcc
, make
etc) in the Building
section of README.md
?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.