This commit is contained in:
parent
5a613de1a9
commit
1d6b3db118
@ -12,5 +12,5 @@
|
||||
|
||||
</envs>
|
||||
<shortenClasspath name="ARGS_FILE"/>
|
||||
<classpathModifications><entry exclude="true" path="C:\Users\expvintl\.gradle\caches\modules-2\files-2.1\org.lwjgl\lwjgl-openal\3.3.3\daada81ceb5fc0c291fbfdd4433cb8d9423577f2\lwjgl-openal-3.3.3.jar"/><entry exclude="true" path="C:\Users\expvintl\.gradle\caches\modules-2\files-2.1\org.jcraft\jorbis\0.0.17\8872d22b293e8f5d7d56ff92be966e6dc28ebdc6\jorbis-0.0.17.jar"/><entry exclude="true" path="C:\Users\expvintl\.gradle\caches\modules-2\files-2.1\commons-codec\commons-codec\1.16.0\4e3eb3d79888d76b54e28b350915b5dc3919c9de\commons-codec-1.16.0.jar"/><entry exclude="true" path="C:\Users\expvintl\.gradle\caches\modules-2\files-2.1\org.apache.commons\commons-compress\1.26.0\659feffdd12280201c8aacb8f7be94f9a883c824\commons-compress-1.26.0.jar"/><entry exclude="true" path="C:\Users\expvintl\.gradle\caches\modules-2\files-2.1\com.ibm.icu\icu4j\73.2\61ad4ef7f9131fcf6d25c34b817f90d6da06c9e9\icu4j-73.2.jar"/><entry exclude="true" path="C:\Users\expvintl\.gradle\caches\modules-2\files-2.1\org.lwjgl\lwjgl-tinyfd\3.3.3\82d755ca94b102e9ca77283b9e2dc46d1b15fbe5\lwjgl-tinyfd-3.3.3.jar"/><entry exclude="true" path="C:\Users\expvintl\.gradle\caches\modules-2\files-2.1\org.lwjgl\lwjgl-freetype\3.3.3\a0db6c84a8becc8ca05f9dbfa985edc348a824c7\lwjgl-freetype-3.3.3.jar"/><entry exclude="true" path="C:\Users\expvintl\.gradle\caches\modules-2\files-2.1\com.mojang\patchy\2.2.10\da05971b07cbb379d002cf7eaec6a2048211fefc\patchy-2.2.10.jar"/><entry exclude="true" path="C:\Users\expvintl\.gradle\caches\modules-2\files-2.1\org.lwjgl\lwjgl-jemalloc\3.3.3\b543467b7ff3c6920539a88ee602d34098628be5\lwjgl-jemalloc-3.3.3.jar"/><entry exclude="true" path="C:\Users\expvintl\.gradle\caches\modules-2\files-2.1\org.lwjgl\lwjgl-stb\3.3.3\25dd6161988d7e65f71d5065c99902402ee32746\lwjgl-stb-3.3.3.jar"/><entry exclude="true" path="C:\Users\expvintl\.gradle\caches\modules-2\files-2.1\org.lwjgl\lwjgl\3.3.3\29589b5f87ed335a6c7e7ee6a5775f81f97ecb84\lwjgl-3.3.3.jar"/><entry exclude="true" path="C:\Users\expvintl\.gradle\caches\modules-2\files-2.1\org.lwjgl\lwjgl-glfw\3.3.3\efa1eb78c5ccd840e9f329717109b5e892d72f8e\lwjgl-glfw-3.3.3.jar"/><entry exclude="true" path="C:\Users\expvintl\.gradle\caches\modules-2\files-2.1\commons-logging\commons-logging\1.2\4bfc12adfe4842bf07b657f0369c4cb522955686\commons-logging-1.2.jar"/><entry exclude="true" path="C:\Users\expvintl\.gradle\caches\modules-2\files-2.1\org.apache.httpcomponents\httpclient\4.5.13\e5f6cae5ca7ecaac1ec2827a9e2d65ae2869cada\httpclient-4.5.13.jar"/><entry exclude="true" path="C:\Users\expvintl\.gradle\caches\modules-2\files-2.1\com.mojang\blocklist\1.0.10\5c685c5ffa94c4cd39496c7184c1d122e515ecef\blocklist-1.0.10.jar"/><entry exclude="true" path="C:\Users\expvintl\.gradle\caches\modules-2\files-2.1\org.apache.httpcomponents\httpcore\4.4.16\51cf043c87253c9f58b539c9f7e44c8894223850\httpcore-4.4.16.jar"/><entry exclude="true" path="C:\Users\expvintl\.gradle\caches\modules-2\files-2.1\com.mojang\text2speech\1.17.9\3cad216e3a7f0c19b4b394388bc9ffc446f13b14\text2speech-1.17.9.jar"/><entry exclude="true" path="C:\Users\expvintl\.gradle\caches\modules-2\files-2.1\org.lwjgl\lwjgl-opengl\3.3.3\2f6b0147078396a58979125a4c947664e98293a\lwjgl-opengl-3.3.3.jar"/></classpathModifications></configuration>
|
||||
<classpathModifications><entry exclude="true" path="C:\Users\expvintl\.gradle\caches\modules-2\files-2.1\com.mojang\text2speech\1.17.9\3cad216e3a7f0c19b4b394388bc9ffc446f13b14\text2speech-1.17.9.jar"/><entry exclude="true" path="C:\Users\expvintl\.gradle\caches\modules-2\files-2.1\com.mojang\blocklist\1.0.10\5c685c5ffa94c4cd39496c7184c1d122e515ecef\blocklist-1.0.10.jar"/><entry exclude="true" path="C:\Users\expvintl\.gradle\caches\modules-2\files-2.1\org.apache.commons\commons-compress\1.22\691a8b4e6cf4248c3bc72c8b719337d5cb7359fa\commons-compress-1.22.jar"/><entry exclude="true" path="C:\Users\expvintl\.gradle\caches\modules-2\files-2.1\org.lwjgl\lwjgl-jemalloc\3.3.2\877e17e39ebcd58a9c956dc3b5b777813de0873a\lwjgl-jemalloc-3.3.2.jar"/><entry exclude="true" path="C:\Users\expvintl\.gradle\caches\modules-2\files-2.1\org.lwjgl\lwjgl-openal\3.3.2\ae5357ed6d934546d3533993ea84c0cfb75eed95\lwjgl-openal-3.3.2.jar"/><entry exclude="true" path="C:\Users\expvintl\.gradle\caches\modules-2\files-2.1\org.lwjgl\lwjgl\3.3.2\4421d94af68e35dcaa31737a6fc59136a1e61b94\lwjgl-3.3.2.jar"/><entry exclude="true" path="C:\Users\expvintl\.gradle\caches\modules-2\files-2.1\org.apache.httpcomponents\httpclient\4.5.13\e5f6cae5ca7ecaac1ec2827a9e2d65ae2869cada\httpclient-4.5.13.jar"/><entry exclude="true" path="C:\Users\expvintl\.gradle\caches\modules-2\files-2.1\org.apache.httpcomponents\httpcore\4.4.16\51cf043c87253c9f58b539c9f7e44c8894223850\httpcore-4.4.16.jar"/><entry exclude="true" path="C:\Users\expvintl\.gradle\caches\modules-2\files-2.1\com.ibm.icu\icu4j\73.2\61ad4ef7f9131fcf6d25c34b817f90d6da06c9e9\icu4j-73.2.jar"/><entry exclude="true" path="C:\Users\expvintl\.gradle\caches\modules-2\files-2.1\commons-logging\commons-logging\1.2\4bfc12adfe4842bf07b657f0369c4cb522955686\commons-logging-1.2.jar"/><entry exclude="true" path="C:\Users\expvintl\.gradle\caches\modules-2\files-2.1\org.lwjgl\lwjgl-glfw\3.3.2\757920418805fb90bfebb3d46b1d9e7669fca2eb\lwjgl-glfw-3.3.2.jar"/><entry exclude="true" path="C:\Users\expvintl\.gradle\caches\modules-2\files-2.1\org.lwjgl\lwjgl-opengl\3.3.2\ee8e95be0b438602038bc1f02dc5e3d011b1b216\lwjgl-opengl-3.3.2.jar"/><entry exclude="true" path="C:\Users\expvintl\.gradle\caches\modules-2\files-2.1\com.mojang\patchy\2.2.10\da05971b07cbb379d002cf7eaec6a2048211fefc\patchy-2.2.10.jar"/><entry exclude="true" path="C:\Users\expvintl\.gradle\caches\modules-2\files-2.1\commons-codec\commons-codec\1.16.0\4e3eb3d79888d76b54e28b350915b5dc3919c9de\commons-codec-1.16.0.jar"/><entry exclude="true" path="C:\Users\expvintl\.gradle\caches\modules-2\files-2.1\org.lwjgl\lwjgl-tinyfd\3.3.2\9f65c248dd77934105274fcf8351abb75b34327c\lwjgl-tinyfd-3.3.2.jar"/><entry exclude="true" path="C:\Users\expvintl\.gradle\caches\modules-2\files-2.1\org.lwjgl\lwjgl-stb\3.3.2\a2550795014d622b686e9caac50b14baa87d2c70\lwjgl-stb-3.3.2.jar"/></classpathModifications></configuration>
|
||||
</component>
|
@ -3,12 +3,12 @@ org.gradle.jvmargs=-Xmx2G
|
||||
|
||||
# Fabric Properties
|
||||
# check these on https://modmuss50.me/fabric.html
|
||||
minecraft_version=1.21
|
||||
yarn_mappings=1.21+build.9
|
||||
minecraft_version=1.20.4
|
||||
yarn_mappings=1.20.4+build.3
|
||||
loader_version=0.16.0
|
||||
|
||||
#Fabric api
|
||||
fabric_version=0.100.8+1.21
|
||||
fabric_version=0.97.2+1.20.4
|
||||
|
||||
# Mod Properties
|
||||
mod_version = 1.0
|
||||
|
@ -18,7 +18,7 @@ import net.minecraft.block.BambooBlock;
|
||||
import net.minecraft.block.BambooShootBlock;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.component.DataComponentTypes;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.enchantment.Enchantments;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
@ -130,14 +130,14 @@ public class CAutoToolCommand {
|
||||
score+=item.getMiningSpeedMultiplier(state)*30;
|
||||
//附魔加分
|
||||
//耐久
|
||||
score+= Utils.GetEnchantLevel(Enchantments.UNBREAKING, item);
|
||||
score+= EnchantmentHelper.getLevel(Enchantments.UNBREAKING, item);
|
||||
//效率
|
||||
score+=Utils.GetEnchantLevel(Enchantments.EFFICIENCY,item);
|
||||
score+=EnchantmentHelper.getLevel(Enchantments.EFFICIENCY,item);
|
||||
//经验修补
|
||||
score+=Utils.GetEnchantLevel(Enchantments.MENDING,item);
|
||||
score+=EnchantmentHelper.getLevel(Enchantments.MENDING,item);
|
||||
if (item.getItem() instanceof SwordItem item1 && (state.getBlock() instanceof BambooBlock|| state.getBlock() instanceof BambooShootBlock))
|
||||
//根据挖掘等级加分
|
||||
score += 90 + (item1.getComponents().get(DataComponentTypes.TOOL).getSpeed(state) * 10);
|
||||
score += 90 + (item1.getMaterial().getMiningSpeedMultiplier() * 10);
|
||||
}
|
||||
return score;
|
||||
}
|
||||
@ -150,13 +150,13 @@ public class CAutoToolCommand {
|
||||
if (item.getItem() instanceof ToolItem tool) {
|
||||
damageScore += tool.getMaterial().getAttackDamage();
|
||||
//锋利加分
|
||||
damageScore += Utils.GetEnchantLevel(Enchantments.SHARPNESS, item) * 2;
|
||||
damageScore += EnchantmentHelper.getLevel(Enchantments.SHARPNESS, item) * 2;
|
||||
//精修
|
||||
damageScore+=Utils.GetEnchantLevel(Enchantments.MENDING,item);
|
||||
damageScore+=EnchantmentHelper.getLevel(Enchantments.MENDING,item);
|
||||
//火焰附加
|
||||
damageScore+=Utils.GetEnchantLevel(Enchantments.FIRE_ASPECT,item)*3;
|
||||
damageScore+=EnchantmentHelper.getLevel(Enchantments.FIRE_ASPECT,item)*3;
|
||||
//击退
|
||||
damageScore+=Utils.GetEnchantLevel(Enchantments.KNOCKBACK,item)*2;
|
||||
damageScore+=EnchantmentHelper.getLevel(Enchantments.KNOCKBACK,item)*2;
|
||||
}
|
||||
return damageScore;
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ public class MCInfo {
|
||||
|
||||
return timeString.toString();
|
||||
}
|
||||
public static void drawHUD(DrawContext drawContext, RenderTickCounter v) {
|
||||
public static void drawHUD(DrawContext drawContext,float v) {
|
||||
MinecraftClient mc=MinecraftClient.getInstance();
|
||||
//跳过调试
|
||||
if(mc.getDebugHud().shouldShowDebugHud()||mc.options.hudHidden) return;
|
||||
@ -67,7 +67,7 @@ public class MCInfo {
|
||||
DrawUtils.AddLeftText(drawContext,String.format("X:%.2f Y:%.2f Z:%.2f",playerPos.x,playerPos.y,playerPos.z));
|
||||
}
|
||||
DrawUtils.AddLeftText(drawContext,String.format("世界时间: %d天 (%s)",mc.world.getTimeOfDay()/24000,gameDayToRealTimeFormat(mc.world.getTimeOfDay()/24000)));
|
||||
DrawUtils.AddLeftText(drawContext,String.format("当前区块: [%d,%d]",mc.player.getChunkPos().x,mc.player.getChunkPos().z));
|
||||
DrawUtils.AddLeftText(drawContext,String.format("当前区块: [%d,%d],方块:[%d,%d,%d]",mc.player.getChunkPos().x,mc.player.getChunkPos().z,mc.player.getBlockX()&0xF,mc.player.getBlockY()&0xF,mc.player.getBlockZ()&0xF));
|
||||
DrawUtils.AddLeftText(drawContext,String.format("本地难度:%.2f",mc.world.getLocalDifficulty(mc.player.getBlockPos()).getLocalDifficulty()));
|
||||
ItemStack currentItem=p.getInventory().getMainHandStack();
|
||||
if(currentItem!=null&¤tItem.isDamageable()){
|
||||
|
@ -11,7 +11,7 @@ import net.minecraft.util.Colors;
|
||||
import java.util.Collection;
|
||||
|
||||
public class PotionInfo {
|
||||
public static void drawHUD(DrawContext drawContext, RenderTickCounter v) {
|
||||
public static void drawHUD(DrawContext drawContext, float v) {
|
||||
MinecraftClient mc=MinecraftClient.getInstance();
|
||||
//跳过调试
|
||||
if(mc.getDebugHud().shouldShowDebugHud()||mc.options.hudHidden) return;
|
||||
|
@ -41,7 +41,7 @@ public class Utils {
|
||||
|
||||
public static String getCurrentDimensionName() {
|
||||
if (mc.world != null) {
|
||||
String dismenName = mc.world.getDimensionEntry().getIdAsString();
|
||||
String dismenName = mc.world.getDimensionKey().getValue().toString();
|
||||
switch (dismenName) {
|
||||
case "minecraft:overworld":
|
||||
return "主世界";
|
||||
@ -196,18 +196,18 @@ public class Utils {
|
||||
return "未知";
|
||||
}
|
||||
|
||||
public static int GetEnchantLevel(RegistryKey<Enchantment> enchantName, ItemStack item){
|
||||
//跳过附魔书
|
||||
if(item.getItem()== Items.ENCHANTED_BOOK) return 0;
|
||||
Set<Object2IntMap.Entry<RegistryEntry<Enchantment>>> enchants=item.getEnchantments().getEnchantmentEntries();
|
||||
for(Object2IntMap.Entry<RegistryEntry<Enchantment>> entry:enchants){
|
||||
//返回找到的附魔等级
|
||||
if(entry.getKey().matchesKey(enchantName)) {
|
||||
return entry.getIntValue();
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
// public static int GetEnchantLevel(RegistryKey<Enchantment> enchantName, ItemStack item){
|
||||
// //跳过附魔书
|
||||
// if(item.getItem()== Items.ENCHANTED_BOOK) return 0;
|
||||
// Set<Object2IntMap.Entry<RegistryEntry<Enchantment>>> enchants=item.getEnchantments().getEnchantmentEntries();
|
||||
// for(Object2IntMap.Entry<RegistryEntry<Enchantment>> entry:enchants){
|
||||
// //返回找到的附魔等级
|
||||
// if(entry.getKey().matchesKey(enchantName)) {
|
||||
// return entry.getIntValue();
|
||||
// }
|
||||
// }
|
||||
// return 0;
|
||||
// }
|
||||
public static void rightClick() {
|
||||
((MinecraftClientAccessor) mc).doItemUse();
|
||||
}
|
||||
|
@ -21,6 +21,6 @@
|
||||
"depends": {
|
||||
"fabricloader": ">=0.8.0",
|
||||
"fabric": "*",
|
||||
"minecraft": "~1.21"
|
||||
"minecraft": "~1.20.4"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user