Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
89399c6
fix: match the protocol for debug, chat, and other packets (#3382)
kermandev Oct 3, 2026
0c4aed9
refactor: Drop NetworkBuffer.IOView (#3383)
kermandev Oct 3, 2026
981c713
fix: NetworkBuffer generic bounds (#3384)
kermandev Oct 3, 2026
6b83d18
fix: Measure maxLength values with the buffer registries (#3385)
kermandev Oct 3, 2026
5f790bd
docs: Add javadocs to NetworkBuffer (#3386)
kermandev Oct 3, 2026
64381b6
refactor: NetworkBuffer#resizableBuffer should take long (#3387)
kermandev Oct 3, 2026
e01a003
feat: add NbtComponentSerializer.nbt(Registries) (#3388)
kermandev Oct 4, 2026
985f1d0
fix: report invalid item components as syntax errors (#3389)
kermandev Oct 4, 2026
b39f6f6
fix: unwrap transcoder proxies in raw values (#3390)
kermandev Oct 4, 2026
79081a0
fix: look up enchantment table IDs in a given registry (#3391)
kermandev Oct 4, 2026
b581999
fix: keep the source registries in copied and shared instances (#3392)
kermandev Oct 4, 2026
4e9811c
refactor: remove API deprecated for removal (#3393)
kermandev Oct 4, 2026
5e7446d
fix: read player dimension type IDs from the current process (#3394)
kermandev Oct 4, 2026
f6486c0
refactor: use a damage type key and nullable source IDs in DamageEven…
kermandev Oct 4, 2026
29988a8
fix: set the registries of pooled packet buffers per write (#3396)
kermandev Oct 4, 2026
268866b
fix: encode hover item components with the buffer registries (#3400)
kermandev Oct 4, 2026
e26714d
chore: bump the non-breaking group with 3 updates (#3397)
dependabot[bot] Oct 4, 2026
814d4b0
refactor: create registry keys with of (#3401)
kermandev Oct 5, 2026
46410aa
feat: choose the registry context when creating instances (#3402)
kermandev Oct 5, 2026
fcd35c0
docs: describe migration notes for breaking changes (#3403)
kermandev Oct 5, 2026
97fc987
Merge commit from fork
kermandev Oct 7, 2026
5485bbd
feat: implement equals and hashCode methods for PlayerStatistic (#3406)
iceBear67 Oct 7, 2026
a33d32d
chore!: integrate upstream login hardening and registry context fixes
oglassdev Oct 8, 2026
2242600
feat: choose the registry context for instances and enchantment tables
oglassdev Oct 12, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,27 @@
#### **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.

#### **Does your change break existing code?**
* Breaking changes need a maintainer's approval. Once approved, a maintainer labels the pull-request as `breaking`, which lets it pass the binary compatibility check.

* Add a `## Migration` section to the PR description. Give each breaking change its own block: a one line description, the code before the change, a `:arrow_down:` line, then the code after it. These blocks are copied into the release notes.

* This also applies to changes that only break source compatibility, or that remove internal API people are known to use, even when the binary compatibility check passes.

* When something is removed without a replacement, say so in one line instead of a block.

````markdown
## Migration
Registry keys are created with `of`.
```java
RegistryKey<Biome> key = RegistryKey.unsafeOf("minecraft:plains");
```
:arrow_down:
```java
RegistryKey<Biome> key = RegistryKey.of("minecraft:plains");
```
````

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ private static void addRegistry(TypeSpec.Builder constants, ClassName registryKe
final ParameterizedTypeName registryType = ParameterizedTypeName.get(registryClass, valueClass);
constants.addField(FieldSpec.builder(ParameterizedTypeName.get(registryKeyClass, registryType), constantName)
.addModifiers(Modifier.PUBLIC, Modifier.STATIC, Modifier.FINAL)
.initializer("$T.unsafeOf($S)", registryKeyClass, key)
.initializer("$T.of($S)", registryKeyClass, key)
.addJavadoc("The registry key for {@link $T}.\n", valueClass)
.build());
}
Expand Down Expand Up @@ -49,7 +49,7 @@ void generate(List<Generators.StaticRegistrySpec> staticRegistries,
final String constantName = codegen.constantName(spec.constantName());
constants.addField(FieldSpec.builder(typedRegistryKey, constantName)
.addModifiers(Modifier.PUBLIC, Modifier.STATIC, Modifier.FINAL)
.initializer("$T.unsafeOf($S)", registryKeyClass, codegen.namespaceShort(spec.key()))
.initializer("$T.of($S)", registryKeyClass, codegen.namespaceShort(spec.key()))
.addJavadoc("The registry key for {@link $T}.\n", valueClass)
.build());
});
Expand All @@ -63,7 +63,7 @@ void generate(List<Generators.StaticRegistrySpec> staticRegistries,
final ParameterizedTypeName gameRuleRegistry = ParameterizedTypeName.get(registryClass, gameRuleType);
constants.addField(FieldSpec.builder(ParameterizedTypeName.get(registryKeyClass, gameRuleRegistry), "GAME_RULE")
.addModifiers(Modifier.PUBLIC, Modifier.STATIC, Modifier.FINAL)
.initializer("$T.unsafeOf($S)", registryKeyClass, "game_rule")
.initializer("$T.of($S)", registryKeyClass, "game_rule")
.addJavadoc("The registry key for {@link $T}.\n", gameRuleClass)
.build());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ void generate() {
.initializer("$T.get($T.$L)", GAME_RULE_IMPL_CN, GAME_RULE_KEYS_CN, fieldName).build());
gameRuleKeysInterface.addField(FieldSpec.builder(registryKeyType, fieldName)
.addModifiers(Modifier.PUBLIC, Modifier.STATIC, Modifier.FINAL)
.initializer("$T.unsafeOf($S)", registryKeyClass, namespacedName).build());
.initializer("$T.of($S)", registryKeyClass, namespacedName).build());
}

codegen.write(codegen.javaFile(PACKAGE, gameRulesInterface.build()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ void generate() {
particleKeysInterface.addField(FieldSpec.builder(
ParameterizedTypeName.get(registryKeyCN, fieldCN), codegen.constantName(key))
.addModifiers(Modifier.PUBLIC, Modifier.STATIC, Modifier.FINAL)
.initializer("$T.unsafeOf($S)", registryKeyCN, namespacedName)
.initializer("$T.of($S)", registryKeyCN, namespacedName)
.build());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ void generate(Generators.DynamicRegistrySpec spec) {
typeClass,
ClassName.get(spec.packageName(), spec.generatedName()),
ParameterizedTypeName.get(registryKeyClass, typeClass),
namespace -> CodeBlock.of("$T.unsafeOf($S)", registryKeyClass, codegen.namespaceShort(namespace)),
namespace -> CodeBlock.of("$T.of($S)", registryKeyClass, codegen.namespaceShort(namespace)),
FieldOrder.NATURAL
);
generateTags(spec.key(), typeClass);
Expand All @@ -53,7 +53,7 @@ void generateKeys(String key, ClassName typeClass, ClassName generatedClass, boo
final TypeSpec.Builder constants = constantsBuilder(typeClass, generatedClass, publicKeys);
addFields(codegen.objectResource(key), constants,
ParameterizedTypeName.get(registryKeyClass, typeClass),
namespace -> CodeBlock.of("$T.unsafeOf($S)", registryKeyClass, codegen.namespaceShort(namespace)),
namespace -> CodeBlock.of("$T.of($S)", registryKeyClass, codegen.namespaceShort(namespace)),
FieldOrder.NATURAL);
codegen.write(codegen.javaFile(generatedClass.packageName(), constants.build()));
}
Expand All @@ -67,7 +67,7 @@ void generateTags(String key, ClassName typeClass) {
final TypeSpec.Builder constants = constantsBuilder(typeClass, generatedClass, true);
final ParameterizedTypeName fieldType = ParameterizedTypeName.get(tagKeyClass, typeClass);
addFields(tags, constants, fieldType,
namespace -> CodeBlock.of("$T.unsafeOf($S)", tagKeyClass, codegen.namespaceShort(namespace)),
namespace -> CodeBlock.of("$T.of($S)", tagKeyClass, codegen.namespaceShort(namespace)),
FieldOrder.NATURAL);
codegen.write(codegen.javaFile(generatedClass.packageName(), constants.build()));
}
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ errorprone = "2.50.0"
javaPoet = "0.20.0"

# Log impl (for demo)
logback = "1.6.3"
logback = "1.6.5"

# Gradle plugins
blossom = "2.2.0"
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.7.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.8.0-bin.zip
networkTimeout=10000
retries=0
retryBackOffMs=500
Expand Down
52 changes: 41 additions & 11 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ public void setup() {
default -> throw new IllegalArgumentException("Unknown payload: " + payload);
};
final long size = NBT.sizeOf(tag);
writeBuffer = NetworkBuffer.resizableBuffer((int) size);
readBuffer = NetworkBuffer.resizableBuffer((int) size);
writeBuffer = NetworkBuffer.resizableBuffer(size);
readBuffer = NetworkBuffer.resizableBuffer(size);
readBuffer.write(NBT, tag);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ public void setup() {

@Benchmark
public void getId(Blackhole blackhole) {
blackhole.consume(registry.getId(RegistryKey.unsafeOf("pale_garden")));
blackhole.consume(registry.getId(RegistryKey.of("pale_garden")));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
@SuppressWarnings("unused")
@ApiStatus.NonExtendable
public interface FeatureFlagKeys {
RegistryKey<FeatureFlag> MINECART_IMPROVEMENTS = RegistryKey.unsafeOf("minecart_improvements");
RegistryKey<FeatureFlag> MINECART_IMPROVEMENTS = RegistryKey.of("minecart_improvements");

RegistryKey<FeatureFlag> REDSTONE_EXPERIMENTS = RegistryKey.unsafeOf("redstone_experiments");
RegistryKey<FeatureFlag> REDSTONE_EXPERIMENTS = RegistryKey.of("redstone_experiments");

RegistryKey<FeatureFlag> TRADE_REBALANCE = RegistryKey.unsafeOf("trade_rebalance");
RegistryKey<FeatureFlag> TRADE_REBALANCE = RegistryKey.of("trade_rebalance");

RegistryKey<FeatureFlag> VANILLA = RegistryKey.unsafeOf("vanilla");
RegistryKey<FeatureFlag> VANILLA = RegistryKey.of("vanilla");
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@SuppressWarnings("unused")
@ApiStatus.NonExtendable
public interface DialogTags {
TagKey<Dialog> PAUSE_SCREEN_ADDITIONS = TagKey.unsafeOf("pause_screen_additions");
TagKey<Dialog> PAUSE_SCREEN_ADDITIONS = TagKey.of("pause_screen_additions");

TagKey<Dialog> QUICK_ACTIONS = TagKey.unsafeOf("quick_actions");
TagKey<Dialog> QUICK_ACTIONS = TagKey.of("quick_actions");
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
*/
@SuppressWarnings("unused")
sealed interface Dialogs permits Dialog {
RegistryKey<Dialog> CUSTOM_OPTIONS = RegistryKey.unsafeOf("custom_options");
RegistryKey<Dialog> CUSTOM_OPTIONS = RegistryKey.of("custom_options");

RegistryKey<Dialog> QUICK_ACTIONS = RegistryKey.unsafeOf("quick_actions");
RegistryKey<Dialog> QUICK_ACTIONS = RegistryKey.of("quick_actions");

RegistryKey<Dialog> SERVER_LINKS = RegistryKey.unsafeOf("server_links");
RegistryKey<Dialog> SERVER_LINKS = RegistryKey.of("server_links");
}
Loading
Loading