Skip to content

Commit

Permalink
v1.1
Browse files Browse the repository at this point in the history
See change log
  • Loading branch information
De6ris committed Mar 18, 2024
1 parent a7fe898 commit 8f19a72
Show file tree
Hide file tree
Showing 26 changed files with 734 additions and 225 deletions.
22 changes: 22 additions & 0 deletions changeLogs/v1.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# v1.0

### 进入游戏, 设置, OMMC按键设置, 即可查看菜单.

---


## 新功能

* 自动前进
* 自动向左
* 自动后退
* 自动向后
* 自动跳跃
* 自动潜行
* 自动攻击
* 长按右键
* 自动合成(开发中)
* 渲染实体(开发中)
* 快速飞行
* 复制tp坐标
* 切换游戏模式
25 changes: 25 additions & 0 deletions changeLogs/v1.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# v1.1

### 进入游戏, 设置, OMMC按键设置, 即可查看菜单.

### 配置文件目录在 "configs/OMMCTweaks.json"(用于储存按键绑定)

### 以及 "configs/OhMyMiteClient.json"(用于配置数值)

---

## 通知

本模组将迁移至FML3.0.0, 这可能是FML2.0.0的最后一个版本

## 新功能

* 自动合成
* 禁止渲染生物

## 更改

**快速飞行*支持了升降速度
* *渲染实体*功能开发完毕, 改名为*禁止渲染生物*
* 重构了配置系统, 现在退出游戏时会保留按键功能开启情况
* 现在原版按键设置界面中, 如果与OMMC按键冲突也会标红了
4 changes: 2 additions & 2 deletions src/com/github/Debris/oh_my_mite_client/OhMyMiteClient.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.github.Debris.oh_my_mite_client;

import com.github.Debris.oh_my_mite_client.config.Config;
import com.github.Debris.oh_my_mite_client.config.FishConfig;
import com.github.Debris.oh_my_mite_client.mixins.MixinMarker;
import net.xiaoyu233.fml.AbstractMod;
import net.xiaoyu233.fml.classloading.Mod;
Expand All @@ -17,7 +17,7 @@ public class OhMyMiteClient extends AbstractMod {

public static final String MOD_ID = "OhMyMiteClient";

private static final ConfigRegistry CONFIG_REGISTRY = new ConfigRegistry(Config.ROOT, new File(MOD_ID + ".json"));
private static final ConfigRegistry CONFIG_REGISTRY = new ConfigRegistry(FishConfig.ROOT, new File(MOD_ID + ".json"));


@Override
Expand Down
28 changes: 28 additions & 0 deletions src/com/github/Debris/oh_my_mite_client/config/ConfigUtils.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package com.github.Debris.oh_my_mite_client.config;

import com.google.gson.JsonObject;

import java.util.List;

public class ConfigUtils {
public static void readConfigBase(JsonObject root, String category, List<TweakToggle> options) {
JsonObject obj = JsonUtils.getNestedObject(root, category, false);

if (obj != null) {
for (IConfigBase option : options) {
String name = option.getName();

if (obj.has(name)) {
option.setValueFromJsonElement(obj.get(name));
}
}
}
}

public static void writeConfigBase(JsonObject root, String category, List<TweakToggle> options) {
JsonObject obj = JsonUtils.getNestedObject(root, category, true);
for (TweakToggle option : options) {
obj.add(option.getName(), option.getAsJsonElement());
}
}
}
95 changes: 0 additions & 95 deletions src/com/github/Debris/oh_my_mite_client/config/FeatureToggle.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
import net.xiaoyu233.fml.config.ConfigEntry;
import net.xiaoyu233.fml.util.FieldReference;

public class Config {
public class FishConfig {
public static final FieldReference<Integer> ATTACK_INTERVAL = new FieldReference<>(500);
public static final FieldReference<Float> FLYING_SPEED = new FieldReference<>(0.99F);
public static final FieldReference<Float> FLYING_SPEED_LEVEL = new FieldReference<>(0.99F);
public static final FieldReference<Float> FLYING_SPEED_VERTICAL = new FieldReference<>(0.99F);

public static int gameMode = 0;

public static final ConfigCategory ROOT = ConfigCategory.of("NoClickCD")
public static final ConfigCategory ROOT = ConfigCategory.of("OMMC")
.addEntry(ConfigEntry.of("auto_attack_interval", ATTACK_INTERVAL).withComment("自动攻击间隔, 单位毫秒"))
.addEntry(ConfigEntry.of("flying_speed", FLYING_SPEED).withComment("飞行速度"));
.addEntry(ConfigEntry.of("flying_speed_level", FLYING_SPEED_LEVEL).withComment("水平飞行速度"))
.addEntry(ConfigEntry.of("flying_speed_vertical", FLYING_SPEED_LEVEL).withComment("竖直飞行速度"));
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.github.Debris.oh_my_mite_client.config;

import com.google.gson.JsonElement;

public interface IConfigBase {
String getName();
void setValueFromJsonElement(JsonElement element);
JsonElement getAsJsonElement();
}
Loading

0 comments on commit 8f19a72

Please sign in to comment.