Skip to content

Commit

Permalink
fix keybind
Browse files Browse the repository at this point in the history
  • Loading branch information
Leclowndu93150 committed Jun 10, 2024
1 parent bf36c24 commit edda193
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,16 @@ public static void onKey(InputEvent.Key event) {
player.level().playSound(player, player.getX(), player.getY(), player.getZ(), SoundEvents.NOTE_BLOCK_BELL.value(), SoundSource.PLAYERS, 0.4f, 0.09f);
}
}
if (INERTIA_MODULE.get().consumeClick()) {
inertiaEnabled = !inertiaEnabled;
if (player != null) {
if (inertiaEnabled) {
player.displayClientMessage(Component.literal("Inertia Module: Enabled").withStyle(ChatFormatting.GREEN), true);
player.level().playSound(player, player.getX(), player.getY(), player.getZ(), SoundEvents.NOTE_BLOCK_BELL.value(), SoundSource.PLAYERS, 0.4f, 0.01f);
} else {
player.displayClientMessage(Component.literal("Inertia Module: Disabled").withStyle(ChatFormatting.RED), true);
player.level().playSound(player, player.getX(), player.getY(), player.getZ(), SoundEvents.NOTE_BLOCK_BELL.value(), SoundSource.PLAYERS, 0.4f, 0.09f);
}
}
if (INERTIA_MODULE.get().consumeClick()) {
inertiaEnabled = !inertiaEnabled;
if (player != null) {
if (inertiaEnabled) {
player.displayClientMessage(Component.literal("Inertia Module: Enabled").withStyle(ChatFormatting.GREEN), true);
player.level().playSound(player, player.getX(), player.getY(), player.getZ(), SoundEvents.NOTE_BLOCK_BELL.value(), SoundSource.PLAYERS, 0.4f, 0.01f);
} else {
player.displayClientMessage(Component.literal("Inertia Module: Disabled").withStyle(ChatFormatting.RED), true);
player.level().playSound(player, player.getX(), player.getY(), player.getZ(), SoundEvents.NOTE_BLOCK_BELL.value(), SoundSource.PLAYERS, 0.4f, 0.09f);
}
}
}
Expand Down
9 changes: 9 additions & 0 deletions src/main/resources/META-INF/neoforge.mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,15 @@ description='''${mod_description}'''
ordering="NONE"
side="BOTH"

[[dependencies.${mod_id}]]
modId="curios"
type="required"
# This version range declares a minimum of the current minecraft version up to but not including the next major version
versionRange="[1.20.6,)"
ordering="NONE"
side="BOTH"


# Features are specific properties of the game environment, that you may want to declare you require. This example declares
# that your mod requires GL version 3.2 or higher. Other features will be added. They are side aware so declaring this won't
# stop your mod loading on the server for example.
Expand Down

0 comments on commit edda193

Please sign in to comment.