Skip to content

Commit 3f843b2

Browse files
committed
Updated to Minecraft 1.21.11
1 parent b1e3aa9 commit 3f843b2

18 files changed

Lines changed: 49 additions & 112 deletions

File tree

build.gradle

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ repositories {
1818
}
1919
}
2020

21-
sourceCompatibility = JavaVersion.VERSION_21
22-
targetCompatibility = JavaVersion.VERSION_21
23-
24-
archivesBaseName = project.archives_base_name
2521
version = project.minecraft_version+'-'+project.mod_version
2622
group = project.maven_group
2723

24+
base {
25+
archivesName = project.archives_base_name
26+
}
27+
2828
loom {
2929
runs {
3030
testServer {
@@ -47,8 +47,6 @@ dependencies {
4747
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
4848
modImplementation "carpet:fabric-carpet:${project.carpet_minecraft_version}-${project.carpet_core_version}"
4949

50-
implementation 'com.google.code.findbugs:jsr305:3.0.2'
51-
5250
def includeImplementation = { String dependencyNotation ->
5351
implementation(dependencyNotation) {
5452
transitive = false
@@ -62,7 +60,11 @@ dependencies {
6260
includeImplementation "com.squareup.okio:okio:1.17.2"
6361
includeImplementation "net.sf.trove4j:core:3.1.0"
6462
includeImplementation "org.apache.commons:commons-collections4:4.4"
65-
63+
includeImplementation "com.fasterxml.jackson.core:jackson-core:2.20.0"
64+
includeImplementation "com.fasterxml.jackson.core:jackson-databind:2.20.0"
65+
includeImplementation "com.fasterxml.jackson.core:jackson-annotations:2.20"
66+
includeImplementation "com.fasterxml.jackson:jackson-bom:2.20.0"
67+
6668

6769
// soft dependencies
6870

@@ -85,11 +87,16 @@ tasks.withType(JavaCompile).configureEach {
8587

8688
java {
8789
withSourcesJar()
90+
91+
sourceCompatibility = JavaVersion.VERSION_21
92+
targetCompatibility = JavaVersion.VERSION_21
8893
}
8994

9095
jar {
96+
inputs.property "archivesName", project.base.archivesName
97+
9198
from("LICENSE") {
92-
rename { "${it}_${project.archivesBaseName}"}
99+
rename { "${it}_${inputs.properties.archivesBaseName}"}
93100
}
94101
}
95102

changelog.md

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1 @@
1-
## Changes
2-
3-
* Updated to JDA 6.1.1. With that comes some breaking changes. See "Migrating" section below for necessary migrations
4-
5-
### Components
6-
7-
* Added new Label component type
8-
* This replaces the use of Action rows in modals and the `label` property in text inputs
9-
* Action rows are now its own component type
10-
* Instead of the `components` in the message content schema being a list of lists of components,
11-
action rows can be declared explicitly with a component of type `action_row`.
12-
The old syntax of defining an action row from an array is still supported for backward compatibility and convenience.
13-
* The `label` field of text inputs has been removed. Use a label component instead.
14-
* Added support for components V2 via `use_components_v2` in message content
15-
* Added new components from components V2 (See docs for details)
16-
* Separator
17-
* Container
18-
* Text display
19-
* Section
20-
* Thumbnail
21-
* Media gallery
22-
* File display
23-
* File upload
24-
25-
### Documentation
26-
27-
* Message components example was split into seperate buttons and select menus example
28-
* Added misc components example for component V2 components
29-
* Added links to relevant examples to docs for functions and schemas
30-
* Updated modal example with file upload and select menu
31-
32-
## Migrating
33-
34-
To migrate your scripts, the following is necessary:
35-
36-
* Converting action rows in modals to labels
37-
* Check the updated modal example in the documentation
1+
* Updated to Minecraft 1.21.11

gradle.properties

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ org.gradle.jvmargs=-Xmx1G
33

44
# Fabric Properties
55
# check these on https://fabricmc.net/develop/
6-
minecraft_version=1.21.10
7-
loader_version=0.17.3
8-
loom_version=1.11-SNAPSHOT
6+
minecraft_version=1.21.11
7+
loader_version=0.18.1
8+
loom_version=1.14-SNAPSHOT
99

1010
# check available versions on maven for the given minecraft version you are using
1111
# https://masa.dy.fi/maven/carpet/fabric-carpet/
12-
carpet_minecraft_version=1.21.10
13-
carpet_core_version=1.4.186+v251009
12+
carpet_minecraft_version=1.21.11
13+
carpet_core_version=1.4.193+v251211
1414

1515
# Mod Properties
1616
mod_version=1.7.0

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

src/main/java/net/replaceitem/discarpet/commands/DiscarpetCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public class DiscarpetCommand {
2828

2929
public static void register(CommandDispatcher<CommandSourceStack> dispatcher)
3030
{
31-
dispatcher.register(literal("discarpet").requires(serverCommandSource -> serverCommandSource.hasPermission(2)).executes(commandContext->{
31+
dispatcher.register(literal("discarpet").requires(Commands.hasPermission(Commands.LEVEL_GAMEMASTERS)).executes(commandContext->{
3232
commandContext.getSource().sendSuccess(() -> {
3333
String version = FabricLoader.getInstance().getModContainer("discarpet").orElseThrow().getMetadata().getVersion().getFriendlyString();
3434
MutableComponent text = Component.literal("Discarpet version " + version).withStyle(ChatFormatting.BLUE);

src/main/java/net/replaceitem/discarpet/mixins/FileArgumentMixin.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
import carpet.script.exception.Throwables;
88
import net.replaceitem.discarpet.script.util.FileArgumentExtension;
99
import net.replaceitem.discarpet.util.StreamableByteArrayOutputStream;
10-
import org.jetbrains.annotations.NotNull;
10+
import org.jspecify.annotations.NonNull;
11+
import org.jspecify.annotations.Nullable;
1112
import org.spongepowered.asm.mixin.Final;
1213
import org.spongepowered.asm.mixin.Mixin;
1314
import org.spongepowered.asm.mixin.Shadow;
1415
import org.spongepowered.asm.mixin.Unique;
1516

16-
import javax.annotation.Nullable;
1717
import java.io.IOException;
1818
import java.io.InputStream;
1919
import java.nio.file.Files;
@@ -29,7 +29,7 @@ public abstract class FileArgumentMixin implements FileArgumentExtension {
2929
@SuppressWarnings("SynchronizeOnNonFinalField")
3030
@Unique
3131
@Override
32-
@NotNull
32+
@NonNull
3333
public InputStream asInputStream(@Nullable Module module) {
3434
try {
3535
synchronized (writeIOSync) {
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
@ParametersAreNonnullByDefault
2-
@FieldsAreNonnullByDefault()
3-
@MethodsReturnNonnullByDefault()
1+
@NullMarked
42
package net.replaceitem.discarpet.script.events;
53

6-
import net.minecraft.FieldsAreNonnullByDefault;
7-
import net.minecraft.MethodsReturnNonnullByDefault;
8-
import javax.annotation.ParametersAreNonnullByDefault;
4+
import org.jspecify.annotations.NullMarked;
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
@ParametersAreNonnullByDefault
2-
@FieldsAreNonnullByDefault()
3-
@MethodsReturnNonnullByDefault()
1+
@NullMarked
42
package net.replaceitem.discarpet.script.exception;
53

6-
import net.minecraft.FieldsAreNonnullByDefault;
7-
import net.minecraft.MethodsReturnNonnullByDefault;
8-
import javax.annotation.ParametersAreNonnullByDefault;
4+
import org.jspecify.annotations.NullMarked;
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
@ParametersAreNonnullByDefault
2-
@MethodsReturnNonnullByDefault()
1+
@NullMarked
32
package net.replaceitem.discarpet.script.schema.schemas.commands;
43

5-
import net.minecraft.MethodsReturnNonnullByDefault;
6-
import javax.annotation.ParametersAreNonnullByDefault;
4+
import org.jspecify.annotations.NullMarked;
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
@ParametersAreNonnullByDefault
2-
@MethodsReturnNonnullByDefault()
1+
@NullMarked
32
package net.replaceitem.discarpet.script.schema.schemas.components;
43

5-
import net.minecraft.MethodsReturnNonnullByDefault;
6-
import javax.annotation.ParametersAreNonnullByDefault;
4+
import org.jspecify.annotations.NullMarked;

0 commit comments

Comments
 (0)