Skip to content

Commit d67e0d8

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 0c9f171 + ac7e8f0 commit d67e0d8

File tree

8 files changed

+30
-48
lines changed

8 files changed

+30
-48
lines changed

.github/workflows/auto_snapshot_update.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,14 @@ jobs:
6161

6262
- name: Migrate mappings
6363
run: |
64-
./gradlew migrateMappings --mappings ${{ inputs.yarn_mappings }} --overrideInputsIHaveABackup
65-
./gradlew migrateTestMappings --mappings ${{ inputs.yarn_mappings }} --overrideInputsIHaveABackup
66-
./gradlew migrateClassTweakerMappings --mappings ${{ inputs.yarn_mappings }} --overrideInputsIHaveABackup
64+
./gradlew migrateMappings --mappings "net.minecraft:mappings:${{ inputs.mc_version }}" --overrideInputsIHaveABackup
65+
./gradlew migrateGametestMappings --mappings "net.minecraft:mappings:${{ inputs.mc_version }}" --overrideInputsIHaveABackup
66+
./gradlew migrateClassTweakerMappings --mappings "net.minecraft:mappings:${{ inputs.mc_version }}" --overrideInputsIHaveABackup
6767
6868
- name: Update version constants
6969
run: |
7070
python scripts/update_version_constants.py \
7171
"${{ inputs.mc_version }}" \
72-
"${{ inputs.yarn_mappings }}" \
7372
"${{ inputs.fabric_loader }}" \
7473
"${{ inputs.fapi_version }}"
7574

scripts/update_version_constants.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import re
33

44

5-
def update_gradle_properties(mc_version, yarn_mappings, fabric_loader, fapi_version):
5+
def update_gradle_properties(mc_version, fabric_loader, fapi_version):
66
print("Updating gradle.properties...")
77

