mirror of
https://code.chipmunk.land/ChomeNS/chipmunkmod.git
synced 2025-12-30 06:06:55 +00:00
feat: update to 1.21.11
chore: bump dependencies
This commit is contained in:
parent
ac59928566
commit
c871eebc7b
8 changed files with 20 additions and 17 deletions
|
|
@ -34,9 +34,9 @@ dependencies {
|
||||||
include(implementation("io.leangen.geantyref:geantyref:2.0.1"))
|
include(implementation("io.leangen.geantyref:geantyref:2.0.1"))
|
||||||
|
|
||||||
// Adventure
|
// Adventure
|
||||||
include(modImplementation("net.kyori:adventure-platform-fabric:6.7.0"))
|
include(modImplementation("net.kyori:adventure-platform-fabric:6.8.0"))
|
||||||
include(implementation("net.kyori:adventure-text-serializer-gson:4.25.0"))
|
include(implementation("net.kyori:adventure-text-serializer-gson:4.26.1"))
|
||||||
include(implementation("net.kyori:adventure-text-serializer-legacy:4.25.0"))
|
include(implementation("net.kyori:adventure-text-serializer-legacy:4.26.1"))
|
||||||
}
|
}
|
||||||
|
|
||||||
processResources {
|
processResources {
|
||||||
|
|
|
||||||
|
|
@ -4,10 +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.10
|
minecraft_version=1.21.11
|
||||||
yarn_mappings=1.21.10+build.2
|
yarn_mappings=1.21.11+build.3
|
||||||
loader_version=0.17.3
|
loader_version=0.18.3
|
||||||
loom_version=1.11-SNAPSHOT
|
loom_version=1.13-SNAPSHOT
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version = 1.0.0
|
mod_version = 1.0.0
|
||||||
|
|
@ -15,5 +15,5 @@ org.gradle.parallel=true
|
||||||
archives_base_name = chipmunkmod
|
archives_base_name = chipmunkmod
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
fabric_version=0.135.0+1.21.10
|
fabric_version=0.140.0+1.21.11
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,8 @@ import net.minecraft.client.network.ClientPlayerEntity;
|
||||||
import net.minecraft.client.network.ClientPlayerInteractionManager;
|
import net.minecraft.client.network.ClientPlayerInteractionManager;
|
||||||
import net.minecraft.client.network.PendingUpdateManager;
|
import net.minecraft.client.network.PendingUpdateManager;
|
||||||
import net.minecraft.client.world.ClientWorld;
|
import net.minecraft.client.world.ClientWorld;
|
||||||
|
import net.minecraft.command.permission.LeveledPermissionPredicate;
|
||||||
|
import net.minecraft.command.permission.PermissionLevel;
|
||||||
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;
|
||||||
|
|
@ -233,7 +235,7 @@ public class CommandCore implements Listener {
|
||||||
!runFillCommand || isSingleBlock
|
!runFillCommand || isSingleBlock
|
||||||
|| player == null
|
|| player == null
|
||||||
|| !player.isInCreativeMode()
|
|| !player.isInCreativeMode()
|
||||||
|| !player.hasPermissionLevel(2)
|
|| !player.isCreativeLevelTwoOp()
|
||||||
|| client.world == null
|
|| client.world == null
|
||||||
|| networkHandler == null
|
|| networkHandler == null
|
||||||
|| withPos == null
|
|| withPos == null
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ package land.chipmunk.chipmunkmod.modules;
|
||||||
import com.mojang.brigadier.CommandDispatcher;
|
import com.mojang.brigadier.CommandDispatcher;
|
||||||
import net.minecraft.client.MinecraftClient;
|
import net.minecraft.client.MinecraftClient;
|
||||||
import net.minecraft.command.CommandSource;
|
import net.minecraft.command.CommandSource;
|
||||||
|
import net.minecraft.command.DefaultPermissions;
|
||||||
|
|
||||||
public class KaboomCheck {
|
public class KaboomCheck {
|
||||||
public static final KaboomCheck INSTANCE = new KaboomCheck();
|
public static final KaboomCheck INSTANCE = new KaboomCheck();
|
||||||
|
|
@ -17,7 +18,7 @@ public class KaboomCheck {
|
||||||
|
|
||||||
public void onCommandTree (final CommandDispatcher<CommandSource> dispatcher) {
|
public void onCommandTree (final CommandDispatcher<CommandSource> dispatcher) {
|
||||||
assert client.player != null; // We can only receive this packet while in a server
|
assert client.player != null; // We can only receive this packet while in a server
|
||||||
final String checkedCommand = client.player.getPermissionLevel() == 4
|
final String checkedCommand = client.player.getPermissions().hasPermission(DefaultPermissions.OWNERS)
|
||||||
? CHECKED_COMMAND_OP : CHECKED_COMMAND;
|
? CHECKED_COMMAND_OP : CHECKED_COMMAND;
|
||||||
|
|
||||||
this.isKaboom = dispatcher.getRoot().getChild(checkedCommand) != null;
|
this.isKaboom = dispatcher.getRoot().getChild(checkedCommand) != null;
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ public class SelfCare implements Listener {
|
||||||
|
|
||||||
if (networkHandler == null || player == null) return;
|
if (networkHandler == null || player == null) return;
|
||||||
|
|
||||||
if (!player.hasPermissionLevel(2) && opEnabled && serverHasCommand("op"))
|
if (!player.isCreativeLevelTwoOp() && opEnabled && serverHasCommand("op"))
|
||||||
networkHandler.sendChatCommand("op @s[type=player]");
|
networkHandler.sendChatCommand("op @s[type=player]");
|
||||||
else if (!player.isInCreativeMode() && gamemodeEnabled)
|
else if (!player.isInCreativeMode() && gamemodeEnabled)
|
||||||
// ViaVersion will automatically convert this to `/gamemode creative`
|
// ViaVersion will automatically convert this to `/gamemode creative`
|
||||||
|
|
@ -69,7 +69,7 @@ public class SelfCare implements Listener {
|
||||||
!CommandCore.INSTANCE.ready
|
!CommandCore.INSTANCE.ready
|
||||||
|| !CommandCore.INSTANCE.runFillCommand
|
|| !CommandCore.INSTANCE.runFillCommand
|
||||||
|| !player.isInCreativeMode()
|
|| !player.isInCreativeMode()
|
||||||
|| !player.hasPermissionLevel(2)
|
|| !player.isCreativeLevelTwoOp()
|
||||||
) {
|
) {
|
||||||
networkHandler.sendChatCommand("c on");
|
networkHandler.sendChatCommand("c on");
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@ public class CustomChat {
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean shouldUsePlayerChat (final ClientPlayerEntity player, final String message) {
|
private boolean shouldUsePlayerChat (final ClientPlayerEntity player, final String message) {
|
||||||
return !enabled || isUnnecessary(message) || !player.hasPermissionLevel(2) || !player.isCreative();
|
return !enabled || isUnnecessary(message) || !player.isCreativeLevelTwoOp();
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isUnnecessary (final String message) {
|
private boolean isUnnecessary (final String message) {
|
||||||
|
|
|
||||||
|
|
@ -92,11 +92,11 @@ public class BotValidationUtilities {
|
||||||
|
|
||||||
final MessageDigest md = MessageDigest.getInstance("SHA-256");
|
final MessageDigest md = MessageDigest.getInstance("SHA-256");
|
||||||
final String time = String.valueOf(System.currentTimeMillis() / 5_000);
|
final String time = String.valueOf(System.currentTimeMillis() / 5_000);
|
||||||
final String input = client.player.getUuidAsString() + joinedSplitInput + time + key;
|
final String input = player.getUuidAsString() + joinedSplitInput + time + key;
|
||||||
final byte[] hash = md.digest(input.getBytes(StandardCharsets.UTF_8));
|
final byte[] hash = md.digest(input.getBytes(StandardCharsets.UTF_8));
|
||||||
String stringHash = new String(Hex.encodeHex(hash)).substring(0, 16);
|
String stringHash = new String(Hex.encodeHex(hash)).substring(0, 16);
|
||||||
|
|
||||||
final boolean shouldSectionSign = CustomChat.INSTANCE.enabled && player.hasPermissionLevel(2) && player.isCreative();
|
final boolean shouldSectionSign = CustomChat.INSTANCE.enabled && player.isCreativeLevelTwoOp();
|
||||||
|
|
||||||
if (shouldSectionSign) {
|
if (shouldSectionSign) {
|
||||||
stringHash = String.join("",
|
stringHash = String.join("",
|
||||||
|
|
|
||||||
|
|
@ -30,9 +30,9 @@
|
||||||
],
|
],
|
||||||
|
|
||||||
"depends": {
|
"depends": {
|
||||||
"fabricloader": ">=0.16.13",
|
"fabricloader": ">=0.18.3",
|
||||||
"fabric-api": "*",
|
"fabric-api": "*",
|
||||||
"minecraft": "1.21.10",
|
"minecraft": "1.21.11",
|
||||||
"java": ">=21"
|
"java": ">=21"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue