Remove docs from master branch

Its now in a other branch
This commit is contained in:
Snowiiii 2024-10-31 18:56:06 +01:00
parent acf2fab100
commit 9b1e518556
24 changed files with 0 additions and 4344 deletions

View File

@ -1,55 +0,0 @@
# Based on https://vitepress.dev/guide/deploy#github-pages
name: Deploy VitePress site to GitHub Pages
on:
push:
branches: [master]
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 23
cache: npm
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Install dependencies
run: npm ci
- name: Build with VitePress
run: npm run docs:build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/.vitepress/dist
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

View File

@ -1,19 +0,0 @@
<script setup>
import { computed, getCurrentInstance } from 'vue';
const props = defineProps({
d: {
type: Date,
required: true
}
});
const formattedDateTime = computed(() => {
return getCurrentInstance().appContext.config.globalProperties.$dateTimeFormatter.format(props.d);
});
</script>
<template>
{{ formattedDateTime }}
</template>

View File

@ -1,18 +0,0 @@
<script setup>
import { computed, getCurrentInstance } from 'vue';
const props = defineProps({
n: {
type: Number,
required: true
}
});
const formattedNumber = computed(() => {
return getCurrentInstance().appContext.config.globalProperties.$numberFormatter.format(props.n);
});
</script>
<template>
{{ formattedNumber }}
</template>

View File

@ -1,75 +0,0 @@
import { defineConfig } from "vitepress";
// https://vitepress.dev/reference/site-config
export default defineConfig({
title: "Pumpkin",
description:
"Empowering everyone to host fast and efficient Minecraft servers",
lang: "en-US",
base: "/Pumpkin/",
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
search: {
provider: "local",
},
sidebar: [
{
text: "About",
items: [
{ text: "Introduction", link: "/about/introduction" },
{ text: "Quick Start", link: "/about/quick-start" },
{ text: "Benchmarks", link: "/about/benchmarks" },
],
},
{
text: "Developers",
items: [
{ text: "Contributing", link: "/developer/contributing", },
{ text: "Introduction", link: "/developer/introduction" },
{ text: "Networking", link: "/developer/networking" },
{ text: "Authentication", link: "/developer/authentication" },
{ text: "RCON", link: "/developer/rcon" },
{ text: "World", link: "developer/world"},
],
},
{
text: "Configuration",
items: [
{ text: "Introduction", link: "/config/introduction" },
{ text: "Basic", link: "/config/basic" },
{ text: "Advanced", link: "/config/advanced" },
],
},
{
text: "Troubleshooting",
items: [
{ text: "Common Issues", link: "/troubleshooting/common_issues.md" },
],
},
],
socialLinks: [
{ icon: "github", link: "https://github.com/Snowiiii/Pumpkin" },
{ icon: "discord", link: "https://discord.gg/RNm224ZsDq" },
],
logo: "/assets/icon.png",
footer: {
message: "Released under the MIT License.",
copyright: "Copyright © 2024-present Aleksandr Medvedev",
},
editLink: {
pattern: "https://github.com/Snowiiii/Pumpkin/blob/master/docs/:path",
text: "Edit this page on GitHub",
},
lastUpdated: {
text: "Updated at",
formatOptions: {
dateStyle: "medium",
timeStyle: "medium",
},
},
outline: "deep"
},
head: [["link", { rel: "icon", href: "/Pumpkin/assets/favicon.ico" }]],
});

View File

@ -1,29 +0,0 @@
// https://vitepress.dev/guide/custom-theme
import { h } from 'vue'
import type { Theme } from 'vitepress'
import DefaultTheme from 'vitepress/theme'
import './style.css'
import FmtNum from '../components/FmtNum.vue'
import FmtDateTime from '../components/FmtDateTime.vue'
export default {
extends: DefaultTheme,
Layout: () => {
return h(DefaultTheme.Layout, null, {
// https://vitepress.dev/guide/extending-default-theme#layout-slots
})
},
enhanceApp({ app, router, siteData }) {
app.config.globalProperties.$numberFormatter = new Intl.NumberFormat(navigator.languages);
app.config.globalProperties.$dateTimeFormatter = new Intl.DateTimeFormat(navigator.languages, {
year: "numeric",
month: "long",
day: "numeric",
hour: "numeric",
minute: "numeric",
timeZoneName: "short"
});
app.component('FmtNum', FmtNum);
app.component('FmtDateTime', FmtDateTime);
}
} satisfies Theme

View File

