Bump to 1.20
This commit is contained in:
parent
b617dd4d54
commit
9358086717
@ -1,9 +1,9 @@
|
||||
org.gradle.jvmargs=-Xmx1G
|
||||
org.gradle.parallel=true
|
||||
minecraft_version=1.19.4
|
||||
yarn_mappings=1.19.4+build.2
|
||||
loader_version=0.14.19
|
||||
minecraft_version=1.20
|
||||
yarn_mappings=1.20+build.1
|
||||
loader_version=0.14.21
|
||||
mod_version=1.2.0
|
||||
maven_group=party._2a03.mc
|
||||
archives_base_name=minecraft-tweaks-2a03
|
||||
fabric_version=0.79.0+1.19.4
|
||||
fabric_version=0.83.0+1.20
|
||||
|
@ -17,9 +17,9 @@ public class ConfigCommand {
|
||||
ServerCommandSource source = ctx.getSource();
|
||||
try {
|
||||
Config.loadConfig();
|
||||
source.sendFeedback(Text.of("Reloaded the configuration"), true);
|
||||
source.sendFeedback(() -> Text.of("Reloaded the configuration"), true);
|
||||
} catch(Exception e) {
|
||||
source.sendFeedback(Text.of("Failed to reload the configuration"), true);
|
||||
source.sendFeedback(() -> Text.of("Failed to reload the configuration"), true);
|
||||
}
|
||||
return 1;
|
||||
}));
|
||||
|
@ -13,7 +13,7 @@ public class FlyCommand {
|
||||
dispatcher.register(CommandManager.literal("fly").executes(ctx -> {
|
||||
ServerCommandSource source = ctx.getSource();
|
||||
if (Config.getBool("disableFlyCommand")) {
|
||||
source.sendFeedback(Text.of("The /fly command is disabled"), true);
|
||||
source.sendFeedback(() -> Text.of("The /fly command is disabled"), true);
|
||||
return 0;
|
||||
}
|
||||
ServerPlayerEntity sender = source.getPlayer();
|
||||
@ -21,9 +21,9 @@ public class FlyCommand {
|
||||
boolean flight = abilities.allowFlying;
|
||||
abilities.allowFlying = !flight;
|
||||
if (!flight)
|
||||
source.sendFeedback(Text.of("I wanna fly like an eagle... to the sea!"), true);
|
||||
source.sendFeedback(() -> Text.of("I wanna fly like an eagle... to the sea!"), true);
|
||||
else {
|
||||
source.sendFeedback(Text.of("Flight disabled"), true);
|
||||
source.sendFeedback(() -> Text.of("Flight disabled"), true);
|
||||
abilities.flying = false;
|
||||
}
|
||||
sender.sendAbilitiesUpdate();
|
||||
|
@ -17,7 +17,7 @@ public class HatCommand {
|
||||
ItemStack head = sender.getEquippedStack(EquipmentSlot.HEAD);
|
||||
sender.equipStack(EquipmentSlot.MAINHAND, head);
|
||||
sender.equipStack(EquipmentSlot.HEAD, mainhand);
|
||||
source.sendFeedback(Text.of("Swapped items between main hand and head"), false);
|
||||
source.sendFeedback(() -> Text.of("Swapped items between main hand and head"), false);
|
||||
return 1;
|
||||
}));
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ public class HeadCommand {
|
||||
ItemEntity itementity = sender.dropItem(itemstack, false);
|
||||
itementity.resetPickupDelay();
|
||||
itementity.setOwner(sender.getUuid());
|
||||
source.sendFeedback(Text.of("Player head has been given"), false);
|
||||
source.sendFeedback(() -> Text.of("Player head has been given"), false);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
@ -21,11 +21,11 @@ public class HomeCommand {
|
||||
ServerPlayerEntity sender = source.getPlayer();
|
||||
PlayerPosition position = Database.getPlayer(sender.getUuid().toString()).getHome();
|
||||
if (position.registrykey == null) {
|
||||
source.sendFeedback(Text.of("Home not found, do /home set"), false);
|
||||
source.sendFeedback(() -> Text.of("Home not found, do /home set"), false);
|
||||
return -1;
|
||||
}
|
||||
sender.teleport(sender.getServer().getWorld(position.registrykey), position.x, position.y, position.z, position.yaw, position.pitch);
|
||||
source.sendFeedback(Text.of("Teleported to home"), true);
|
||||
source.sendFeedback(() -> Text.of("Teleported to home"), true);
|
||||
return 1;
|
||||
});
|
||||
|
||||
@ -41,7 +41,7 @@ public class HomeCommand {
|
||||
RegistryKey registrykey = sender.getWorld().getRegistryKey();
|
||||
PlayerPosition location = new PlayerPosition(x, y, z, yaw, pitch, registrykey);
|
||||
playerdata.setHome(location);
|
||||
source.sendFeedback(Text.of("Your home has been updated"), true);
|
||||
source.sendFeedback(() -> Text.of("Your home has been updated"), true);
|
||||
return 1;
|
||||
}));
|
||||
|
||||
@ -60,7 +60,7 @@ public class HomeCommand {
|
||||
RegistryKey registrykey = sender.getWorld().getRegistryKey();
|
||||
PlayerPosition location = new PlayerPosition(x, y, z, yaw, pitch, registrykey);
|
||||
playerdata.setHome(location);
|
||||
source.sendFeedback(Text.of("User's home has been updated (" + uuid.toString() + ")"), true);
|
||||
source.sendFeedback(() -> Text.of("User's home has been updated (" + uuid.toString() + ")"), true);
|
||||
return 1;
|
||||
})));
|
||||
|
||||
|
@ -25,7 +25,7 @@ public class NameCommand {
|
||||
ServerPlayerEntity sender = source.getPlayer();
|
||||
PlayerData playerdata = Database.getPlayer(uuid);
|
||||
playerdata.setName(StringArgumentType.getString(ctx, "name"));
|
||||
source.sendFeedback(Text.of("User's name has been updated (" + uuid.toString() + ")"), true);
|
||||
source.sendFeedback(() -> Text.of("User's name has been updated (" + uuid.toString() + ")"), true);
|
||||
return 1;
|
||||
})))));
|
||||
}
|
||||
|
@ -34,16 +34,16 @@ public class SkinCommand {
|
||||
skinsig = read.readLine();
|
||||
read.close();
|
||||
} catch (IOException e) {
|
||||
source.sendFeedback(Text.of("Failed to access skin"), false);
|
||||
source.sendFeedback(() -> Text.of("Failed to access skin"), false);
|
||||
return 1;
|
||||
}
|
||||
if (!magic.equals("SKIN:1") || skinval == null || skinsig == null) {
|
||||
source.sendFeedback(Text.of("Invalid skin"), false);
|
||||
source.sendFeedback(() -> Text.of("Invalid skin"), false);
|
||||
return 1;
|
||||
}
|
||||
UUID uuid = UUID.fromString(StringArgumentType.getString(ctx, "UUID"));
|
||||
Database.getPlayer(uuid).setTextures(skinval, skinsig);
|
||||
source.sendFeedback(Text.of("User's skin has been updated (" + uuid.toString() + ")"), true);
|
||||
source.sendFeedback(() -> Text.of("User's skin has been updated (" + uuid.toString() + ")"), true);
|
||||
return 1;
|
||||
}))));
|
||||
|
||||
|
@ -18,14 +18,14 @@ public class SpawnCommand {
|
||||
PlayerPosition position = new PlayerPosition(Config.getData("spawn"));
|
||||
if (position.registrykey == null) {
|
||||
if (source.hasPermissionLevel(2)) {
|
||||
source.sendFeedback(Text.of("Spawn not found, do /spawn set"), false);
|
||||
source.sendFeedback(() -> Text.of("Spawn not found, do /spawn set"), false);
|
||||
} else {
|
||||
source.sendFeedback(Text.of("Spawn not found, ask an admin to set it"), false);
|
||||
source.sendFeedback(() -> Text.of("Spawn not found, ask an admin to set it"), false);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
sender.teleport(sender.getServer().getWorld(position.registrykey), position.x, position.y, position.z, position.yaw, position.pitch);
|
||||
source.sendFeedback(Text.of("Teleported to the spawn point"), true);
|
||||
source.sendFeedback(() -> Text.of("Teleported to the spawn point"), true);
|
||||
return 1;
|
||||
});
|
||||
|
||||
@ -42,7 +42,7 @@ public class SpawnCommand {
|
||||
RegistryKey registrykey = sender.getWorld().getRegistryKey();
|
||||
PlayerPosition location = new PlayerPosition(x, y, z, yaw, pitch, registrykey);
|
||||
Config.setData("spawn", location.getJSON());
|
||||
source.sendFeedback(Text.of("Spawn has been set"), true);
|
||||
source.sendFeedback(() -> Text.of("Spawn has been set"), true);
|
||||
return 1;
|
||||
}));
|
||||
|
||||
|
@ -17,7 +17,7 @@ public class MixinGameModeCommand {
|
||||
@Inject(method = "execute", at = @At("HEAD"))
|
||||
private static void OnExecute(CommandContext<ServerCommandSource> context, Collection<ServerPlayerEntity> targets, GameMode gameMode, CallbackInfoReturnable cir) {
|
||||
if (gameMode == GameMode.CREATIVE) {
|
||||
context.getSource().sendFeedback(Text.of("<Server> Creative mode? What are you, a cheater?"), false);
|
||||
context.getSource().sendFeedback(() -> Text.of("<Server> Creative mode? What are you, a cheater?"), false);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -23,9 +23,9 @@
|
||||
"minecraft-tweaks-2a03.mixins.json"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.14.19",
|
||||
"fabricloader": ">=0.14.21",
|
||||
"fabric-api": "*",
|
||||
"minecraft": "1.19.4",
|
||||
"minecraft": "~1.20",
|
||||
"java": ">=17"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user