Skip to content

Commit 799c5df

Browse files
committed
upgrade to 1.21.9
1 parent 725fad7 commit 799c5df

33 files changed

+158
-130
lines changed

build.gradle

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ allprojects {
7979
repositories {
8080
gradlePluginPortal()
8181
mavenCentral()
82-
mavenLocal()
82+
// mavenLocal()
8383
maven { name 'Fabric'; url 'https://maven.fabricmc.net/' }
8484
// maven { name 'TerraformersMC'; url 'https://maven.terraformersmc.com/' }
8585
// Add repositories to retrieve artifacts from in here.
@@ -93,7 +93,15 @@ allprojects {
9393
url = 'https://maven.ladysnake.org/releases'
9494
content {
9595
includeGroup 'io.github.ladysnake'
96-
includeGroupByRegex 'io\\.github\\.onyxstudios.*'
96+
includeGroupByRegex 'org\\.ladysnake.*'
97+
}
98+
}
99+
maven {
100+
name = 'jpcode'
101+
url = 'https://maven.jpcode.dev/'
102+
content {
103+
includeGroup 'io.github.ladysnake'
104+
includeGroupByRegex 'org\\.ladysnake.*'
97105
}
98106
}
99107
maven { url "https://api.modrinth.com/maven" } // for vanish

changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## Essential Commands `v0.38.6` (mc 1.21.9)
2+
3+
- upgrade to Minecraft 1.21.9
4+
15
## Essential Commands `v0.38.5` (mc 1.21.8)
26

37
- assorted internal dependency and tooling upgrades

gradle.properties

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@ org.gradle.jvmargs=-Xmx2048M
33

44
# Fabric Properties
55
# check these on https://fabricmc.net/develup
6-
minecraft_version=1.21.8
7-
yarn_mappings=1.21.8+build.1
6+
minecraft_version=1.21.9
7+
yarn_mappings=1.21.9+build.1
88
loader_version=0.17.2
99
loom_version=1.11-SNAPSHOT
1010

1111
# Fabric API
12-
fabric_version=0.133.0+1.21.8
12+
fabric_version=0.134.0+1.21.9
1313

1414
# Mod Properties
1515
mod_name = Essential Commands
1616
mod_id = essential_commands
17-
mod_version = 0.38.5-joinpoints2
17+
mod_version = 0.38.6
1818
# TODO @1.0.0: migrate to dev.jpcode
1919
maven_group = com.fibermc
2020
archives_base_name = essential_commands
@@ -25,10 +25,10 @@ gh_owner=John-Paul-R
2525
gh_repo=essential-commands
2626

2727
# Dependencies
28-
permissions_api_version=0.4.1
29-
placeholder_api_version=2.7.2+1.21.8
30-
pal_version=1.14.0
31-
vanish_version=1.6.0+1.21.8
28+
permissions_api_version=0.5.0
29+
placeholder_api_version=2.8.0+1.21.9
30+
pal_version=1.15.0
31+
vanish_version=1.6.1+1.21.9-rc1
3232
mixinextras_version=0.5.0
3333
snakeyaml_version=2.5
3434
jetbrains_annotations_version=22.0.0

src/main/java/com/fibermc/essentialcommands/EssentialCommandRegistry.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ public static void register(
480480
return;
481481
}
482482
context.getSource().sendFeedback(() ->
483-
Text.of(playerEntity.getPos().toString()),
483+
Text.of(playerEntity.getEntityPos().toString()),
484484
EssentialCommands.CONFIG.BROADCAST_TO_OPS);
485485
});
486486
return 1;

src/main/java/com/fibermc/essentialcommands/commands/BedCommand.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import net.minecraft.server.command.ServerCommandSource;
2121
import net.minecraft.server.network.ServerPlayerEntity;
2222
import net.minecraft.server.world.ServerWorld;
23-
import net.minecraft.util.math.Direction;
2423
import net.minecraft.util.math.Vec3d;
2524