@ -1,139 +0,0 @@
/**
* Customize default theme styling by overriding CSS variables:
* https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/vars.css
*/
/**
* Colors
*
* Each colors have exact same color scale system with 3 levels of solid
* colors with different brightness, and 1 soft color.
*
* - `XXX-1`: The most solid color used mainly for colored text. It must
* satisfy the contrast ratio against when used on top of `XXX-soft`.
*
* - `XXX-2`: The color used mainly for hover state of the button.
*
* - `XXX-3`: The color for solid background, such as bg color of the button.
* It must satisfy the contrast ratio with pure white (#ffffff) text on
* top of it.
*
* - `XXX-soft`: The color used for subtle background such as custom container
* or badges. It must satisfy the contrast ratio when putting `XXX-1` colors
* on top of it.
*
* The soft color must be semi transparent alpha channel. This is crucial
* because it allows adding multiple "soft" colors on top of each other
* to create a accent, such as when having inline code block inside
* custom containers.
*
* - `default`: The color used purely for subtle indication without any
* special meanings attched to it such as bg color for menu hover state.
*
* - `brand`: Used for primary brand colors, such as link text, button with
* brand theme, etc.
*
* - `tip`: Used to indicate useful information. The default theme uses the
* brand color for this by default.
*
* - `warning`: Used to indicate warning to the users. Used in custom
* container, badges, etc.
*
* - `danger`: Used to show error, or dangerous message to the users. Used
* in custom container, badges, etc.
* -------------------------------------------------------------------------- */
:root {
--vp-c-default-1: var(--vp-c-gray-1);
--vp-c-default-2: var(--vp-c-gray-2);
--vp-c-default-3: var(--vp-c-gray-3);
--vp-c-default-soft: var(--vp-c-gray-soft);
--vp-c-brand-1: var(--vp-c-indigo-1);
--vp-c-brand-2: var(--vp-c-indigo-2);
--vp-c-brand-3: var(--vp-c-indigo-3);
--vp-c-brand-soft: var(--vp-c-indigo-soft);
--vp-c-tip-1: var(--vp-c-brand-1);
--vp-c-tip-2: var(--vp-c-brand-2);
--vp-c-tip-3: var(--vp-c-brand-3);
--vp-c-tip-soft: var(--vp-c-brand-soft);
--vp-c-warning-1: var(--vp-c-yellow-1);
--vp-c-warning-2: var(--vp-c-yellow-2);
--vp-c-warning-3: var(--vp-c-yellow-3);
--vp-c-warning-soft: var(--vp-c-yellow-soft);
--vp-c-danger-1: var(--vp-c-red-1);
--vp-c-danger-2: var(--vp-c-red-2);
--vp-c-danger-3: var(--vp-c-red-3);
--vp-c-danger-soft: var(--vp-c-red-soft);
}
/**
* Component: Button
* -------------------------------------------------------------------------- */
:root {
--vp-button-brand-border: transparent;
--vp-button-brand-text: var(--vp-c-white);
--vp-button-brand-bg: var(--vp-c-brand-3);
--vp-button-brand-hover-border: transparent;
--vp-button-brand-hover-text: var(--vp-c-white);
--vp-button-brand-hover-bg: var(--vp-c-brand-2);
--vp-button-brand-active-border: transparent;
--vp-button-brand-active-text: var(--vp-c-white);
--vp-button-brand-active-bg: var(--vp-c-brand-1);
}
/**
* Component: Home
* -------------------------------------------------------------------------- */
:root {
--vp-home-hero-name-color: transparent;
--vp-home-hero-name-background: -webkit-linear-gradient(
120deg,
#bd34fe 30%,
#41d1ff
);
--vp-home-hero-image-background-image: linear-gradient(
-45deg,
#bd34fe 50%,
#47caff 50%
);
--vp-home-hero-image-filter: blur(44px);
}
@media (min-width: 640px) {
:root {
--vp-home-hero-image-filter: blur(56px);
}
}
@media (min-width: 960px) {
:root {
--vp-home-hero-image-filter: blur(68px);
}
}
/**
* Component: Custom Block
* -------------------------------------------------------------------------- */
:root {
--vp-custom-block-tip-border: transparent;
--vp-custom-block-tip-text: var(--vp-c-text-1);
--vp-custom-block-tip-bg: var(--vp-c-brand-soft);
--vp-custom-block-tip-code-bg: var(--vp-c-brand-soft);
}
/**
* Component: Algolia
* -------------------------------------------------------------------------- */
.DocSearch {
--docsearch-primary-color: var(--vp-c-brand-1) !important;
}

View File

