Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into master-ame
Browse files Browse the repository at this point in the history
# Conflicts:
#	README.md
#	build.gradle
#	gradle.properties
#	gradle/wrapper/gradle-wrapper.jar
#	gradle/wrapper/gradle-wrapper.properties
#	gradlew
#	gradlew.bat
#	src/main/java/meteordevelopment/meteorclient/MeteorClient.java
#	src/main/java/meteordevelopment/meteorclient/mixin/ChatInputSuggestorMixin.java
#	src/main/java/meteordevelopment/meteorclient/mixin/ChatScreenMixin.java
#	src/main/java/meteordevelopment/meteorclient/mixin/TitleScreenMixin.java
#	src/main/java/meteordevelopment/meteorclient/systems/commands/Commands.java
#	src/main/java/meteordevelopment/meteorclient/systems/commands/commands/NameHistoryCommand.java
#	src/main/java/meteordevelopment/meteorclient/systems/config/Config.java
#	src/main/java/meteordevelopment/meteorclient/systems/modules/combat/KillAura.java
#	src/main/java/meteordevelopment/meteorclient/systems/modules/misc/DiscordPresence.java
#	src/main/java/meteordevelopment/meteorclient/systems/modules/player/AutoTool.java
#	src/main/java/meteordevelopment/meteorclient/systems/modules/render/blockesp/BlockESP.java
#	src/main/java/meteordevelopment/meteorclient/utils/misc/MeteorStarscript.java
#	src/main/java/meteordevelopment/meteorclient/utils/player/PathFinder.java
  • Loading branch information
JFronny committed Mar 18, 2023
2 parents df7528b + 35456ff commit c978052
Show file tree
Hide file tree
Showing 221 changed files with 4,076 additions and 2,385 deletions.
22 changes: 22 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
## Type of change

- [ ] Bug fix
- [ ] New feature

## Description

A summary of the changes along with the reasoning behind the changes.

## Related issues

Mention any issues that this pr relates to.

# How Has This Been Tested?

Videos or screenshots of the changes if applicable.

# Checklist:

- [ ] My code follows the style guidelines of this project.
- [ ] I have added comments to my code in more complex areas.
- [ ] I have tested the code in both development and production environments.
33 changes: 33 additions & 0 deletions .github/workflows/issue-moderator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Issue automatic actions

on:
issues:
types: [opened]

permissions:
issues: write

jobs:
issue-moderator:
runs-on: ubuntu-latest
steps:
- name: Similarity analysis
uses: actions-cool/issues-similarity-analysis@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
filter-threshold: 0.60
title-excludes: ''
comment-title: |
### Your issue looks similar to these issues:
Please close if duplicate.
comment-body: '${index}. ${similarity} #${number}'
- uses: actions/checkout@v2
- name: Automatically close issues that don't follow the issue template
uses: lucasbento/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
issue-close-message: |
@${issue.user.login}: hello! :wave:
This issue is being automatically closed because it does not follow the issue template."
closed-issues-label: "invalid"

23 changes: 15 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'fabric-loom' version '1.0-SNAPSHOT'
id 'maven-publish'
id 'com.github.johnrengelman.shadow' version '7.1.2'
id "fabric-loom" version "1.1-SNAPSHOT"
id "maven-publish"
id "com.github.johnrengelman.shadow" version "7.1.2"
}

sourceCompatibility = targetCompatibility = JavaVersion.VERSION_17
Expand Down Expand Up @@ -45,18 +45,19 @@ configurations {

dependencies {
// Fabric
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"

// Fabric API
// Fabric API
modImplementation("net.fabricmc.fabric-api:fabric-api:${project.fapi_version}")
shadow(fabricApi.module("fabric-api-base", project.fapi_version)) {
transitive = false
}

// Compat fixes
modCompileOnly("maven.modrinth:sodium:${project.sodium_version}") { transitive = false }
modCompileOnly("maven.modrinth:lithium:${project.lithium_version}") { transitive = false }
//modCompileOnly("io.vram:canvas-fabric-mc119:1.0.+") { transitive = false } // TODO: 1.19.3

// Baritone (https://github.com/MeteorDevelopment/baritone)
Expand Down Expand Up @@ -86,6 +87,12 @@ afterEvaluate {

shadowJar {
configurations = [ project.configurations.shadow ]

dependencies {
exclude {
it.moduleGroup == "org.slf4j"
}
}
}

processResources {
Expand All @@ -104,7 +111,7 @@ remapJar {
}

javadoc {
options.addStringOption('Xdoclint:none', '-quiet')
options.addStringOption("Xdoclint:none", "-quiet")
options.encoding = "UTF-8"
}

Expand Down
17 changes: 10 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
org.gradle.jvmargs=-Xmx2G

# Fabric (https://fabricmc.net/develop)
minecraft_version=1.19.3
yarn_mappings=1.19.3+build.2
loader_version=0.14.11
fapi_version=0.69.1+1.19.3
minecraft_version=1.19.4
yarn_mappings=1.19.4+build.1
loader_version=0.14.17
fapi_version=0.75.3+1.19.4

# Mod Properties
mod_version=0.5.2
mod_version=0.5.3
maven_group=meteordevelopment
archives_base_name=meteor-client

# Dependency Versions

# Sodium (https://github.com/CaffeineMC/sodium-fabric)
sodium_version=mc1.19.3-0.4.6
sodium_version=mc1.19.4-0.4.10

# Lithium (https://github.com/CaffeineMC/lithium-fabric)
lithium_version=mc1.19.4-0.11.1

# Orbit (https://github.com/MeteorDevelopment/orbit)
orbit_version=0.2.3
Expand All @@ -23,7 +26,7 @@ orbit_version=0.2.3
starscript_version=0.2.2

# LibJF (https://gitlab.com/jfmods/libjf)
libjf_version=3.3.1
libjf_version=3.7.0

# Reflections (https://github.com/ronmamo/reflections)
reflections_version=0.10.2
Expand Down
23 changes: 16 additions & 7 deletions src/main/java/meteordevelopment/meteorclient/MeteorClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,25 @@

public class MeteorClient implements ClientModInitializer {
public static final String MOD_ID = "meteor-client";
public static final ModMetadata MOD_META = FabricLoader.getInstance().getModContainer(MOD_ID).get().getMetadata();
public final static Version VERSION;
public final static String DEV_BUILD = "";
public static final ModMetadata MOD_META;
public static final String NAME;
public static final Version VERSION;
public static final String DEV_BUILD = "";

public static MeteorClient INSTANCE;
public static MeteorAddon ADDON;

public static MinecraftClient mc;
public static MeteorClient INSTANCE;
public static final IEventBus EVENT_BUS = new EventBus();
public static final File FOLDER = new File(FabricLoader.getInstance().getGameDir().toString(), MOD_ID);
public static final Logger LOG = LoggerFactory.getLogger("Meteor Client");
public static final File FOLDER = FabricLoader.getInstance().getGameDir().resolve(MOD_ID).toFile();
public static final Logger LOG;

static {
MOD_META = FabricLoader.getInstance().getModContainer(MOD_ID).orElseThrow().getMetadata();

NAME = MOD_META.getName();
LOG = LoggerFactory.getLogger(NAME);

String versionString = MOD_META.getVersion().getFriendlyString();
if (versionString.contains("-")) versionString = versionString.split("-")[0];

Expand All @@ -62,12 +69,14 @@ public class MeteorClient implements ClientModInitializer {

@Override
public void onInitializeClient() {
KeyBinds.ensureInitialized();

if (INSTANCE == null) {
INSTANCE = this;
return;
}

LOG.info("Initializing Meteor Client");
LOG.info("Initializing {}", NAME);

// Global minecraft client accessor
mc = MinecraftClient.getInstance();
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/meteordevelopment/meteorclient/MixinPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public class MixinPlugin implements IMixinConfigPlugin {
private static boolean isOriginsPresent;
private static boolean isSodiumPresent;
private static boolean isCanvasPresent;
private static boolean isLithiumPresent;

@Override
public void onLoad(String mixinPackage) {
Expand All @@ -29,6 +30,7 @@ public void onLoad(String mixinPackage) {
isOriginsPresent = FabricLoader.getInstance().isModLoaded("origins");
isSodiumPresent = FabricLoader.getInstance().isModLoaded("sodium");
isCanvasPresent = FabricLoader.getInstance().isModLoaded("canvas");
isLithiumPresent = FabricLoader.getInstance().isModLoaded("lithium");

loaded = true;
}
Expand All @@ -52,6 +54,9 @@ else if (mixinClassName.startsWith(mixinPackage + ".sodium")) {
else if (mixinClassName.startsWith(mixinPackage + ".canvas")) {
return isCanvasPresent;
}
else if (mixinClassName.startsWith(mixinPackage + ".lithium")) {
return isLithiumPresent;
}


return true;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* This file is part of the Meteor Client distribution (https://github.com/MeteorDevelopment/meteor-client).
* Copyright (c) Meteor Development.
*/

package meteordevelopment.meteorclient.events.entity.player;

public class BlockBreakingCooldownEvent {
private static final BlockBreakingCooldownEvent INSTANCE = new BlockBreakingCooldownEvent();

public int cooldown;

public static BlockBreakingCooldownEvent get(int cooldown) {
INSTANCE.cooldown = cooldown;
return INSTANCE;
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
package meteordevelopment.meteorclient.events.packets;

import meteordevelopment.meteorclient.events.Cancellable;
import net.minecraft.network.Packet;
import net.minecraft.network.packet.Packet;

public class PacketEvent extends Cancellable {
public Packet<?> packet;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,22 @@

package meteordevelopment.meteorclient.events.world;

import meteordevelopment.meteorclient.events.Cancellable;
import net.minecraft.block.BlockState;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.shape.VoxelShape;

public class CollisionShapeEvent {
public enum CollisionType {
BLOCK,
FLUID
}

public class CollisionShapeEvent extends Cancellable {
private static final CollisionShapeEvent INSTANCE = new CollisionShapeEvent();

public BlockState state;
public BlockPos pos;
public VoxelShape shape;
public CollisionType type;

public static CollisionShapeEvent get(BlockState state, BlockPos pos, CollisionType type) {
public static CollisionShapeEvent get(BlockState state, BlockPos pos, VoxelShape shape) {
INSTANCE.state = state;
INSTANCE.pos = pos;
INSTANCE.shape = null;
INSTANCE.type = type;
INSTANCE.shape = shape;
return INSTANCE;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public DefaultSettingsWidgetFactory(GuiTheme theme) {
factories.put(StatusEffectAmplifierMapSetting.class, (table, setting) -> statusEffectAmplifierMapW(table, (StatusEffectAmplifierMapSetting) setting));
factories.put(StatusEffectListSetting.class, (table, setting) -> statusEffectListW(table, (StatusEffectListSetting) setting));
factories.put(StorageBlockListSetting.class, (table, setting) -> storageBlockListW(table, (StorageBlockListSetting) setting));
factories.put(ScreenHandlerListSetting.class, (table, setting) -> screenHandlerListW(table, (ScreenHandlerListSetting) setting));
factories.put(BlockDataSetting.class, (table, setting) -> blockDataW(table, (BlockDataSetting<?>) setting));
factories.put(PotionSetting.class, (table, setting) -> potionW(table, (PotionSetting) setting));
factories.put(StringListSetting.class, (table, setting) -> stringListW(table, (StringListSetting) setting));
Expand Down Expand Up @@ -229,9 +230,14 @@ private void colorW(WTable table, ColorSetting setting) {
}

private void keybindW(WTable table, KeybindSetting setting) {
WKeybind keybind = table.add(theme.keybind(setting.get(), setting.getDefaultValue())).expandX().widget();
WHorizontalList list = table.add(theme.horizontalList()).expandX().widget();

WKeybind keybind = list.add(theme.keybind(setting.get(), setting.getDefaultValue())).expandX().widget();
keybind.action = setting::onChanged;
setting.widget = keybind;

WButton reset = list.add(theme.button(GuiRenderer.RESET)).expandCellX().right().widget();
reset.action = keybind::resetBind;
}

private void blockW(WTable table, BlockSetting setting) {
Expand Down Expand Up @@ -320,6 +326,10 @@ private void storageBlockListW(WTable table, StorageBlockListSetting setting) {
selectW(table, setting, () -> mc.setScreen(new StorageBlockListSettingScreen(theme, setting)));
}

private void screenHandlerListW(WTable table, ScreenHandlerListSetting setting) {
selectW(table, setting, () -> mc.setScreen(new ScreenHandlerSettingScreen(theme, setting)));
}

private void blockDataW(WTable table, BlockDataSetting<?> setting) {
WButton button = table.add(theme.button(GuiRenderer.EDIT)).expandCellX().widget();
button.action = () -> mc.setScreen(new BlockDataSettingScreen(theme, setting));
Expand Down
Loading

0 comments on commit c978052

Please sign in to comment.