feat: 1.21.10

chore: upgrade gradle wrapper + update dependencies
This commit is contained in:
Chayapak Supasakul 2025-10-14 08:58:27 +07:00
parent aae472cb27
commit e381dca24c
Signed by: ChomeNS
SSH key fingerprint: SHA256:0YoxhdyXsgbc0nfeB2N6FYE60mxMU7DS4uCUMaw2mvA
13 changed files with 36 additions and 32 deletions

View file

@ -1,5 +1,5 @@
plugins { plugins {
id 'fabric-loom' version '1.11-SNAPSHOT' id 'fabric-loom' version "${loom_version}"
} }
base.archivesName = project.archives_base_name base.archivesName = project.archives_base_name
@ -31,12 +31,12 @@ dependencies {
// Configurate // Configurate
include(implementation("org.spongepowered:configurate-core:4.2.0")) include(implementation("org.spongepowered:configurate-core:4.2.0"))
include(implementation("org.spongepowered:configurate-gson:4.2.0")) include(implementation("org.spongepowered:configurate-gson:4.2.0"))
include(implementation("io.leangen.geantyref:geantyref:1.3.16")) include(implementation("io.leangen.geantyref:geantyref:2.0.1"))
// Adventure // Adventure
include(modImplementation("net.kyori:adventure-platform-fabric:6.5.0-SNAPSHOT")) include(modImplementation("net.kyori:adventure-platform-fabric:6.7.0"))
include(implementation("net.kyori:adventure-text-serializer-gson:4.23.0")) include(implementation("net.kyori:adventure-text-serializer-gson:4.25.0"))
include(implementation("net.kyori:adventure-text-serializer-legacy:4.23.0")) include(implementation("net.kyori:adventure-text-serializer-legacy:4.25.0"))
} }
processResources { processResources {

View file

@ -4,9 +4,10 @@ org.gradle.parallel=true
# Fabric Properties # Fabric Properties
# check these on https://fabricmc.net/develop # check these on https://fabricmc.net/develop
minecraft_version=1.21.8 minecraft_version=1.21.10
yarn_mappings=1.21.8+build.1 yarn_mappings=1.21.10+build.2
loader_version=0.16.14 loader_version=0.17.3
loom_version=1.11-SNAPSHOT
# Mod Properties # Mod Properties
mod_version = 1.0.0 mod_version = 1.0.0
@ -14,5 +15,5 @@ org.gradle.parallel=true
archives_base_name = chipmunkmod archives_base_name = chipmunkmod
# Dependencies # Dependencies
fabric_version=0.129.0+1.21.8 fabric_version=0.135.0+1.21.10

Binary file not shown.

6
gradlew vendored
View file

@ -114,7 +114,7 @@ case "$( uname )" in #(
NONSTOP* ) nonstop=true ;; NONSTOP* ) nonstop=true ;;
esac esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar CLASSPATH="\\\"\\\""
# Determine the Java command to use to start the JVM. # Determine the Java command to use to start the JVM.
@ -205,7 +205,7 @@ fi
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command: # Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, # * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped. # and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line. # treated as '${Hostname}' itself on the command line.
@ -213,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
set -- \ set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \ "-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \ -classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \ -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
"$@" "$@"
# Stop when "xargs" is not available. # Stop when "xargs" is not available.

4
gradlew.bat vendored
View file

@ -70,11 +70,11 @@ goto fail
:execute :execute
@rem Setup the command line @rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar set CLASSPATH=
@rem Execute Gradle @rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
:end :end
@rem End local scope for the variables with windows NT shell @rem End local scope for the variables with windows NT shell

View file