@ -1,188 +0,0 @@
# Benchmarks
Here, common Minecraft servers are compared against Pumpkin.
> [!CAUTION]
> **This comparison is unfair.** Pumpkin currently has far fewer features than other servers, which might suggest it uses fewer resources.
> It's also important to consider that other servers have had years for optimization.
> Vanilla forks, which don’t need to rewrite the entire vanilla logic, can focus exclusively on optimizations.
![Screenshot From 2024-10-15 16-42-53](https://github.com/user-attachments/assets/e08fbb00-42fe-4479-a03b-11bb6886c91a)
## Specifications
#### Technical
**Software**
- Distribution: Manjaro Linux
- Architecture: x86_64 (64-bit)
- Kernel Version: 6.11.3-arch1-1
**Hardware**
- Motherboard: MAG B650 TOMAHAWK WIFI
- CPU: AMD Ryzen 7600X 6-Core
- RAM: Corsair 2x16GB DDR5 6000Mhz
- Storage: Samsung 990 PRO 1TB PCIe 4.0 M.2 SSD
- Cooling: be quiet Dark Rock Elite
**Rust**
- Toolchain: stable-x86_64-unknown-linux-gnu (1.81.0)
- Rust Compiler: rustc 1.81.0 (eeb90cda1 2024-09-04)
**Java**
- JDK Version: OpenJDK 23 64-Bit 2024-09-17
- JRE Version: OpenJDK Runtime Environment (build 23+37)
- Vendor: Oracle
#### Game
- Minecraft version: 1.21.1
- View distance: 10
- Simulated distance: 10
- Online mode: false
- Rcon: false
<sub><sup>online mode was disabled for easier testing with non-premium accounts</sup></sub>
> [!NOTE]
> All tests have been ran multiple times to guarantee consistent results.
> All players did not move when spawning, only the initial 8 chunks were loaded.
> All servers used their own terrain generation, no world was pre-loaded.
> [!IMPORTANT]
> `CPU Max` is usually higher with one player as the initial chunks are being loaded.
## Pumpkin
Build: [8febc50](https://github.com/Snowiiii/Pumpkin/commit/8febc5035d5611558c13505b7724e6ca284e0ada)
Compile args: `--release`
Run args:
**File Size:** <FmtNum :n=12.3 />MB
**Startup time:** <FmtNum :n=8 />ms
**Shutdown time:** <FmtNum :n=0 />ms
| Players | RAM | CPU Idle | CPU Max |
| ------- | --------------------- | ---------------- | ------------------ |
| 0 | <FmtNum :n=392.2 />KB | <FmtNum :n=0 />% | <FmtNum :n=0 />% |
| 1 | <FmtNum :n=24.9 />MB | <FmtNum :n=0 />% | <FmtNum :n=4 />% |
| 2 | <FmtNum :n=25.1 />MB | <FmtNum :n=0 />% | <FmtNum :n=0.6 />% |
| 5 | <FmtNum :n=26 />MB | <FmtNum :n=0 />% | <FmtNum :n=1 />% |
| 10 | <FmtNum :n=27.1 />MB | <FmtNum :n=0 />% | <FmtNum :n=1.5 />% |
<sub><sup>Pumpkin does cache already loaded chunks, resulting in no extra RAM usage besides player data and minimal CPU usage.</sup></sub>
#### Compile time
Compiling from Nothing:
**Debug:** <FmtNum :n=10.35 />sec
**Release:** <FmtNum :n=38.40 />sec
Recompilation (pumpkin crate):
**Debug:** <FmtNum :n=1.82 />sec
**Release:** <FmtNum :n=28.68 />sec
## Vanilla
Release: [1.21.1](https://piston-data.mojang.com/v1/objects/59353fb40c36d304f2035d51e7d6e6baa98dc05c/server.jar)
Compile args:
Run args: `nogui`
**File Size:** <FmtNum :n=51.6 />MB
**Startup time:** <FmtNum :n=7 />sec
**Shutdown time:** <FmtNum :n=4 />sec
| Players | RAM | CPU idle | CPU Max |
| ------- | --------------------- | ---------------------------------------- | ------------------ |
| 0 | <FmtNum n="860" />MB | <FmtNum n="0.1" /> - <FmtNum n="0.3" />% | <FmtNum n="51" />% |
| 1 | <FmtNum n="1.5" />GB | <FmtNum n="0.9" /> - <FmtNum n="1" />% | <FmtNum n="41" />% |
| 2 | <FmtNum n="1.6" />GB | <FmtNum n="1" /> - <FmtNum n="1.1" />% | <FmtNum n="10" />% |
| 5 | <FmtNum n="1.8" />GB | <FmtNum n="2" />% | <FmtNum n="20" />% |
| 10 | <FmtNum n="2.2" />GB | <FmtNum n="4" />% | <FmtNum n="24" />% |
## Paper
Build: [122](https://api.papermc.io/v2/projects/paper/versions/1.21.1/builds/122/downloads/paper-1.21.1-122.jar)
Compile args:
Run args: `nogui`
**File Size:** <FmtNum :n=49.4 />MB
**Startup time:** <FmtNum :n=7 />sec
**Shutdown time:** <FmtNum :n=3 />sec
| Players | RAM | CPU idle | CPU Max |
| ------- | ------------------- | -------------------------------------- | ----------------- |
| 0 | <FmtNum :n=1.1 />GB | <FmtNum :n=0.2 /> - <FmtNum :n=0.3 />% | <FmtNum :n=36 />% |
| 1 | <FmtNum :n=1.7 />GB | <FmtNum :n=0.9 /> - <FmtNum :n=1.0 />% | <FmtNum :n=47 />% |
| 2 | <FmtNum :n=1.8 />GB | <FmtNum :n=1 /> - <FmtNum :n=1.1 />% | <FmtNum :n=10 />% |
| 5 | <FmtNum :n=1.9 />GB | <FmtNum :n=1.5 />% | <FmtNum :n=15 />% |
| 10 | <FmtNum :n=2 />GB | <FmtNum :n=3 />% | <FmtNum :n=20 />% |
## Purpur
Build: [2324](https://api.purpurmc.org/v2/purpur/1.21.1/2324/download)
Compile args:
Run args: `nogui`
**File Size:** <FmtNum :n=53.1 />MB
**Startup time:** <FmtNum :n=8 />sec
**Shutdown time:** <FmtNum :n=4 />sec
| Players | RAM | CPU idle | CPU Max |
| ------- | ------------------- | -------------------------------------- | ----------------- |
| 0 | <FmtNum :n=1.4 />GB | <FmtNum :n=0.2 /> - <FmtNum :n=0.3 />% | <FmtNum :n=25 />% |
| 1 | <FmtNum :n=1.6 />GB | <FmtNum :n=0.7 /> - <FmtNum :n=1.0 />% | <FmtNum :n=35 />% |
| 2 | <FmtNum :n=1.7 />GB | <FmtNum :n=1.1 /> - <FmtNum :n=1.3 />% | <FmtNum :n=9 />% |
| 5 | <FmtNum :n=1.9 />GB | <FmtNum :n=1.6 />% | <FmtNum :n=20 />% |
| 10 | <FmtNum :n=2.2 />GB | <FmtNum :n=2 /> - <FmtNum :n=2.5 />% | <FmtNum :n=26 />% |
## Minestom
Commit: [0ca1dda2fe](https://github.com/Minestom/Minestom/commit/0ca1dda2fe11390a1b89a228bbe7bf78fefc73e1)
Compile args:
Run args:
**Language:** Benchmarks ran with Kotlin 2.0.0 (Minestom itself is made with Java)
**File Size:** <FmtNum :n=2.8 />MB (Library)
**Startup time:** <FmtNum :n=310 />ms
**Shutdown time:** <FmtNum :n=0 />ms
<sub>[Used example code from](https://minestom.net/docs/setup/your-first-server)</sub>
| Players | RAM | CPU idle | CPU Max |
| ------- | ------------------- | -------------------------------------- | ---------------- |
| 0 | <FmtNum :n=228 />MB | <FmtNum :n=0.1 /> - <FmtNum :n=0.3 />% | <FmtNum :n=1 />% |
| 1 | <FmtNum :n=365 />MB | <FmtNum :n=0.9 /> - <FmtNum :n=1.0 />% | <FmtNum :n=5 />% |
| 2 | <FmtNum :n=371 />MB | <FmtNum :n=1 /> - <FmtNum :n=1.1 />% | <FmtNum :n=4 />% |
| 5 | <FmtNum :n=390 />MB | <FmtNum :n=1.0 />% | <FmtNum :n=6 />% |
| 10 | <FmtNum :n=421 />MB | <FmtNum :n=3 />% | <FmtNum :n=9 />% |
Benchmarked at <FmtDateTime :d="new Date('2024-10-15T16:34Z')" />

View File

@ -1,32 +0,0 @@
# Pumpkin
Pumpkin is a Minecraft server built entirely in **Rust**, offering a fast, efficient,
and customizable experience. It prioritizes performance and player enjoyment while adhering to the core mechanics of the game.
![image](https://github.com/user-attachments/assets/7e2e865e-b150-4675-a2d5-b52f9900378e)
## What Pumpkin wants to achieve
- **Performance**: Leveraging multi-threading for maximum speed and efficiency.
- **Compatibility**: Supports the latest Minecraft server version and adheres to vanilla game mechanics.
- **Security**: Prioritizes security by preventing known security exploits.
- **Flexibility**: Highly configurable, with the ability to disable unnecessary features.
- **Extensibility**: Provides a foundation for plugin development.
## What Pumpkin will not
- Be compatible with plugins or mods for other servers
- Function as a framework for building a server from scratch.
> [!IMPORTANT]
> Pumpkin is currently under heavy development. Check out our [Github Project](https://github.com/users/Snowiiii/projects/12/views/3) to see current progress
## Vanilla
Pumpkin is designed to replicate vanilla Minecraft logic as closely as possible,
ensuring a familiar gameplay experience. However, we've also added new features to enhance your gameplay.
### Redstone
Unlike other forks that may compromise vanilla redstone mechanics, Pumpkin maintains the original redstone behavior.
If you're looking to experiment with redstone modifications or seek performance optimizations, you have the flexibility to do so through our configurable settings.

View File

@ -1,55 +0,0 @@
# Quick Start
**Current Status:**
Pre-release: Currently under development and not yet ready for official release.
To get Pumpkin running, you first have to clone it:
```shell
git clone https://github.com/Snowiiii/Pumpkin.git
cd Pumpkin
```
You may also have to [install rust](https://www.rust-lang.org/tools/install) if you don't already have it.
**Optional:**
You can place a vanilla world into the Pumpkin/ directory if you want. Just name the World `world`
Then run:
> [!NOTE]
> This can take a while because we enabled heavy optimizations for release builds
>
> To apply further optimizations specific to your CPU and use your CPU features, you should set the target-cpu=native
> Rust flag.
```shell
cargo run --release
```
## Docker
Experimental Docker support is available.
The image is currently not published anywhere, but you can use the following command to build it:
```shell
docker build . -t pumpkin
```
To run it, use the following command:
```shell
docker run --rm -p 25565:25565 -v "./world:/pumpkin/world" pumpkin
```
## Test Server
Pumpkin has a Test server maintained by @kralverde. Its runs on the latest commit of Pumpkin
- **IP:** pumpkin.kralverde.dev
**Specs:**
- OS: Debian GNU/Linux bookworm 12.7 x86_64
- Kernel: Linux 6.1.0-21-cloud-amd64
- CPU: Intel Core (Haswell, no TSX) (2) @ 2.40 GHz
- RAM: 4GB DIMM

View File

@ -1,431 +0,0 @@
# Advanced Configuration
## Proxy
`proxy`
Whether Proxy Configuration is Enabled
```toml
enabled=false
```
### Velocity
`proxy.velocity`
Whether [Velocity](https://papermc.io/software/velocity) Proxy is enabled
```toml
enabled=false
```
#### Velocity Secret
This secret is used to ensure that player info forwarded by Velocity comes from your proxy and not from someone pretending to run Velocity
```toml
secret=
```
### Bungeecord
`proxy.bungeecord`
```toml
enabled=false
```
## Authentication
`authentication`
Whether Authentication is enabled
```toml
enabled=false
```
### Authentication URL
The Authentication URL being used
> [!IMPORTANT]
> {username} | The Username from the requested player
>
> {server_hash} | The SHA1 Encrypted hash
```toml
auth_url="https://sessionserver.mojang.com/session/minecraft/hasJoined?username={username}&serverId={server_hash}"
```
### Prevent Proxy Connections
Prevent proxy connections
```toml
prevent_proxy_connections=false
```
### Prevent Proxy Connections URL
The Authentication URL being used
> [!IMPORTANT]
> {username} | The Username from the requested player
>
> {server_hash} | The SHA1 Encrypted hash
>
> {ip} | The IP of the requested Player
```toml
prevent_proxy_connection_auth_url = "https://sessionserver.mojang.com/session/minecraft/hasJoined?username={username}&serverId={server_hash}&ip={ip}"
```
### Player Profile
`authentication.player_profile`
#### Allow Banned Players
Allow players flagged by Mojang (banned, forced name change)
```toml
allow_banned_players=false
```
#### Allowed Actions
Depends on the value above
```toml
allowed_actions=["FORCED_NAME_CHANGE", "USING_BANNED_SKIN"]
```
```toml
FORCED_NAME_CHANGE
USING_BANNED_SKIN
```
### Textures
`authentication.textures`
Whether to filter/validate player textures (e.g. Skins/Capes)
```toml
enabled=true
```
#### Allowed URL Schemes
Allowed URL Schemes for Textures
```toml
allowed_url_schemes=["http", "https"]
```
#### Allowed URL Domains
Allowed URL domains for Textures
```toml
allowed_url_domains=[".minecraft.net", ".mojang.com"]
```
### Texture Types
`authentication.textures.types`
#### Skin
Use player skins
```toml
skin=true
```
#### Cape
Use player capes
```toml
cape=true
```
#### Elytra
Use player elytras
(I didn't know myself that there are custom elytras)
```toml
elytra=true
```
## Compression
`packet_compression`
Whether Packet Compression is enabled
```toml
enable=true
```
### Compression Info
#### Threshold
The compression threshold is used when compression is enabled
```toml
threshold=256
```
#### Level
The Compression Level
> [!IMPORTANT]
> A value between 0..9
>
> 1 = Optimize for the best speed of encoding.
>
> 9 = Optimize for the size of data being encoded.
```toml
level=4
```
## Resource Pack
`resource_pack`
Whether a Resource Pack is enabled
```toml
enable=false
```
### Resource Pack URL
The download URL of the resource pack
```toml
resource_pack_url=
```
### Resource Pack SHA1
The SHA1 hash (40) of the resource pack
```toml
resource_pack_sha1=
```
### Prompt Message
Custom prompt Text component, Leave blank for none
```toml
prompt_message=
```
### Force
Will force the Player to accept the resource pack
```toml
force=false
```
## Commands
`commands`
### Use Console
Are commands from the Console accepted
```toml
use_console=true
```
### Log Console
Should commands from players be logged into the console?
```toml
log_console=true
```
## RCON Config
`rcon`
Whether RCON is enabled
```toml
enable=false
```
### Address
The network address and port where the RCON server will listen for connections
```toml
address=false
```
### Password
The password required for RCON authentication
```toml
password=
```
### Maximum Connections
The maximum number of concurrent RCON connections allowed
If 0 there is no limit
```toml
max_connections=0
```
### RCON Logging
`rcon.logging`
#### Logged Successfully
Whether successful RCON logins should be logged
```toml
log_logged_successfully=true
```
#### Wrong Password
Whether failed RCON login attempts with incorrect passwords should be logged
```toml
log_wrong_password=true
```
#### Commands
Whether all RCON commands, regardless of success or failure, should be logged
```toml
log_commands=true
```
#### Disconnect
Whether RCON client quit should be logged
```toml
log_quit=true
```
## PVP
`pvp`
Whether PVP is enabled
```toml
enable=true
```
### Hurt Animation
Do we want to have the Red hurt animation & fov bobbing
```toml
hurt_animation=true
```
### Protect Creative
Should players in creative be protected against PVP
```toml
protect_creative=true
```
### Knockback
Has PVP Knockback (Velocity)
```toml
knockback=true
```
### Swing
Should players swing when attacking?
```toml
swing=true
```
## Logging
`logging`
Whether Logging is enabled
```toml
enable=true
```
### Level
At which level should be logged
```toml
level=Info
```
```toml
Off
Error
Warn
Info
Debug
Trace
```
### Env
Enables the user to choose log level by setting the `RUST_LOG=<level>` environment variable
```toml
env=false
```
### Threads
Should threads be printed in the message
```toml
threads=true
```
### Color
Should color be enabled for logging messages
```toml
color=true
```
### Timestamp
Should the timestamp be printed in the message
```toml
timestamp=true
```

View File

@ -1,150 +0,0 @@
# Basic Configuration
Representing `configuration.toml`
## Server Address
The address to bind the server to
```toml
server_address=0.0.0.0
```
## Seed
The seed for world generation
```toml
seed=
```
## Max players
The maximum number of players allowed on the server
```toml
max_players=10000
```
## View distance
The maximum view distance for players
```toml
view_distance=10
```
## Simulation distance
The maximum simulation distance for players
```toml
simulation_distance=10
```
## Default difficulty
The default game difficulty
```toml
default_difficulty=Normal
```
```toml
Peaceful
Easy
Normal
Hard
```
## Allow nether
Whether the Nether dimension is enabled
```toml
allow_nether=true
```
## Hardcore
Whether the server is in hardcore mode.
```toml
hardcore=true
```
## Online Mode
Whether online mode is enabled. Requires valid Minecraft accounts
```toml
online_mode=true
```
## Encryption
Whether packet encryption is enabled
> [!IMPORTANT]
> Required when online mode is enabled
```toml
encryption=true
```
## Motd
The server's description displayed on the status screen.
```toml
motd=true
```
## TPS
The server's Tick rate.
```toml
tps=20.0
```
## Use favicon
Whether to use a server favicon or not
```toml
use_favicon=true
```
## Favicon path
The path to the server's favicon
```toml
favicon_path=./icon.png
```
## Default gamemode
The default game mode for players
```toml
default_gamemode=Survival
```
```toml
Undefined
Survival
Creative
Adventure
Spectator
```
## IP Scrubbing
Whether to scrub player IPs from logs
```toml
scrub_ips=true
```

View File

@ -1,16 +0,0 @@
### Configuration
Pumpkin offers a robust configuration system that allows users to customize various aspects of the server's behavior without relying on external plugins. This provides flexibility and control over the server's operation.
### Basic / Advanced
Pumpkin's Configuration is split into a basic Configuration made for quick changes and important changes and a more Advanced Configuration
- `configuration.toml`: simple and can be compared to the vanilla `server.properties`.
- `features.toml`: designed to have all features of pumpkin at one place, making it a large configuration
#### Key Features:
- Extensive Customization: Configure server settings, player behavior, world generation, and more.
- Performance Optimization: Optimize server performance through configuration tweaks.
- Plugin-Free Customization: Achieve desired changes without the need for additional plugins.

View File

@ -1,68 +0,0 @@
### Authentication
### Why Authentication
Minecraft is the most popular game out there and is very easy to play without paying for it. In fact, you don't pay for the game; you pay for a Minecraft account. People who don't buy the game but play it online are using [Cracked Accounts](#cracked-accounts).
#### Cracked Accounts
- Don't cost any money.
- Everyone can set their own nickname.
- Have no UUID.
- Have no skin/cape.
- Not secure.
The problem is that everyone can name themselves however they want, which allows them to join the server as a staff member, for example, and have extended permissions. Cracked accounts are also often used for botting and [Denial of Service](https://en.wikipedia.org/wiki/Denial-of-service_attack) attacks.
### Cracked Server
By default, `online_mode` is enabled in the configuration. This enables authentication, disabling [Cracked Accounts](#cracked-accounts). If you want to allow cracked accounts, you can disable `online_mode` in the `configuration.toml`.
### How Mojang Authentication Works
To ensure a player has a premium account:
1. A client with a premium account sends a login request to the Mojang session server.
2. **Mojang's servers** verify the client's credentials and add the player to their servers.
3. Our server sends a request to the session servers to check if the player has joined the session server.
4. If the request is successful, it will provide more information about the player (e.g., UUID, name, skin/cape...).
### Custom Authentication Server
Pumpkin does support custom authentication servers. You can replace the authentication URL in `features.toml`.
#### How Pumpkin Authentication Works
1. **GET Request:** Pumpkin sends a GET request to the specified authentication URL.
2. **Status Code 200:** If the authentication is successful, the server responds with a status code of 200.
3. **Parse JSON Game Profile:** Pumpkin parses the JSON game profile returned in the response.
#### Game Profile
```rust
struct GameProfile {
id: UUID,
name: String,
properties: Vec<Property>,
profile_actions: Option<Vec<ProfileAction>>, // Optional, only present when actions are applied
}
```
##### Property
```rust
struct Property {
name: String,
value: String, // Base64 encoded
signature: Option<String>, // Optional, Base64 encoded
}
```
##### Profile Action
```rust
enum ProfileAction {
FORCED_NAME_CHANGE,
USING_BANNED_SKIN,
}
```

View File

@ -1,53 +0,0 @@
### Contributing to Pumpkin
We appreciate your interest in contributing to Pumpkin! This document outlines the guidelines for submitting bug reports, feature suggestions, and code changes.
### Getting Started
The easiest way to get started is by asking for help in our [discord](https://discord.gg/wT8XjrjKkf).
### How to Contribute
There are several ways you can contribute to Pumpkin:
#### Reporting Bugs
If you encounter a bug, please search for existing issues on the issue tracker first.
If you can't find a duplicate issue, open a new one.
Follow the template and provide a clear description of the bug, including steps to reproduce it if possible.
Screenshots, logs, or code snippets can also be helpful.
#### Suggesting Features
Do you have an idea on how Pumpkin can be improved? Share your thoughts by opening an issue on the issue tracker.
Describe the proposed feature in detail, including its benefits and potential implementation considerations.
#### Contributing Code
To get started with contributing code to Pumpkin, fork the repository on github
- First create a github account if you don't already have one
- Go to Pumpkin's Official [Github Repository](https://github.com/Snowiiii/Pumpkin) and press fork
> Creating a fork means you now have your own copy of the Pumpkin source code, (this does not mean you own the copyright)
Now that you have a copy that you can edit, you will need a few tools
- Install [git](https://git-scm.com/downloads) for your operating system
- To get started with git, visit [Getting started with Git](https://docs.github.com/en/get-started/getting-started-with-git)
- Optional: If you want a graphical tool to interact with Github, install [Github-Desktop](https://desktop.github.com/download/)
> Github Desktop may be easier if you are not used to the command line, but it is not for everyone
- To get started with Github Desktop, visit [Getting started with GitHub Desktop](https://docs.github.com/en/desktop/overview/getting-started-with-github-desktop)
- If you are wanting to contribut code, install Rust at [rust-lang.org](https://www.rust-lang.org/).
- If you are wanting to contribute to documentation, install [NodeJS](https://nodejs.org/en)
### Additional Information
We encourage you to comment on existing issues and pull requests to share your thoughts and provide feedback.
Feel free to ask questions in the issue tracker or reach out to the project maintainers if you need assistance.
Before submitting a large contribution, consider opening an issue, discussion or talk with us on our discord to discuss your approach.

View File

@ -1,8 +0,0 @@
### Introduction
Welcome to the Pumpkin Documentation!
Whether you're an internal Pumpkin developer or working on a Pumpkin plugin, this documentation is your resource for everything Pumpkin.
> [!IMPORTANT]
> While Pumpkin currently doesn't have plugin support yet, this documentation provides valuable insights into the platform's architecture and functionality, which can be helpful for understanding how to create potential future plugins.

View File

@ -1,271 +0,0 @@
### Networking
Most of the Networking code in Pumpkin can be found at [Pumpkin-Protocol](https://github.com/Snowiiii/Pumpkin/tree/master/pumpkin-protocol)
Serverbound: Client→Server
Clientbound: Server→Client
### Structure
Packets in the Pumpkin protocol are organized by functionality and state.
`server`: Contains definitions for serverbound packets.
`client`: Contains definitions for clientbound packets.
### States
**Handshake**: Always the first packet being sent from the Client. This also determines the next state, usually to indicate if the player wants to perform a Status Request, join the server or wants to be transferred.
**Status**: Indicates the Client wants to see a Status response (MOTD).
**Login**: The Login sequence. Indicates the Client wants to join to the Server.
**Config**: A sequence of Configuration packets is mostly sent from the Server to the Client. (Features, Resource Pack, Server Links, etc.)
**Play**: The final state, which indicates the Player is now ready to join, is also used to handle all other Gameplay packets.
### Minecraft Protocol
You can find all Minecraft Java packets at https://wiki.vg/Protocol. There you also can see in which [State](#States) they are.
You can also can see all the information the Packets have, which we can either Write or Read depending on whether they are Serverbound or Clientbound.
### Adding a Clientbound Packet
1. Adding a Packet is easy. First, you have to derive serde Serialize for packets.
```rust
#[derive(Serialize)]
```
2. Next, you have set the packet using the client_packet macro, This uses the Packet ID automatically sets the Packet ID from the JSON packets file
```rust
#[client_packet("play:disconnect")]
```
3. Now you can create the Struct.
> [!IMPORTANT]
> Please start the Packet name with "C" for Clientbound.
> Also please add the State to the packet if its a Packet sent in multiple States, For example there are 3 Disconnect Packets.
>
> - CLoginDisconnect
> - CConfigDisconnect
> - CPlayDisconnect
Create fields within your packet structure to represent the data that will be sent to the client.
> [!IMPORTANT]
> Use descriptive field names and appropriate data types.
Example:
```rust
pub struct CPlayDisconnect {
reason: TextComponent,
more fields...
}
```
4. Also don't forgot to impl a new function for Clientbound Packets so we can actually send them by putting in the values.
Example:
```rust
impl CPlayDisconnect {
pub fn new(reason: TextComponent) -> Self {
Self { reason }
}
}
```
5. In the end, everything should come together.
```rust
#[derive(Serialize)]
#[client_packet("play:disconnect")]
pub struct CPlayDisconnect {
reason: TextComponent,
}
impl CPlayDisconnect {
pub fn new(reason: TextComponent) -> Self {
Self { reason }
}
}
```
6. You can also Serialize the Packet manually, which can be useful if the Packet is more complex.
```diff
-#[derive(Serialize)]
+ impl ClientPacket for CPlayDisconnect {
+ fn write(&self, bytebuf: &mut crate::bytebuf::ByteBuffer) {
+ bytebuf.put_slice(&self.reason.encode());
+ }
```
7. You can now send the Packet. See [Sending Packets](#sending-packets)
### Adding a Serverbound Packet
1. Adding a Packet is easy. First, you have to derive serde Deserialize for packets.
```rust
#[derive(Deserialize)]
```
2. Now you can create the Struct.
> [!IMPORTANT]
> Please start the Packet name with "S" for Serverbound.
> Also please add the State to the packet if its a Packet sent in multiple States.
Create fields within your packet structure to represent the data that will be sent to the client.
> [!IMPORTANT]
> Use descriptive field names and appropriate data types.
Example:
```rust
pub struct SPlayerPosition {
pub x: f64,
pub feet_y: f64,
pub z: f64,
pub ground: bool,
}
```
3. In the end, everything should come together.
```rust
#[derive(Deserialize)]
pub struct SPlayerPosition {
pub x: f64,
pub feet_y: f64,
pub z: f64,
pub ground: bool,
}
```
4. You can also Deserialize the Packet manually, which can be useful if the Packet is more complex
```diff
-#[derive(Deserialize)]
+ impl ServerPacket for SPlayerPosition {
+ fn read(bytebuf: &mut ByteBuffer) -> Result<Self, DeserializerError> {
+ Ok(Self {
+ x: bytebuf.get_f64()?,
+ feet_y: bytebuf.get_f64()?,
+ z: bytebuf.get_f64()?,
+ ground: bytebuf.get_bool()?,
+ })
+ }
```
5. You can listen for the Packet. See [Receive Packets](#receiving-packets)
### Client
Pumpkin has stores Client and Players separately. Everything that is not in the Play State is a Simple Client. Here are the Differences
**Client**
- Can only be in Status/Login/Transfer/Config State
- Is not a living entity
- Has small resource consumption
**Player**
- Can only be in Play State
- Is a living entity in a world
- Has more data, Consumes more resources
#### Sending Packets
Example:
```rust
// Works only in Status State
client.send_packet(&CStatusResponse::new("{ description: "A Description"}"));
```
#### Receiving Packets
For Clients:
`src/client/mod.rs`
```diff
// Put the Packet into the right State
fn handle_mystate_packet(
&self,
server: &Arc<Server>,
packet: &mut RawPacket,
) -> Result<(), DeserializerError> {
let bytebuf = &mut packet.bytebuf;
if let Some(packet) = ServerboundStatusPackets::from_i32(packet.id.0) {
match packet {
ServerboundStatusPackets::StatusRequest => {
self.handle_status_request(server, SStatusRequest::read(bytebuf)?)
.await;
}
ServerboundStatusPackets::MyPacket => {
+ self.handle_my_packet(MyPacket::read(bytebuf)?)
+ .await;
}
};
} else {
_ => {
log::error!(
"Failed to handle packet id {} while in ... state",
packet.id.0
);
Ok(())
}
}
}
```
For Players:
`src/entity/player.rs`
```diff
// Players only have Play State
fn handle_play_packet(
&self,
server: &Arc<Server>,
packet: &mut RawPacket,
) -> Result<(), DeserializerError> {
let bytebuf = &mut packet.bytebuf;
if let Some(packet) = ServerboundPlayPackets::from_i32(packet.id.0) {
ServerboundPlayPackets::ChatMessage => {
self.handle_chat_message(SChatMessage::read(bytebuf)?).await;
}
ServerboundPlayPackets::MyPacket => {
+ self.handle_mypacket(server, MyPacket::read(bytebuf)?).await;
}
_ => {
log::error!(
"Failed to handle packet id {} while in ... state",
packet.id.0
);
}
Ok(())
}
}
```
### Compression
Minecraft Packets **can** use the ZLib compression for decoding/encoding. There is usually a threshold set when compression is applied, this most often affects Chunk Packets.
### Porting
To port to a new minecraft version, you can compare difference in Protocol on [wiki.vg](https://wiki.vg/index.php?title=Protocol&action=history)
Also change the `CURRENT_MC_PROTOCOL` in `src/lib.rs`

View File

@ -1,64 +0,0 @@
### RCON
### What is RCON
RCON (Remote Console) is a protocol designed by Valve to allow administrators to control and manage game servers remotely. It provides a way to execute commands on a server from a different location, such as a phone or a separate computer.
### Why RCON
- **Convenience:** Manage your server from anywhere with an internet connection.
- **Flexibility:** Execute commands without needing to be physically present at the server's location.
- **Efficiency:** Automate tasks and streamline server management.
### SSH vs RCON
**SSH**
- Offers strong encryption to protect data transmitted between the client and server.
- Primarily designed for secure remote login and execution of commands on a remote machine.
- Commonly used for managing Linux/Unix systems, configuring networks, and running scripts.
- Provides a shell-like environment, allowing you to execute various commands and interact with the remote system.
**RCON**
- Specifically designed for remote administration of game servers, allowing you to control and manage the server's settings and operations.
- Typically less secure than SSH, as it often relies on plain text passwords.
- Primarily used by game server administrators to manage game servers.
- Has a limited set of game-specific commands.
### Packets
RCON is a very simple protocol with a few packets. Here's how an RCON packet looks:
| Field | Description |
| ----- | ----------------------------------------------- |
| ID | Used to indicate whether authentication failed or succeeded |
| Type | Identifies the packet type |
| Body | A message (String), e.g., a command or a password |
#### Server Bound Packets <sub><sub>(Client→Server)</sub></sub>
| Type | Packet |
| ---- | ----------- |
| 2 | Auth |
| 3 | ExecCommand |
#### Client Bound Packets <sub><sub>(Server→Client)</sub></sub>
| Type | Packet |
| ---- | ------------ |
| 2 | AuthResponse |
| 0 | Output |
### How RCON Works
1. **Authentication:**
- The RCON client sends an authentication packet with the desired password.
- The server verifies the password and responds with an authentication response packet.
- If successful, the response packet includes the same ID as the one sent by the client. If unsuccessful, the ID is -1.
2. **Command Execution:**
- The authenticated client can now send command execution packets, with each packet containing the command to be executed.
- The server processes the command and sends back an output packet containing the result or any error messages.

View File

@ -1,76 +0,0 @@
### World Formats
> [!IMPORTANT]
> Currently, Pumpkin only supports Anvil World Format, which is the format used by vanilla
> Minecraft. There is planned support for other world formats in the future though, as listed below.
#### Region File Format
Minecraft Beta 1.3 to Release 1.2 used a Minecraft format known as "Region file format".
The files stored in this format are .mcr files, each storing a group of 32x32 chunks called a region.
More details can be found on the [Minecraft Fandom](https://minecraft.fandom.com/wiki/Region_file_format).
#### Anvil File Format
Replacing the Region File Format after Minecraft Release 1.2, this is the file format used to store modern vanilla Java Minecraft worlds.
The files stored in this format are .mca files, while using the same region logic, there were a number of changes. The notable changes include an increase
to a 256 hight limit, then to 320, as well as a higher number of block ID's.
More details can be found on the [Minecraft Fandom](https://minecraft.fandom.com/wiki/Anvil_file_format).
#### Linear File Format
There is a more modern file format known as the Linear region file format. Saving on disk space and using the zstd library instead of zlib. This is beneficial as zlib is extremely old and
outdated.
The files stored in this format are .linear files, and it says about 50% of disk space in the Overworld and Nether, while saving 95% in the end.
More details can be found at the github page for [LinearRegionFileFormatTools](https://github.com/xymb-endcrystalme/LinearRegionFileFormatTools).
#### Slime File Format
Developed by Hypixel to fix many of the pitfalls of the Anvil file format, Slime also replaces zlib and saves space compared to Anvil, in addition to saving the entire world in a single save
file, and allowing that file to be loaded into multiple instances.
The files stored in this format are .slime files.
More details can be found on the github page for [Slime World Manager](https://github.com/cijaaimee/Slime-World-Manager#:~:text=Slime%20World%20Manager%20is%20a,worlds%20faster%20and%20save%20space.), as well as on [Dev Blog #5](https://hypixel.net/threads/dev-blog-5-storing-your-skyblock-island.2190753/) for Hypixel.
#### Schematic File Format
Unlike the other File Formats listed, the Schematic File Format is not for storing minecraft worlds, but instead for use within 3rd party programs such as MCEdit, WorldEdit, and Schematica.
The files stored in this format are .schematic files, and are stored in NBT format.
More details can be found on the [Minecraft Fandom](https://minecraft.fandom.com/wiki/Schematic_file_format)
### World Generation
When the server is starting up, it checks if there is a save present, also known as the "world"
Pumpkin then calls for World Generation:
#### Save Present
AnvilChunkReader is called to process the region files for the given save
- As stated above, region files store 32x32 chunks
> Each region file is named corrosponding to coordinates of where it is in the world
> r.{}.{}.mca
- The location table is read from the save file, representing the chunk coordinates
- The timestamp table is read from the save file, representing the last time the chunk was modified
#### No Save Present
The world seed is set to "0", in the future it will be set to the value in Basic Configuration
PlainsGenerator is called, as so far the plains is the only biome that has been implemented.
- PerlinTerrainGenerator is called to set chunk height
- Stone height is set 5 below chunk height
- Dirt height is set to 2 below chunk height
- Grass Blocks appear at the top of dirt
- Bedrock is set at y = -64
- Flowers and short grass are scattered about randomly
SuperflatGenerator is also avaliable, but is not currently callable.
- Bedrock is set at y = -64
- Dirt is set two blocks up
- Grass Block is set one more block up
Blocks are able to be placed and broken, but changes are not able to be saved in any world format. Anvil worlds are currently read only.

View File

@ -1,27 +0,0 @@
---
# https://vitepress.dev/reference/default-theme-home-page
layout: home
hero:
name: 'Pumpkin'
text: 'Minecraft Server'
tagline: Empowering everyone to host fast and efficient Minecraft servers
actions:
- theme: brand
text: Quick Start
link: /about/quick-start
- theme: alt
text: Configuration
link: /config/introduction
- theme: alt
text: For developers
link: /developer/introduction
features:
- title: Written in Rust
details: Pumpkin is written 100% in Rust, ensuring memory safety and unmatched performance.
- title: Feature complete
details: With all vanilla features supported, you will have no issues.
- title: Flexibility
details: Highly configurable, with the ability to disable unnecessary features.
---

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 836 KiB

View File

@ -1,17 +0,0 @@
### Common Issues
1. ### I can place blocks inside me
See [#49](https://github.com/Snowiiii/Pumpkin/issues/49)
**Issue:** Players are able to place blocks in them.
**Cause:** The server is currently not calculating hit boxes for blocks, we're working on that.
2. ### Failed to verify username
**Issue:** Some players reported having issues logging into the Server, including a "Failed to verify username" error.
**Cause:** This has to do with Authentication, Usually with the prevent proxy connections setting.
**Fix:** Disable `prevent_proxy_connections` in `features.toml`

2542
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,11 +0,0 @@
{
"scripts": {
"docs:dev": "vitepress dev docs",
"docs:build": "vitepress build docs",
"docs:preview": "vitepress preview docs"
},
"devDependencies": {
"vitepress": "^1.4.2",
"vue": "^3.5.12"
}
}