Skip to content

Commit

Permalink
v1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Plastoid501 committed Jul 19, 2024
1 parent ba1c1c4 commit c9bf5ff
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 30 deletions.
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ org.gradle.parallel=true

# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.16.5
yarn_mappings=1.16.5+build.10
minecraft_version=1.16.3
yarn_mappings=1.16.3+build.47
loader_version=0.15.11

# Mod Properties
mod_version=1.0.1
maven_group=net.plastoid501.movement
archives_base_name=movement-in-gui-mc1.16.5
archives_base_name=movement-in-gui-mc1.16.3

# Dependencies
fabric_version=0.42.0+1.16
modmenu_version=1.16.23
fabric_version=0.25.0+build.415-1.16
modmenu_version=1.14.14
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package net.plastoid501.movement.gui;

import com.terraformersmc.modmenu.api.ConfigScreenFactory;
import com.terraformersmc.modmenu.api.ModMenuApi;
import io.github.prospector.modmenu.api.ConfigScreenFactory;
import io.github.prospector.modmenu.api.ModMenuApi;
import net.plastoid501.movement.util.FileUtil;

public class ModMenuIntegration implements ModMenuApi {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,7 @@ public void updateChildren() {
}

@Override
public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) {
if (this.client == null || this.client.player == null || this.client.world == null) {
this.method_31322(true);
} else {
this.method_31322(false);
}
super.render(matrices, mouseX, mouseY, delta);
public void renderBackground(MatrixStack matrices) {
}

public class CategoryEntry extends Entry {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
package net.plastoid501.movement.mixin;

import com.terraformersmc.modmenu.gui.ModsScreen;
import io.github.prospector.modmenu.gui.ModsScreen;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.screen.*;
import net.minecraft.client.gui.screen.option.GameOptionsScreen;
import net.minecraft.client.gui.screen.option.OptionsScreen;
import net.minecraft.client.gui.screen.options.GameOptionsScreen;
import net.minecraft.client.gui.screen.options.OptionsScreen;
import net.minecraft.client.gui.screen.pack.PackScreen;
import net.minecraft.client.network.ClientPlayerEntity;
import net.minecraft.client.option.KeyBinding;
import net.minecraft.client.options.KeyBinding;
import net.minecraft.client.util.InputUtil;
import net.plastoid501.movement.config.Configs;
import net.plastoid501.movement.gui.ConfigScreen;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;

@Mixin(ClientPlayerEntity.class)
public class ClientPlayerEntityMixin {
@Redirect(method = "tickMovement", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/option/KeyBinding;isPressed()Z"))
@Redirect(method = "tickMovement", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/options/KeyBinding;isPressed()Z"))
private boolean modifyTickMovement(KeyBinding instance) {
if (instance.isPressed()) {
return true;
Expand All @@ -33,11 +34,12 @@ private boolean modifyTickMovement(KeyBinding instance) {
//client.currentScreen instanceof TelemetryInfoScreen ||
client.currentScreen instanceof StatsScreen ||
client.currentScreen instanceof OpenToLanScreen ||
//client.currentScreen instanceof ConfirmLinkScreen ||
client.currentScreen instanceof ConfirmScreen ||
client.currentScreen instanceof PackScreen ||
//client.currentScreen instanceof CreditsAndAttributionScreen ||
client.currentScreen instanceof CreditsScreen ||
client.currentScreen instanceof ModsScreen
client.currentScreen instanceof ModsScreen ||
client.currentScreen instanceof ConfigScreen
) {
return false;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package net.plastoid501.movement.mixin;

import net.minecraft.client.option.KeyBinding;
import net.minecraft.client.options.KeyBinding;
import net.minecraft.client.util.InputUtil;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
package net.plastoid501.movement.mixin;

import com.terraformersmc.modmenu.gui.ModsScreen;
import io.github.prospector.modmenu.gui.ModsScreen;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.screen.*;
import net.minecraft.client.gui.screen.option.GameOptionsScreen;
import net.minecraft.client.gui.screen.option.OptionsScreen;
import net.minecraft.client.gui.screen.options.GameOptionsScreen;
import net.minecraft.client.gui.screen.options.OptionsScreen;
import net.minecraft.client.gui.screen.pack.PackScreen;
import net.minecraft.client.input.KeyboardInput;
import net.minecraft.client.option.KeyBinding;
import net.minecraft.client.options.KeyBinding;
import net.minecraft.client.util.InputUtil;
import net.plastoid501.movement.config.Configs;
import net.plastoid501.movement.gui.ConfigScreen;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;

@Mixin(KeyboardInput.class)
public class KeyboardInputMixin {
@Redirect(method = "tick", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/option/KeyBinding;isPressed()Z"))
@Redirect(method = "tick", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/options/KeyBinding;isPressed()Z"))
private boolean modifyTick(KeyBinding instance) {
if (instance.isPressed()) {
return true;
Expand All @@ -33,11 +34,12 @@ private boolean modifyTick(KeyBinding instance) {
//client.currentScreen instanceof TelemetryInfoScreen ||
client.currentScreen instanceof StatsScreen ||
client.currentScreen instanceof OpenToLanScreen ||
//client.currentScreen instanceof ConfirmLinkScreen ||
client.currentScreen instanceof ConfirmScreen ||
client.currentScreen instanceof PackScreen ||
//client.currentScreen instanceof CreditsAndAttributionScreen ||
client.currentScreen instanceof CreditsScreen ||
client.currentScreen instanceof ModsScreen
client.currentScreen instanceof ModsScreen ||
client.currentScreen instanceof ConfigScreen
) {
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"movement-in-gui.mixins.json"
],
"depends": {
"minecraft": ">=1.16.4 <=1.16.5"
"minecraft": ">=1.16.2 <=1.16.3"
},
"suggests": {
"another-mod": "*"
Expand Down

0 comments on commit c9bf5ff

Please sign in to comment.