88
# Read gradle.properties
@@ -12,7 +12,6 @@ def update_gradle_properties(mc_version, yarn_mappings, fabric_loader, fapi_vers
1212
# Define replacements
1313
replacements = {
1414
"minecraft_version": lambda v: mc_version,
15-
"yarn_mappings": lambda v: yarn_mappings,
1615
"loader_version": lambda v: fabric_loader,
1716
"fabric_version": lambda v: fapi_version,
1817
"mod_version": lambda v: v[: v.index("MC") + 2] + mc_version,
@@ -70,14 +69,12 @@ def update_mc_version_constant(mc_version):
7069
if __name__ == "__main__":
7170
parser = argparse.ArgumentParser()
7271
parser.add_argument("mc_version", help="Minecraft version")
73-
parser.add_argument("yarn_mappings", help="Yarn mappings version")
7472
parser.add_argument("fabric_loader", help="Fabric Loader version")
7573
parser.add_argument("fapi_version", help="Fabric API version")
7674
args = parser.parse_args()
7775

7876
update_gradle_properties(
7977
args.mc_version,
80-
args.yarn_mappings,
8178
args.fabric_loader,
8279
args.fapi_version,
8380
)

src/main/java/net/wurstclient/hacks/SafeWalkHack.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ private void setSneaking(boolean sneaking)
8181
IKeyBinding sneakKey = IKeyBinding.get(MC.options.keyShift);
8282

8383
if(sneaking)
84-
sneakKey.setPressed(true);
84+
sneakKey.setDown(true);
8585
else
8686
sneakKey.resetPressedState();
8787

src/main/java/net/wurstclient/hacks/SneakHack.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public void onPreMotion()
8383
if(offWhileFlying.isChecked() && isFlying())
8484
sneakKey.resetPressedState();
8585
else
86-
sneakKey.setPressed(true);
86+
sneakKey.setDown(true);
8787
break;
8888

8989
case PACKET:

src/main/java/net/wurstclient/mixin/KeyBindingMixin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public abstract class KeyBindingMixin implements IKeyBinding
2929
@Override
3030
@Unique
3131
@Deprecated // use IKeyBinding.resetPressedState() instead
32-
public void wurst_resetPressedState()
32+
public void resetPressedState()
3333
{
3434
Window window = WurstClient.MC.getWindow();
3535
int code = key.getValue();
@@ -43,7 +43,7 @@ public void wurst_resetPressedState()
4343
@Override
4444
@Unique
4545
@Deprecated // use IKeyBinding.simulatePress() instead
46-
public void wurst_simulatePress(boolean pressed)
46+
public void simulatePress(boolean pressed)
4747
{
4848
Minecraft mc = WurstClient.MC;
4949
Window window = mc.getWindow();

src/main/java/net/wurstclient/mixinterface/IKeyBinding.java

Lines changed: 17 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -11,53 +11,37 @@
1111

1212
public interface IKeyBinding
1313
{
14-
/**
15-
* Resets the pressed state to whether or not the user is actually pressing
16-
* this key on their keyboard.
17-
*/
18-
public default void resetPressedState()
14+
static IKeyBinding get(KeyMapping key)
1915
{
20-
wurst_resetPressedState();
16+
return (IKeyBinding)key;
2117
}
2218

23-
/**
24-
* Simulates the user pressing this key on their keyboard or mouse. This is
25-
* much more aggressive than using {@link #setPressed(boolean)} and should
26-
* be used sparingly.
27-
*/
28-
public default void simulatePress(boolean pressed)
19+
default KeyMapping asVanilla()
2920
{
30-
wurst_simulatePress(pressed);
21+
return (KeyMapping)this;
3122
}
3223

33-
public default void setPressed(boolean pressed)
24+
default void setPressed(boolean value)
3425
{
35-
asVanilla().setDown(pressed);
26+
asVanilla().setDown(value);
3627
}
3728

38-
public default KeyMapping asVanilla()
29+
default boolean isPressed()
3930
{
40-
return (KeyMapping)this;
31+
return asVanilla().isDown();
32+
}
33+
34+
default void setDown(boolean value)
35+
{
36+
setPressed(value);
4137
}
4238

43-
/**
44-
* Returns the given KeyBinding object as an IKeyBinding, allowing you to
45-
* access the resetPressedState() method.
46-
*/
47-
public static IKeyBinding get(KeyMapping kb)
39+
default boolean isDown()
4840
{
49-
return (IKeyBinding)kb;
41+
return isPressed();
5042
}
5143

52-
/**
53-
* @deprecated Use {@link #resetPressedState()} instead.
54-
*/
55-
@Deprecated
56-
public void wurst_resetPressedState();
44+
void resetPressedState();
5745

58-
/**
59-
* @deprecated Use {@link #simulatePress()} instead.
60-
*/
61-
@Deprecated
62-
public void wurst_simulatePress(boolean pressed);
46+
void simulatePress(boolean pressed);
6347
}

src/main/java/net/wurstclient/navigator/NavigatorNewKeybindScreen.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414
import org.lwjgl.glfw.GLFW;
1515

16+
import com.mojang.blaze3d.platform.InputConstants;
17+
1618
import net.fabricmc.fabric.api.client.screen.v1.Screens;
1719
import net.minecraft.client.gui.Font;
1820
import net.minecraft.client.gui.GuiGraphics;

src/main/resources/wurst.accesswidener

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ accessible field net/minecraft/client/multiplayer/MultiPlayerGameMode destroyPro
3333
accessible field net/minecraft/client/renderer/RenderType$CompositeRenderType state Lnet/minecraft/client/renderer/RenderType$CompositeState;
3434
accessible field net/minecraft/client/renderer/RenderType$CompositeRenderType renderPipeline Lcom/mojang/blaze3d/pipeline/RenderPipeline;
3535
accessible field net/minecraft/client/renderer/RenderType$CompositeState outputState Lnet/minecraft/client/renderer/RenderStateShard$OutputStateShard;
36-
accessible field net/minecraft/client/gui/components/toasts/ToastManager queued Ljava/util/Deque;
37-
accessible field net/minecraft/client/gui/components/BossHealthOverlay events Ljava/util/Map;
36+
accessible field net/minecraft/client/gui/components/toasts/ToastManager queued Ljava/util/Deque;
37+
accessible field net/minecraft/client/gui/components/BossHealthOverlay events Ljava/util/Map;
3838
accessible field net/minecraft/world/entity/Entity stuckSpeedMultiplier Lnet/minecraft/world/phys/Vec3;
3939
accessible field net/minecraft/world/entity/LivingEntity equipment Lnet/minecraft/world/entity/EntityEquipment;
4040
accessible field net/minecraft/world/entity/LivingEntity jumping Z
41-
accessible field net/minecraft/network/protocol/game/ClientboundSectionBlocksUpdatePacket sectionPos Lnet/minecraft/core/SectionPos;
41+
accessible field net/minecraft/network/protocol/game/ClientboundSectionBlocksUpdatePacket sectionPos Lnet/minecraft/core/SectionPos;

0 commit comments

Comments
 (0)