2625
public class BedCommand implements Command<ServerCommandSource> {
@@ -56,21 +55,22 @@ private static Optional<MinecraftLocation> getSafeSpawnPos(ServerPlayerEntity pl
5655
return Optional.empty();
5756
}
5857

59-
ServerWorld world = player.getServer().getWorld(respawn.dimension());
60-
var spawnPos = respawn.pos();
58+
var respawnPosData = respawn.respawnData().globalPos();
59+
ServerWorld world = player.getEntityWorld().getServer().getWorld(respawnPosData.dimension());
60+
var spawnPos = respawnPosData.pos();
6161

6262
// Safe Position Calculation, based on the game respawn position calculation logic,
6363
// which was basically rewritten because the game code caused the state of the RespawnAnchorBlock to be refreshed.
6464
Vec3d safeSpawnPos;
6565
BlockState blockState = world.getBlockState(spawnPos);
6666
Block block = blockState.getBlock();
6767
if (block instanceof RespawnAnchorBlock
68-
&& (Integer)blockState.get(RespawnAnchorBlock.CHARGES) > 0 && RespawnAnchorBlock.isNether(world)
68+
&& blockState.get(RespawnAnchorBlock.CHARGES) > 0 && RespawnAnchorBlock.isNether(world)
6969
) {
7070
Optional<Vec3d> optional = RespawnAnchorBlock.findRespawnPosition(EntityType.PLAYER, world, spawnPos);
7171
safeSpawnPos = optional.orElseGet(() -> new Vec3d((double) spawnPos.getX() + 0.5, (double) spawnPos.getY() + 1, (double) spawnPos.getZ() + 0.5));
7272
} else if (block instanceof BedBlock && BedBlock.isBedWorking(world)) {
73-
Optional<Vec3d> optional = BedBlock.findWakeUpPosition(EntityType.PLAYER, world, spawnPos, (Direction)blockState.get(BedBlock.FACING), respawn.angle());
73+
Optional<Vec3d> optional = BedBlock.findWakeUpPosition(EntityType.PLAYER, world, spawnPos, blockState.get(BedBlock.FACING), respawn.respawnData().pitch());
7474
safeSpawnPos = optional.orElseGet(() -> new Vec3d((double) spawnPos.getX() + 0.5, (double) spawnPos.getY() + 0.5625, (double) spawnPos.getZ() + 0.5));
7575
} else {
7676
boolean bl = block.canMobSpawnInside(blockState);
@@ -83,6 +83,6 @@ private static Optional<MinecraftLocation> getSafeSpawnPos(ServerPlayerEntity pl
8383
}
8484
}
8585

86-
return Optional.of(new MinecraftLocation(respawn.dimension(), safeSpawnPos.getX(), safeSpawnPos.getY(), safeSpawnPos.getZ()));
86+
return Optional.of(new MinecraftLocation(respawnPosData.dimension(), safeSpawnPos.getX(), safeSpawnPos.getY(), safeSpawnPos.getZ()));
8787
}
8888
}

src/main/java/com/fibermc/essentialcommands/commands/NicknameClearCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public int run(CommandContext<ServerCommandSource> context) throws CommandSyntax
2222
//inform command sender that the nickname has been set
2323
senderPlayerData.sendCommandFeedback(
2424
"cmd.nickname.set.feedback",
25-
Text.literal(targetPlayer.getGameProfile().getName())
25+
Text.literal(targetPlayer.getGameProfile().name())
2626
);
2727

2828
return SINGLE_SUCCESS;

src/main/java/com/fibermc/essentialcommands/commands/NicknameSetCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public static int exec(CommandContext<ServerCommandSource> context, Text rawNick
6161
if (successCode >= 0) {
6262
senderFeedbackReceiver.sendCommandFeedback(
6363
"cmd.nickname.set.feedback",
64-
nicknameText != null ? nicknameText : Text.literal(targetPlayer.getGameProfile().getName())
64+
nicknameText != null ? nicknameText : Text.literal(targetPlayer.getGameProfile().name())
6565
);
6666
} else {
6767
MutableText failReason = switch (successCode) {

src/main/java/com/fibermc/essentialcommands/commands/RandomTeleportCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public int run(CommandContext<ServerCommandSource> context) throws CommandSyntax
9494
}
9595

9696
threadExecutor.execute(() -> {
97-
EssentialCommands.LOGGER.info("Starting RTP location search for {}", player.getGameProfile().getName());
97+
EssentialCommands.LOGGER.info("Starting RTP location search for {}", player.getGameProfile().name());
9898

9999
Stopwatch timer = Stopwatch.createStarted();
100100

src/main/java/com/fibermc/essentialcommands/commands/RealNameCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public int run(CommandContext<ServerCommandSource> context) throws CommandSyntax
3838

3939
for (PlayerData nicknamePlayer : nicknamePlayers) {
4040
responseText.append("\n ");
41-
responseText.append(nicknamePlayer.getPlayer().getGameProfile().getName());
41+
responseText.append(nicknamePlayer.getPlayer().getGameProfile().name());
4242
}
4343
}
4444

src/main/java/com/fibermc/essentialcommands/commands/TeleportAskCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public int run(CommandContext<ServerCommandSource> context) throws CommandSyntax
4949
senderPlayer.getDisplayName().copy().fillStyle(targetPlayerProfile.getStyle(TextFormatType.Accent))
5050
);
5151

52-
String senderName = senderPlayer.getGameProfile().getName();
52+
String senderName = senderPlayer.getGameProfile().name();
5353
new ChatConfirmationPrompt(
5454
targetPlayer,
5555
"/tpaccept " + senderName,

0 commit comments

Comments
 (0)