@ -85,7 +85,7 @@ public class CoreCommand {
public static int move (final CommandContext<FabricClientCommandSource> context) { public static int move (final CommandContext<FabricClientCommandSource> context) {
final FabricClientCommandSource source = context.getSource(); final FabricClientCommandSource source = context.getSource();
CommandCore.INSTANCE.move(source.getClient().player.getPos()); CommandCore.INSTANCE.move(source.getClient().player.getEyePos());
return Command.SINGLE_SUCCESS; return Command.SINGLE_SUCCESS;
} }

View file

@ -59,7 +59,7 @@ public class UsernameCommand {
private static Session offline (final String username) { private static Session offline (final String username) {
// This is how Minecraft's Main class does it // This is how Minecraft's Main class does it
return new Session(username, Uuids.getOfflinePlayerUuid(username), return new Session(username, Uuids.getOfflinePlayerUuid(username),
"", Optional.empty(), Optional.empty(), Session.AccountType.LEGACY); "", Optional.empty(), Optional.empty());
} }
// TODO: Put this in a separate class // TODO: Put this in a separate class

View file

@ -29,7 +29,7 @@ public abstract class ClientPlayerEntityMixin extends Entity {
public void move (final CallbackInfo ci) { public void move (final CallbackInfo ci) {
final BlockPos origin = CommandCore.INSTANCE.origin; final BlockPos origin = CommandCore.INSTANCE.origin;
if (origin == null) { if (origin == null) {
CommandCore.INSTANCE.move(this.getPos()); CommandCore.INSTANCE.move(this.getEyePos());
return; return;
} }
@ -38,7 +38,7 @@ public abstract class ClientPlayerEntityMixin extends Entity {
if (distance > networkHandler.getWorld().getSimulationDistance()) { if (distance > networkHandler.getWorld().getSimulationDistance()) {
CommandCore.INSTANCE.alreadyFilled = true; CommandCore.INSTANCE.alreadyFilled = true;
CommandCore.INSTANCE.move(this.getPos()); CommandCore.INSTANCE.move(this.getEyePos());
} }
} }
} }

View file

@ -1,18 +1,19 @@
package land.chipmunk.chipmunkmod.mixin; package land.chipmunk.chipmunkmod.mixin;
import net.minecraft.client.particle.ElderGuardianAppearanceParticle; import net.minecraft.client.particle.ElderGuardianParticle;
import net.minecraft.client.particle.Particle; import net.minecraft.client.particle.Particle;
import net.minecraft.client.world.ClientWorld; import net.minecraft.client.world.ClientWorld;
import net.minecraft.particle.SimpleParticleType; import net.minecraft.particle.SimpleParticleType;
import net.minecraft.util.math.random.Random;
import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@Mixin(ElderGuardianAppearanceParticle.Factory.class) @Mixin(ElderGuardianParticle.Factory.class)
public class ElderGuardianAppearanceParticleMixin { public class ElderGuardianAppearanceParticleMixin {
@Inject( @Inject(
method = "createParticle(Lnet/minecraft/particle/SimpleParticleType;Lnet/minecraft/client/world/ClientWorld;DDDDDD)Lnet/minecraft/client/particle/Particle;", method = "createParticle(Lnet/minecraft/particle/SimpleParticleType;Lnet/minecraft/client/world/ClientWorld;DDDDDDLnet/minecraft/util/math/random/Random;)Lnet/minecraft/client/particle/Particle;",
at = @At("RETURN"), at = @At("RETURN"),
cancellable = true cancellable = true
) )
@ -25,6 +26,7 @@ public class ElderGuardianAppearanceParticleMixin {
final double g, final double g,
final double h, final double h,
final double i, final double i,
final Random random,
final CallbackInfoReturnable<Particle> cir final CallbackInfoReturnable<Particle> cir
) { ) {
// slash scare command // slash scare command

View file

@ -10,7 +10,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@Mixin(StringHelper.class) @Mixin(StringHelper.class)
public class StringHelperMixin { public class StringHelperMixin {
@Inject(method = "isValidChar", at = @At("RETURN"), cancellable = true) @Inject(method = "isValidChar", at = @At("RETURN"), cancellable = true)
private static void isValidChar (final char c, final CallbackInfoReturnable<Boolean> cir) { private static void isValidChar (final int c, final CallbackInfoReturnable<Boolean> cir) {
if (!CustomChat.SHOULD_IGNORE_INVALID_CHAR.get()) { if (!CustomChat.SHOULD_IGNORE_INVALID_CHAR.get()) {
CustomChat.SHOULD_IGNORE_INVALID_CHAR.set(true); CustomChat.SHOULD_IGNORE_INVALID_CHAR.set(true);
return; return;

View file

@ -8,6 +8,7 @@ import net.minecraft.block.Block;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.block.CommandBlock; import net.minecraft.block.CommandBlock;
import net.minecraft.block.FallingBlock; import net.minecraft.block.FallingBlock;
import net.minecraft.block.entity.BlockEntityType;
import net.minecraft.block.entity.CommandBlockBlockEntity; import net.minecraft.block.entity.CommandBlockBlockEntity;
import net.minecraft.client.MinecraftClient; import net.minecraft.client.MinecraftClient;
import net.minecraft.client.network.ClientPlayNetworkHandler; import net.minecraft.client.network.ClientPlayNetworkHandler;
@ -17,6 +18,7 @@ import net.minecraft.client.world.ClientWorld;
import net.minecraft.component.ComponentMap; import net.minecraft.component.ComponentMap;
import net.minecraft.component.DataComponentTypes; import net.minecraft.component.DataComponentTypes;
import net.minecraft.component.type.NbtComponent; import net.minecraft.component.type.NbtComponent;
import net.minecraft.entity.TypedEntityData;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.item.Items; import net.minecraft.item.Items;
import net.minecraft.nbt.NbtCompound; import net.minecraft.nbt.NbtCompound;
@ -81,7 +83,7 @@ public class CommandCore implements Listener {
if (client.player == null) return; if (client.player == null) return;
move(client.player.getPos()); move(client.player.getEyePos());
} }
private void tick () { private void tick () {
@ -148,7 +150,7 @@ public class CommandCore implements Listener {
if (player == null || world == null) return; if (player == null || world == null) return;
if (oldDimension != null && !oldDimension.equals(world.getDimension())) move(client.player.getPos()); if (oldDimension != null && !oldDimension.equals(world.getDimension())) move(client.player.getEyePos());
oldDimension = world.getDimension(); oldDimension = world.getDimension();
@ -431,7 +433,6 @@ public class CommandCore implements Listener {
final ItemStack commandBlock = new ItemStack(Items.COMMAND_BLOCK); final ItemStack commandBlock = new ItemStack(Items.COMMAND_BLOCK);
final NbtCompound data = new NbtCompound(); final NbtCompound data = new NbtCompound();
data.putString("id", "minecraft:command_block");
data.putString("Command", command); data.putString("Command", command);
data.putBoolean("auto", true); data.putBoolean("auto", true);
@ -441,7 +442,7 @@ public class CommandCore implements Listener {
commandBlock.applyComponentsFrom( commandBlock.applyComponentsFrom(
ComponentMap.builder() ComponentMap.builder()
.add(DataComponentTypes.CUSTOM_DATA, NbtComponent.of(blockEntityTag)) .add(DataComponentTypes.CUSTOM_DATA, NbtComponent.of(blockEntityTag))
.add(DataComponentTypes.BLOCK_ENTITY_DATA, NbtComponent.of(data)) .add(DataComponentTypes.BLOCK_ENTITY_DATA, TypedEntityData.create(BlockEntityType.COMMAND_BLOCK, data))
.build() .build()
); );
@ -501,7 +502,7 @@ public class CommandCore implements Listener {
if (!player.canInteractWithBlockAt(blockPos, 1.0)) continue; if (!player.canInteractWithBlockAt(blockPos, 1.0)) continue;
// we don't want to place a block inside ourselves // we don't want to place a block inside ourselves
if (boundingBox.intersects(new Vec3d(blockPos), new Vec3d(blockPos))) continue; if (boundingBox.intersects(new Vec3d(blockPos), new Vec3d(blockPos))) continue;
final BlockState blockState = player.getWorld().getBlockState(blockPos); final BlockState blockState = player.getEntityWorld().getBlockState(blockPos);
if (blockState.getBlock() instanceof FallingBlock) continue; if (blockState.getBlock() instanceof FallingBlock) continue;
final boolean replaceable = blockState.isIn(BlockTags.REPLACEABLE); final boolean replaceable = blockState.isIn(BlockTags.REPLACEABLE);
if ( if (

View file

@ -51,7 +51,7 @@ public class RainbowName {
final String username = RandomUtilities.emptyUsername(random); final String username = RandomUtilities.emptyUsername(random);
team = RandomUtilities.randomString(random, RandomUtilities.TEAM_ALLOWED_CHARS, 16); team = RandomUtilities.randomString(random, RandomUtilities.TEAM_ALLOWED_CHARS, 16);
final String selfSelector = UUIDUtilities.selector(profile.getId()); final String selfSelector = UUIDUtilities.selector(profile.id());
networkHandler.sendChatCommand("extras:username " + username); networkHandler.sendChatCommand("extras:username " + username);
CommandCore.INSTANCE.run("minecraft:team add " + team); CommandCore.INSTANCE.run("minecraft:team add " + team);
@ -68,9 +68,9 @@ public class RainbowName {
} }
final GameProfile profile = networkHandler.getProfile(); final GameProfile profile = networkHandler.getProfile();
CommandCore.INSTANCE.run("essentials:nick " + profile.getId() + " off"); CommandCore.INSTANCE.run("essentials:nick " + profile.id() + " off");
CommandCore.INSTANCE.run("minecraft:team remove " + team); CommandCore.INSTANCE.run("minecraft:team remove " + team);
networkHandler.sendChatCommand("extras:username " + profile.getName()); networkHandler.sendChatCommand("extras:username " + profile.name());
enabled = false; enabled = false;
} }
@ -100,7 +100,7 @@ public class RainbowName {
} }
CommandCore.INSTANCE.run("minecraft:team modify " + team + " prefix " + GsonComponentSerializer.gson().serialize(component)); CommandCore.INSTANCE.run("minecraft:team modify " + team + " prefix " + GsonComponentSerializer.gson().serialize(component));
CommandCore.INSTANCE.run("essentials:nick " + profile.getId() + " " + essentialsNickname); CommandCore.INSTANCE.run("essentials:nick " + profile.id() + " " + essentialsNickname);
startHue = (startHue + increment) % 360; startHue = (startHue + increment) % 360;
} catch (final Exception e) { } catch (final Exception e) {

View file

@ -32,7 +32,7 @@
"depends": { "depends": {
"fabricloader": ">=0.16.13", "fabricloader": ">=0.16.13",
"fabric-api": "*", "fabric-api": "*",
"minecraft": "1.21.8", "minecraft": "1.21.10",
"java": ">=21" "java": ">=21"
} }
} }