Skip to content

1.5.2 #108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 93 commits into
base: master
Choose a base branch
from
Open

1.5.2 #108

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
af4eb0e
Apply microtus patches 1-20
TheMeinerLP May 22, 2024
4f7e47e
Bump version to 1.5.0
TheMeinerLP Aug 5, 2024
b88d792
Add missing import
TheMeinerLP Aug 5, 2024
4bc530c
Add support for older as 1.21 minecraft worlds
TheMeinerLP Aug 5, 2024
7f75882
Update BOM dependencies
TheMeinerLP Aug 5, 2024
18fdb78
Apply microtus patches 1-20
TheMeinerLP May 22, 2024
d5b7714
Fix compile mistake after apply patches
TheMeinerLP May 22, 2024
599c117
Fix compile mistake after apply patches
TheMeinerLP May 22, 2024
cae0c7a
Move miss landed classes after patching source
TheMeinerLP May 23, 2024
6588a81
[Docs] Fix docs generation
TheMeinerLP May 24, 2024
bb18905
[Chore] Change adventure javadocs link
TheMeinerLP May 24, 2024
3fb328e
[Chore] Update gradle to 8.7
TheMeinerLP May 24, 2024
5a0b0df
[Chore] Improve internal registry handling for implementation creation.
TheMeinerLP May 24, 2024
ae80f02
Remove not longer needed biome generator (#21)
TheMeinerLP May 24, 2024
337e356
[Chore] Rework attribute system to generice generator (#23)
TheMeinerLP May 24, 2024
d6c2699
[Chore] Replace static enum with generated villager types and profess…
TheMeinerLP May 24, 2024
1f6369a
[Chore] Replace enum with code generator for fluids (#27)
TheMeinerLP May 26, 2024
e7b85a0
Comment out gameevent tags and fix order of AtomicInteger for fluid r…
TheMeinerLP May 26, 2024
99238c2
[#34] Better Notification System (#35)
TheMeinerLP May 27, 2024
ad6ce86
[Chore] Update gradle to version 8.8 (#58)
theEvilReaper Jun 1, 2024
7d26fe4
Remove no longer needed classes
TheMeinerLP Aug 5, 2024
413ceb4
Fix forward compile issues
TheMeinerLP Aug 5, 2024
2d2d0c8
Update from Upstream (#68)
TheMeinerLP Aug 18, 2024
1a04805
Remove jitpack section
theEvilReaper Aug 19, 2024
246b8ac
Deprecated old testing and introduce into new method
TheMeinerLP Jun 16, 2024
d33d986
Update code to new testing framework
TheMeinerLP Jun 16, 2024
68e7ac7
Add jacoco
TheMeinerLP Jun 16, 2024
c0cd9b6
Use sonarqube plugin
TheMeinerLP Jun 16, 2024
f27c93c
Cleanup tests
theEvilReaper Jun 17, 2024
54a1f16
Remove some parentheses from an variable
theEvilReaper Jun 17, 2024
bd60518
Update env tests usage
TheMeinerLP Aug 19, 2024
dab7e3d
Cleanup generator package (#71)
theEvilReaper Aug 20, 2024
8cf490e
Enhance instance and player handling in the test module (#72)
theEvilReaper Sep 4, 2024
86e1424
Pull upstream (#73)
TheMeinerLP Sep 9, 2024
4bbc693
Cache the result of the values method
theEvilReaper Sep 13, 2024
4c75edd
Update BlockFace iteration
theEvilReaper Sep 13, 2024
6bd23ae
Add test for update feature packet
TheMeinerLP Sep 14, 2024
a671c4a
Remove old notification system (#76)
theEvilReaper Sep 19, 2024
dd16741
Improve pattern usage (#80)
theEvilReaper Oct 2, 2024
add0a29
Fix custom player provider usage for junit (#81)
TheMeinerLP Oct 15, 2024
4ab788f
Update renovate config
TheMeinerLP Oct 18, 2024
aa49872
Add flag to modify the maximum amount of usable ServerLinks (#85)
Joltras Oct 21, 2024
9e277aa
Fix potential protocol mismatch and exploit
TheMeinerLP Oct 28, 2024
c536e4a
Update readme product life cycle
TheMeinerLP Oct 30, 2024
4be5b51
send explosions only to nearby players
joelramilison Oct 16, 2024
1767601
Add integration test for Explosion.java
joelramilison Oct 20, 2024
83507bb
Completed ExplosionIntegrationTest.java
joelramilison Oct 20, 2024
3b2a0a4
formally improve ExplosionIntegrationTest.java
joelramilison Oct 22, 2024
103f0bf
Apply microtus patches 1-20
TheMeinerLP May 22, 2024
6cfff15
Remove old biome, banner, shield, particle, attribute system
TheMeinerLP Aug 5, 2024
31ea305
Fix forward data generator
TheMeinerLP Aug 5, 2024
d47ae72
Remove old network stack
TheMeinerLP Aug 5, 2024
3036238
Remove no longer exists api form player
TheMeinerLP Aug 5, 2024
f0da808
Move miss landed classes after patching source
TheMeinerLP May 23, 2024
f5a4516
[Chore] Update gradle to 8.7
TheMeinerLP May 24, 2024
c10aefd
[Chore] Update gradle to version 8.8 (#58)
theEvilReaper Jun 1, 2024
48d7a62
Apply microtus patches 1-20
TheMeinerLP May 22, 2024
93ae355
Fix compile mistake after apply patches
TheMeinerLP May 22, 2024
3cfbc4a
Fix compile mistake after apply patches
TheMeinerLP May 22, 2024
4ae2c6a
Move miss landed classes after patching source
TheMeinerLP May 23, 2024
1208b4f
[Docs] Fix docs generation
TheMeinerLP May 24, 2024
dfdaae9
[Chore] Change adventure javadocs link
TheMeinerLP May 24, 2024
f1ac21b
[Chore] Update gradle to 8.7
TheMeinerLP May 24, 2024
5cb92c4
[Chore] Improve internal registry handling for implementation creation.
TheMeinerLP May 24, 2024
bdac8a6
Remove not longer needed biome generator (#21)
TheMeinerLP May 24, 2024
a74ffd2
[Chore] Rework attribute system to generice generator (#23)
TheMeinerLP May 24, 2024
ed2211d
[Chore] Replace static enum with generated villager types and profess…
TheMeinerLP May 24, 2024
b4362b8
[Chore] Replace enum with code generator for fluids (#27)
TheMeinerLP May 26, 2024
8c3e751
[Chore] Replace enum with registry system for feature flags (#28)
TheMeinerLP May 26, 2024
9f6db5d
Comment out gameevent tags and fix order of AtomicInteger for fluid r…
TheMeinerLP May 26, 2024
66faf2e
Fix featureflag interface and extends FeatureFlags
TheMeinerLP May 28, 2024
1af8c47
Fix init order of atomic int
TheMeinerLP May 28, 2024
0203a46
[Chore] Update gradle to version 8.8 (#58)
theEvilReaper Jun 1, 2024
998cfdb
Remove no longer needed classes
TheMeinerLP Aug 5, 2024
c17b56b
Update from Upstream (#68)
TheMeinerLP Aug 18, 2024
26e4dae
Pull upstream (#73)
TheMeinerLP Sep 9, 2024
276f155
Fix update feature packet
TheMeinerLP Sep 14, 2024
95291b8
Fix potential protocol mismatch and exploit
TheMeinerLP Oct 28, 2024
2f6ec4c
Remove obsolete attribute manager file
TheMeinerLP Oct 31, 2024
f905d42
Re-add fluid generation
TheMeinerLP Oct 31, 2024
1eb9593
Remove old fluid registry
TheMeinerLP Oct 31, 2024
a68ca3e
Re-add villager profession and type generation and implementation
TheMeinerLP Oct 31, 2024
36c745a
Fix small compile issues and adding missing method
TheMeinerLP Oct 31, 2024
e00148d
Remove obsolete code generators
TheMeinerLP Oct 31, 2024
ed1d32f
Remove no longer needed tests
TheMeinerLP Oct 31, 2024
40645d5
Fix order of atomic int for fluid registry
TheMeinerLP Oct 31, 2024
019c111
Add missing import
TheMeinerLP Oct 31, 2024
9fe4052
Implement game tags and game events
TheMeinerLP Nov 3, 2024
f3e4b49
Add documentation for game events
TheMeinerLP Nov 3, 2024
d5e1720
Improve nullability for Minecraft Tags
TheMeinerLP Nov 11, 2024
d03076b
Add better mapping for meta tags for client
TheMeinerLP Jan 2, 2025
814d8dc
Cleanup unused imports
theEvilReaper Jan 2, 2025
c81bd29
Rename some variables to improve readability of the code
theEvilReaper Jan 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
520 changes: 258 additions & 262 deletions .editorconfig

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* @OneLiteFeatherNET/microtus-core
/.github/CODEOWNERS @OneLiteFeatherNET/microtus-core
39 changes: 19 additions & 20 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
## How to contribute to Minestom
#### **Did you find a bug?**
* Open a new GitHub issue if it's not already reported.
Contributing to Microtus
========================

* Explain it clearly, with steps (or code) to reproduce it.
We (the Microtus team) would be very glad if you want to contribute to the project.
The process to contribute requires some guidelines that you need to follow.
These help us to improve the project and maintain a consistent style for each contributor

#### **Did you write some code that fixes a bug?**
* Open a new GitHub pull-request with the commits if it hasn't already been proposed.
## Use a Personal Fork and not an Organization

* Ensure the PR description clearly describes the problem and solution. Include the relevant issue number if applicable.
If you want to contribute to Microtus, please fork the repository to your personal account and not to an organization.
This is because GitHub does not allow to push as maintainer of our fork into a repository from an organization to another organization.
If you fork the repository to an organization, you can open a pr, but we want to accept it.

#### **Do you intend to add a new feature or change an existing one?**
* Do not open a pull-request on GitHub until you have collected positive feedback about the change from a maintainer.
We much prefer to have PRs show as merged, so please do not use repositories
on organizations for PRs.

#### **Do you have questions about the source code?**
* Ask any question about how to use Minestom in the GitHub issues section or the community portals.
See <https://github.com/isaacs/github/issues/1681> for more information on the
issue.

#### **Do you want to contribute to the Minestom documentation?**
* Feel free to do so! Just make sure to conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification when editing the README.md.
## Requirements

## General Contribution Rules
* By contributing to the Minestom project your code/contribution will be licensed under the [Apache Version 2.0](../LICENSE) license.
To get started with the contributing of change, you will need some additional software.
Most of them can be obtained in (most) package managers on different platforms.

Minestom is a community project. We encourage you to contribute! :)

Thanks! :heart: :heart: :heart:

~Minestom Community
- `git` - Version control system
- A Java 21 or later JDK:
- [Adoptium](https://adoptium.net/) has builds for most operating systems
52 changes: 52 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Report a bug
description: You found a bug? Let us know!
title: "[Bug]: "
labels: [ "type: Bug" ]
body:
- type: markdown
attributes:
value: |
Thank you for reporting a bug to Microtus!
Please fill out the information below to help us understand the issue.
- type: markdown
attributes:
value: |
Before filling in the form fields, please consider the following:
- Ensure that you are using the latest version of Microtus.
- Search for existing issues in the [issue tracker](https://github.com/OneLiteFeatherNET/Microtus/issues)
- type: textarea
attributes:
label: Describe the bug
description: |
A clear and concise description of what the bug is.
If you have a screenshot of the bug, please attach it below.
validations:
required: true
- type: textarea
attributes:
label: Steps to reproduce the bug
description: Tell us exactly how to reproduce the bug you are experiencing
placeholder: |
1. ...
2. ...
3. ...
validations:
required: true
- type: textarea
attributes:
label: Code sample
description: |
Please create a reproducible sample to show us the bug in action and attach it below between the lines with the backticks.
This helps us to verify that the bug is valid and prevents us from having to ask you for a sample later.

Without this we will unlikely be able to progress on the issue, and because of that
we regretfully will have to close it.

**Note**: Please do not upload screenshots of text. Instead, use code blocks
or the above mentioned ways to upload your code sample.
value: |
```java
[Paste your code here]
```
validations:
required: true
6 changes: 6 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
blank_issues_enabled: false
contact_links:
- name: OneLiteFeather Discord
url: https://discord.onelitefeather.net/
about: Please join our Discord server if you have any questions or concerns.
icon: https://github.com/simple-icons/simple-icons/blob/develop/icons/discord.svg
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Feature Request
description: Suggest an idea for this project
title: "[Feature]: "
labels: [ "type: feature" ]
body:
- type: markdown
attributes:
value: |
Thank you for suggesting an idea to make Microtus better!
Please fill out the information below to help us understand your idea.
- type: textarea
attributes:
label: Is your feature request related to a problem?
description: Please give some context for this request. Why do you want it added?
validations:
required: true
- type: textarea
attributes:
label: Describe the solution you'd like
description: Give us a clear description of what you want
validations:
required: true
- type: textarea
attributes:
label: Describe alternatives you've considered
description: A clear and concise description of any alternative solutions or features you've considered.
validations:
required: false
- type: markdown
attributes:
value: |
Before submitting your feature request, please make sure you have done the following:
- [ ] Searched for existing feature requests
40 changes: 40 additions & 0 deletions .github/ISSUE_TEMPLATE/performance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Performance Problem
description: Report a performance problem which is related to Microtus
labels: [ "type: needs triage", "type: performance" ]
body:
- type: markdown
attributes:
value: |
Before creating an issue regarding to the performance, please reach out for support on our [Discord](https://discord.onelitefeather.net/)
or in the [Discussions](https://github.com/OneLiteFeatherNET/Microtus/discussions)!

**Please be aware: Performance issues can sometimes depend on your specific implementation and not on Microtus itself. If the situation is clear and it's not a problem with the project, we will close the issue without any comment.**
- type: input
attributes:
label: Used Microtus version
description: Which version of Microtus are you using?
placeholder: 1.0.0
validations:
required: true
- type: textarea
attributes:
label: Describe the performance problem
description: If applicable, please describe your issue.
validations:
required: false
- type: textarea
attributes:
label: Other
description: |
Please include other helpful links below.
The more information we receive, the quicker and more effective we can be at finding the solution to the issue.
validations:
required: false
- type: markdown
attributes:
value: |
Before submitting your issue, please make sure you have done the following:

1. You are running the latest version of Microtus from [Release page](https://github.com/OneLiteFeatherNET/Microtus/releases)
2. You searched for and ensured there isn't already an open issue regarding this
3. Your version of Minecraft is supported by Microtus
172 changes: 82 additions & 90 deletions .github/README.md
Original file line number Diff line number Diff line change
@@ -1,112 +1,104 @@
![banner](banner_dark.png#gh-dark-mode-only)
![banner](banner_light.png#gh-light-mode-only)
# Microtus

# Minestom
[![license](https://img.shields.io/github/license/OneLiteFeatherNET/Microtus?style=for-the-badge&color=b2204c)](../LICENSE)
[![wiki](https://img.shields.io/badge/documentation-wiki-74aad6?style=for-the-badge)](https://wiki.microtus.dev/)

[![license](https://img.shields.io/github/license/Minestom/Minestom?style=for-the-badge&color=b2204c)](../LICENSE)
[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=for-the-badge)](https://github.com/RichardLitt/standard-readme)
[![javadocs](https://img.shields.io/badge/documentation-javadocs-4d7a97?style=for-the-badge)](https://javadoc.minestom.net)
[![wiki](https://img.shields.io/badge/documentation-wiki-74aad6?style=for-the-badge)](https://wiki.minestom.net/)
[![discord-banner](https://img.shields.io/discord/706185253441634317?label=discord&style=for-the-badge&color=7289da)](https://discord.gg/pkFRvqB)
[Microtus](https://en.wikipedia.org/wiki/Microtus) is a fork of the original minestom.

Minestom is an open-source library that enables developers to create their own Minecraft server software, without any code from Mojang.
Our projects get names of animals but in latin.

The main difference between Mojang's vanilla server and a minestom-based server, is that ours does not contain any features by default!
However, we have a complete API which is designed to allow you to make anything possible, with ease.
Discord for discussion: [OneLiteFeather.net](https://discord.onelitefeather.net)

This is a developer API not meant to be used by end-users. Replacing Bukkit/Forge/Sponge with this **will not work** since we do not implement any of their APIs.
## Our goals
- Include patches from open pull requests on minestom repository
- Fixes issues from original minestom repository
- Make useful decisions
- Include new features
- Try to stay updated with original minecraft cycle
- Release cycle of we often we can (weekly, monthly, etc.) with a changelog, and it needed for the community

# Table of contents
- [Install](#install)
- [Usage](#usage)
- [Why Minestom?](#why-minestom)
- [Advantages & Disadvantages](#advantages-and-disadvantages)
- [API](#api)
- [Credits](#credits)
- [Contributing](#contributing)
- [License](#license)
## Project contribution:

# Install
Minestom is not installed like Bukkit/Forge/Sponge.
As Minestom is a Java library, it must be loaded the same way any other Java library may be loaded.
This means you need to add Minestom as a dependency, add your code and compile by yourself.
For details how you can contribute to the project please read our [Contributing](CONTRIBUTING.md).

Minestom is available on [Maven Central](https://mvnrepository.com/artifact/net.minestom/minestom-snapshots),
and can be installed like the following (Gradle/Groovy):
## Usage of microtus
Since 23.07.2023 we are now official on the maven central for releases and snapshots.
To use Microtus in your projects you need:
<details>
<summary>Snapshot</summary>

```groovy
Please replace the `<version>` with the right one. You can find the versions here: [Central](https://central.sonatype.com/search?q=microtus)
For example: `1.1.0-SNAPSHOT+9284d26`

### Repositories Section
```kt
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
mavenCentral()
maven("https://oss.sonatype.org/content/repositories/snapshots")
}
```

### Dependency Section
```kt
dependencies {
implementation 'net.minestom:minestom-snapshots:<???>'
implementation("net.onelitefeather.microtus:Minestom:1.3.2-SNAPSHOT")
testImplementation("net.onelitefeather.microtus.testing:testing:1.3.2-SNAPSHOT")
}
```
</details>

# Usage
An example of how to use the Minestom library is available [here](/demo).
Alternatively you can check the official [wiki](https://wiki.minestom.net/) or the [javadocs](https://minestom.github.io/Minestom/).

# Why Minestom?
Minecraft has evolved a lot since its release, most of the servers today do not take advantage of vanilla features and even have to struggle because of them.
Our target audience is those who want to make a server that benefits little from vanilla features. e.g. creative, kitpvp.
The goal is to offer more performance for those who need it.
In other words, it makes sense to use Minestom when it takes less time to implement every missing vanilla feature you want than removing every vanilla feature that will slow you down.

# Advantages and Disadvantages
Minestom isn't perfect, our choices make it much better for some cases, worse for some others.

## Advantages
* Remove the overhead of vanilla features
* Multi-threaded
* Instance system (Collections of blocks and entities) which is much more scalable than worlds
* Open-source
* Modern API
* No more legacy NMS

## Disadvantages
* Does not work with Bukkit/Forge/Sponge plugins or mods
* Does not work with older clients (using a proxy with ViaBackwards is possible)
* Bad for those who want a vanilla experience
* Longer to develop something playable
* Multi-threaded environments need extra consideration

# API
Even if we do not include anything by default in the game, we simplify the way you add them, here is a preview.

## Instances
It is our major concept, worlds are great for survival with friends, but when it scales up it can become unmanageable. The best examples can be found in Skyblock or minigames, not being able to separate each part properly and being forced to save everything in files, not to say the overhead caused by unnecessary data contained in them. Instances are a lightweight solution to it, being able to have every chunk in memory only, copying and sending it to another player in no time, with custom serialization and much more...

Being able to create instances directly on the go is a must-have, we believe it can push many more projects forward.

Instances also come with performance benefits, unlike some others which will be fully single-threaded or maybe using one thread per world we are using a set number of threads (pool) to manage all chunks independently from instances, meaning using more CPU power.

## Blocks
Minestom by default does not know what is a chest, you will have to tell him that it opens an inventory.
Every "special blocks" (which aren't only visual) need a specialized handler. After applying this handler, you have a block that can be placed anywhere simply.
However, all blocks are visually there, they just won't have interaction by default.
<details>
<summary>Release</summary>

## Entities
The terms "passive" or "aggressive" monsters do not exist, nobody stops you from making a flying chicken rushing into any players coming too close, doing so with NMS is a real mess because of obfuscation and the large inheritance.
Please replace the `<version>` with the right one. You can find the versions here: [Central](https://central.sonatype.com/search?q=microtus)
For example: `1.1.0`
### Dependency Section
```kt
dependencies {
implementation("net.onelitefeather.microtus:Microtus:1.4.1")
testImplementation("net.onelitefeather.microtus.testing:testing:1.4.1")
}
```
</details>

## Extension usage
### settings.gradle.kts
Read more about here: https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry
```kt
pluginManagement {
repositories {
gradlePluginPortal()
maven("https://maven.pkg.github.com/OneLiteFeatherNET/Microtus") {
credentials {
username = "Your username"
password = "your github token"
}
}
}
}
```

## Inventories
It is a field where Minecraft evolved a lot, inventories are now used a lot as client<->server interface with clickable items and callback, we support these interactions natively without the need of programming your solution.
### build.gradle.kts
```kt
plugins {
id("net.onelitefeather.microtus.extension") version "0.0.1"
}

## Commands
Commands are the simplest way of communication between clients and server. Since 1.13 Minecraft has incorporated a new library denominated "Brigadier", we then integrated an API designed to use the full potential of args types.
dependencies {
extensionLibrary("com.fasterxml.jackson.module:jackson-module-kotlin:2.15.2") // Use the external dependencies function from minestom
}
extension {
authors = listOf("TheMeinerLP")
entrypoint = "net.onelitefeather.microtus.extension.ProjectEntry"
// dependencies = listOf("LuckPerms") // To generate dependencies
// version = "1.0.0" // Normally its use the project version
// name = "Example" // Normally its use the project name
// External dependencies are handled via `extensionLibrary("String")` from gradle
}
```

# Credits
* The [contributors](https://github.com/Minestom/Minestom/graphs/contributors) of the project
* [The Minecraft Coalition](https://wiki.vg/) and [`#mcdevs`](https://github.com/mcdevs) -
protocol and file formats research.
* [The Minecraft Wiki](https://minecraft.wiki) for all their useful info
* [JProfiler](https://www.ej-technologies.com/products/jprofiler/overview.html) for their amazing Java profiler
---

# Contributing
See [the contributing file](CONTRIBUTING.md)!
All WIP features are previewed as Draft PRs
[![YourKit-Logo](https://www.yourkit.com/images/yklogo.png)](https://www.yourkit.com/)

# License
This project is licensed under the [Apache License Version 2.0](../LICENSE).
[YourKit](https://www.yourkit.com/), makers of the outstanding java profiler, support open source projects of all kinds with their full featured [Java](https://www.yourkit.com/java/profiler) and [.NET](https://www.yourkit.com/.net/profiler) application profilers. We thank them for granting Microtus an OSS license so that we can make our software the best it can be.
Loading
Loading