Skip to content
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

Update minestom to 1.21 #67

Closed
wants to merge 190 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
190 commits
Select commit Hold shift + click to select a range
43ed60d
Offer more control over LightingChunk invalidations (#2156)
Minikloon May 30, 2024
5035c2b
fix light invalidation issue
iam4722202468 May 30, 2024
5ac26b1
Fix Entity::getEffectLevel having two meanings when returning 0 (#2163)
Minikloon May 30, 2024
406c686
add more command conditions
mudkipdev May 29, 2024
d46c626
Add signum operator to Vec
Minikloon May 29, 2024
1c7fc6c
Refactor lighting code, fix loaded chunks (#2164)
iam4722202468 May 30, 2024
4a07089
Switch to the new adventure domain (#2165)
ItsFelix5 May 30, 2024
9822331
fix: do not test block collision on entities without collision
mworzala May 31, 2024
19bb74e
Make PlayerProjectile extend Entity instead of LivingEntity
FluxCapacitor2 Jun 2, 2024
e61dc81
feat: initial conversion to adventure nbt. no tests, no anvil
mworzala Mar 17, 2024
18b6354
chore: basic nbt reader/writer for protocol while waiting for adventure
mworzala Apr 10, 2024
d2be7e1
feat: joinable server
mworzala Apr 10, 2024
0a6c821
fix: oops, health is before potion still
mworzala Apr 10, 2024
e857a29
chore: rebase on adventure-nbt
mworzala Apr 10, 2024
6300d76
feat: first version of a bunch of components
mworzala Apr 11, 2024
65e04d0
chore: delete all old metadata classes for now, may return compatibil…
mworzala Apr 11, 2024
af85459
chore: more components
mworzala Apr 12, 2024
4f12d65
chore: more components
mworzala Apr 12, 2024
b8a600b
chore: trying to fix nightmare loop
mworzala Apr 13, 2024
7ba6a6d
feat: functional components, but at what cost
mworzala Apr 13, 2024
444e74e
chore: cleanup itemcomponenttype, update to datagen changes
mworzala Apr 17, 2024
eccfaac
feat: more components
mworzala Apr 18, 2024
35f122b
feat: even more components (only 2 missing ones)
mworzala Apr 18, 2024
100661b
feat: first draft of cookies
mworzala Apr 18, 2024
5096c7a
feat: simplify sound events, fix update explosion packet
mworzala Apr 19, 2024
c4af024
feat: generate RecipeType (for ids)
mworzala Apr 19, 2024
2920cee
fix: do not send close inventory packet when opening a new inventory …
mworzala Apr 21, 2024
101211c
feat: anvil reading, other minor fixes
mworzala Apr 23, 2024
bf92944
feat: partial anvil writing, update tests (still many broken)
mworzala Apr 23, 2024
df3a540
chore: 1.20.5, disable some failing tests to get a functional build
mworzala Apr 23, 2024
1a2e817
chore: cicd trigger
mworzala Apr 23, 2024
88ab249
chore: update datagenerator
mworzala Apr 23, 2024
60d6324
fix: anvil not loading locations properly
mworzala Apr 23, 2024
92ce3e6
fix: particle packet reorder
mworzala Apr 23, 2024
1a4fbef
fix: do not allow writing air in declare recipes packet (added ItemSt…
mworzala Apr 23, 2024
bccd944
feat: initial ArgumentItemStack reader, other minor fixes
mworzala Apr 24, 2024
ea59ddb
fix: light test and update eye height in view direction test
mworzala Apr 24, 2024
0ed5a2a
chore: cleanup anvil test
mworzala Apr 24, 2024
67fe007
fix: dont oom reading item component, stub banner pattern component
mworzala Apr 25, 2024
f14ac37
fix: circular init :|
mworzala Apr 25, 2024
580438c
fix: correctly handle eating potions, time eating using ticks, defaul…
mworzala Apr 27, 2024
0650caa
fix: do not convert optchat metadata to chat
mworzala Apr 28, 2024
97618d7
chore: rebase, add stack size 99 test case
mworzala Apr 29, 2024
9043b6d
chore: another stack size test
mworzala Apr 29, 2024
cdc036c
feat: block predicate impl & some more tests
mworzala Apr 29, 2024
31fb33e
feat: initial anvilloader writer implementation
mworzala Apr 29, 2024
6f33d66
fix: correctly read declared recipes
mworzala Apr 29, 2024
bcffaef
chore: generalize ItemComponent to DataComponent (item component defs…
mworzala Apr 29, 2024
e1a4ea1
fix: update from lighting fix 35 rebase
mworzala Apr 30, 2024
3073a6d
chore: add PlayerAnvilInputEvent, other minor tweaks from self review
mworzala May 4, 2024
57ba1a5
fix: sync position after sending first chunk
mworzala May 4, 2024
3d84d94
chore: start testing components, fix valueless components
mworzala May 4, 2024
5fb5c82
chore: allow chunk subclasses to override heightmap generation
mworzala May 4, 2024
aa697a4
feat: first pass of standardizing dynamic registries
mworzala May 18, 2024
7f88699
feat: add DynamicRegistry.Key and reference it instead of the underly…
mworzala May 18, 2024
a6ab761
chore: cleanup & some component impl utility methods
mworzala May 18, 2024
4674a42
chore: depend on published version of data, not local
mworzala May 20, 2024
f2665be
chore: minor tweaks
mworzala May 23, 2024
abf80e5
chore: cleanup networkbuffer additions
mworzala May 23, 2024
c7fd6e2
chore: missing entity metas & extract shooter to abstractwindchargemeta
mworzala May 23, 2024
d4f1580
fix: correct handling of known packs exchange
mworzala May 23, 2024
aa7c03a
chore: merge datacomponentmap and datacomponentpatch to simplify api.…
mworzala May 27, 2024
0fd91b8
chore: more tests for components
mworzala May 27, 2024
fd19f12
chore: one more
mworzala May 27, 2024
1ce1766
fix: setTimeUpdate transition from duration to ticks, renamed to avoi…
DeidaraMC May 27, 2024
da09503
feat: LivingEntity fire overhaul (#2122)
DeidaraMC May 27, 2024
20e91c8
feat: world border overhaul, turned into a record and handled by the …
DeidaraMC May 27, 2024
c185337
Pathfinding 1.20.5 (#2153)
iam4722202468 May 28, 2024
5182f19
feat: cya later jitpack
mworzala May 28, 2024
e3c1c06
chore: remove some weird internal/experimental annotations
mworzala May 29, 2024
1d3feee
Item usage duration (#2128)
TogAr2 May 4, 2024
72ead66
fix: fixes from merging #2128
mworzala May 30, 2024
8b82651
feat: improve particle api
DeidaraMC Apr 25, 2024
7fef892
feat: generate particle data names automatically
mworzala May 30, 2024
943e763
chore: make all impls records + inner classes of Particle
mworzala May 30, 2024
5c2a41b
chore: minor cleanup, block display meta to use Block directly
mworzala May 30, 2024
533f033
fix: default zero use item time
mworzala Jun 2, 2024
37f466c
Move static Entity lookup maps to EntityTracker (#2167)
Minikloon Jun 3, 2024
b9616e6
chore: delete `Entity#setUuid` and `AsyncPlayerPreLoginEvent#setUuid`
mworzala Jun 3, 2024
b784cfc
chore: delete a deprecated Audience#sendMessage variant
mworzala Jun 3, 2024
75babcb
chore: javadocs and remove experimental pose update flag
mworzala Jun 3, 2024
83783e4
fix: fixes from rug pull
mworzala Jun 7, 2024
05546d8
fix: tag escape
mworzala Jun 7, 2024
ae7a80c
fix: inventory rebase fixes
mworzala Jun 8, 2024
d5a6392
Fix Attribute Read/Write due to initialization shenanagins (#2174)
GreatWyrm Jun 8, 2024
4a6641e
Only consider online players for unregisterInstance (#2171)
Minikloon Jun 8, 2024
d1624c2
Add new navigator generator & follower
iam4722202468 Jun 8, 2024
99f7667
Include ourself as a viewer when sending SWING_MAIN_ARM animation (#2…
kubbidev Jun 8, 2024
4d61d5b
fix: re-add deprecated Audience#sendMessage variant which was actuall…
mworzala Jun 8, 2024
e176899
Fix ITEM_NAME component translation in SetSlotPacket (#2176)
FluxCapacitor2 Jun 8, 2024
b3aa996
Fix the NBT representation of Unit (#2177)
Minikloon Jun 9, 2024
2fd79d0
Call UuidProvider in async (#2181)
MelonHell Jun 9, 2024
1c528d8
[RE] Update PlayerChangeHeldSlotEvent.java (#2179)
unjoinable Jun 9, 2024
aca4c3d
fix: correctly account for global biome palette
mworzala Jun 11, 2024
176d4bb
fix: incorrect region metatable offset when writing
mworzala Jun 12, 2024
914ddd8
Add Instance::getPlayerByUuid because for convenience (#2190)
Minikloon Jun 13, 2024
e4bec39
feat: hello, 1.21
mworzala May 30, 2024
141a251
feat: new packets, new registries except stubbed out enchantments, ot…
mworzala May 31, 2024
df14b50
chore: 1.21-pre2
mworzala Jun 2, 2024
af1f1c0
chore: start on enchantments
mworzala Jun 3, 2024
fc2ce0b
chore: start on enchant effect components
mworzala Jun 12, 2024
6345042
chore: protocol set
mworzala Jun 12, 2024
fadf30a
chore: start on effect types
mworzala Jun 12, 2024
f089708
feat: mostly functional enchants, needs cleanup
mworzala Jun 13, 2024
0e14214
feat: add some ItemStack convenience methods
mworzala Jun 13, 2024
2f5bb97
feat: minor improvements, 1.21 release
mworzala Jun 13, 2024
a909985
fix inventory packet for global translator
bea4dev Jun 11, 2024
0f81bc3
fix full light data is not sent (#2191)
bea4dev Jun 14, 2024
6766e3c
Add feature flags to AsyncPlayerConfigurationEvent
Flopgop Jun 14, 2024
461d0aa
fix player health update animation (#2183)
bea4dev Jun 15, 2024
8736fc4
fix projectile remove
bea4dev Jun 10, 2024
80377e3
Update Player.java (#2195)
unjoinable Jun 16, 2024
c864773
fix: deserialize `extra` correctly in component serializer
mworzala Jun 16, 2024
898032c
Fix add transaction
iam4722202468 Jun 16, 2024
f1d5940
Fix events not triggering for bows, crossbows, etc. (#2199)
iam4722202468 Jun 17, 2024
277dcea
fix: inverted vanilla exclusion
mworzala Jun 20, 2024
cea1bd8
Apply microtus patches 1-20
TheMeinerLP May 22, 2024
0f032b5
Fix compile mistake after apply patches
TheMeinerLP May 22, 2024
6d470e1
Fix compile mistake after apply patches
TheMeinerLP May 22, 2024
7c58794
Update files like in microtus main
TheMeinerLP May 22, 2024
7853d0b
Apply better workflow
TheMeinerLP May 22, 2024
90a925a
Move miss landed classes after patching source
TheMeinerLP May 23, 2024
773acbd
Bump data version to rv9
TheMeinerLP May 23, 2024
fba2641
Fix workflows for java 21
TheMeinerLP May 23, 2024
a2383a8
Fix workflows for java 21
TheMeinerLP May 23, 2024
f7d8fc9
[Docs] Fix docs generation
TheMeinerLP May 24, 2024
ea2d41d
[Chore] Change adventure javadocs link
TheMeinerLP May 24, 2024
f23474e
[Chore] Update gradle to 8.7
TheMeinerLP May 24, 2024
587e95b
[Chore] Remove preview feature
TheMeinerLP May 24, 2024
d0e0d57
[Bugfix] Improve version string for bstats
TheMeinerLP May 24, 2024
902f25b
Update README.md
TheMeinerLP May 24, 2024
4c7721a
[Chore] Improve internal registry handling for implementation creation.
TheMeinerLP May 24, 2024
216d678
Remove not longer needed biome generator (#21)
TheMeinerLP May 24, 2024
4be4c6a
Update snapshot and release version
May 24, 2024
f7d3a9c
[Chore] Rework attribute system to generice generator (#23)
TheMeinerLP May 24, 2024
ccf055f
[Chore] Replace static enum with generated villager types and profess…
TheMeinerLP May 24, 2024
bff283d
Create CNAME
TheMeinerLP May 25, 2024
5590891
Bump snapshot version (#31)
TheMeinerLP May 25, 2024
fc24561
Update build.gradle.kts
TheMeinerLP May 26, 2024
13f66af
[Chore] Replace enum with code generator for fluids (#27)
TheMeinerLP May 26, 2024
ec23569
[Chore] Replace enum with registry system for feature flags (#28)
TheMeinerLP May 26, 2024
fefdb2d
[Chore] Replace e.printstacktrace with exception manager call or logger
TheMeinerLP May 25, 2024
602e435
Improve license usage
TheMeinerLP May 26, 2024
1d32f3e
Improve license usage
TheMeinerLP May 26, 2024
63dc181
[#30] Release 1.4.0
TheMeinerLP May 26, 2024
0f2457c
[#30] Re-Release 1.4.1
TheMeinerLP May 26, 2024
96c815c
Go back to snapshot
TheMeinerLP May 26, 2024
1ef142f
Ignore bstats file
TheMeinerLP May 26, 2024
cdf2cbc
Comment out gameevent tags and fix order of AtomicInteger for fluid r…
TheMeinerLP May 26, 2024
1ddcc1a
[#34] Better Notification System (#35)
TheMeinerLP May 27, 2024
5ee57cc
Add bom
TheMeinerLP May 28, 2024
ed894d1
Improve bom
TheMeinerLP May 28, 2024
d8ddd1b
Remove java version from bom
TheMeinerLP May 28, 2024
cdaf3ab
Change bom deployment
TheMeinerLP May 28, 2024
3b58573
Change bom deployment
TheMeinerLP May 28, 2024
0fdd9a6
Add missing dependencies
TheMeinerLP May 28, 2024
da437de
[Feature] Improved Testing Lib (#42)
TheMeinerLP May 28, 2024
03af621
Add missing dependencies
TheMeinerLP May 28, 2024
ddd4d14
Fix featureflag interface and extends FeatureFlags
TheMeinerLP May 28, 2024
b13b46a
Add vanilla feature flag as default
TheMeinerLP May 28, 2024
5a0d7ce
Fix init order of atomic int
TheMeinerLP May 28, 2024
c871395
Improve release workflow
TheMeinerLP May 28, 2024
395d201
Improve release workflow
TheMeinerLP May 28, 2024
052d627
Bump version
TheMeinerLP May 28, 2024
5d5ef97
Remove dependency getter
TheMeinerLP May 28, 2024
fefe6eb
Update kotlin monorepo to v2
renovate[bot] May 28, 2024
b762fe4
Update gradle/wrapper-validation-action action to v3
renovate[bot] May 28, 2024
599cef3
Update actions/cache action to v4
renovate[bot] May 28, 2024
5eedb52
Update dependency org.mockito:mockito-core to v5.12.0
renovate[bot] May 28, 2024
c480271
Update dependency com.google.code.gson:gson to v2.11.0
renovate[bot] May 28, 2024
24e23e4
[Chore] Update gradle to version 8.8 (#58)
theEvilReaper Jun 1, 2024
788c5bd
Update CODEOWNERS
TheMeinerLP Jun 11, 2024
b799638
Update CODEOWNERS
TheMeinerLP Jun 11, 2024
9fd0ab8
Update README.md
TheMeinerLP Jun 16, 2024
b2f15c9
Bump adventure version and add nbt lib
theEvilReaper Jun 25, 2024
2ab072e
Remove import
theEvilReaper Jun 25, 2024
f4fb6c7
Fix wrong notification import
theEvilReaper Jun 25, 2024
5f3d2a1
Use namespace method instead of the name method
theEvilReaper Jun 25, 2024
9c688c2
Add missing feature flag record entry
theEvilReaper Jun 25, 2024
e8e9b7f
Add some missing registry entries
theEvilReaper Jun 25, 2024
615932c
Remove deprecated notification functionality
theEvilReaper Jun 25, 2024
dcc2ad2
Cleanup imports
theEvilReaper Jun 25, 2024
3149a03
Improve fromIdentifier method
theEvilReaper Jun 25, 2024
6f24d92
Remove outer attribute package
theEvilReaper Jun 25, 2024
35ee39b
Remove 1.21 feature flag
theEvilReaper Jun 25, 2024
88df3f5
Fix generator package
theEvilReaper Jun 25, 2024
04a09f2
Replace FeatureFlag usage with the usage of NamespaceID
theEvilReaper Jun 25, 2024
e0a7d8e
Improve lambda
theEvilReaper Jun 25, 2024
d3a647d
Update feature flag access
theEvilReaper Jun 25, 2024
861de53
Disable unused code
theEvilReaper Jun 25, 2024
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
Validating CODEOWNERS rules …
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
180 changes: 91 additions & 89 deletions .github/README.md
Original file line number Diff line number Diff line change
@@ -1,112 +1,114 @@
![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 2 weeks

# 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 Jitpack:

```groovy
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
Some of the project's dependencies are only available in the Jitpack repository.
To ensure a seamless experience, kindly include this repository in your project configuration to prevent any potential issues.

dependencies {
implementation 'net.minestom:minestom-snapshots:<???>'
}
```kt
maven("https://jitpack.io")
```

# 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
## 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>

## 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
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`

# 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.
### Repositories Section
```kt
repositories {
mavenCentral()
maven("https://oss.sonatype.org/content/repositories/snapshots")
}
```

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.
### Dependency Section
```kt
dependencies {
implementation("net.onelitefeather.microtus:Minestom:1.3.2-SNAPSHOT")
testImplementation("net.onelitefeather.microtus.testing:testing:1.3.2-SNAPSHOT")
}
```
</details>

## 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