diff --git a/.idea/runConfigurations/Minecraft_Server.xml b/.idea/runConfigurations/Minecraft_Server.xml index 824ebc5..e0a125a 100644 --- a/.idea/runConfigurations/Minecraft_Server.xml +++ b/.idea/runConfigurations/Minecraft_Server.xml @@ -12,5 +12,5 @@ - + \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index ae3a4c1..98d6b48 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,15 +2,15 @@ org.gradle.jvmargs=-Xmx2G # Fabric Properties - # check these on https://modmuss50.me/fabric.html - minecraft_version=1.21.5 - yarn_mappings=1.21.5+build.1 - loader_version=0.16.12 +# check these on https://modmuss50.me/fabric.html +minecraft_version=1.21 +yarn_mappings=1.21+build.9 +loader_version=0.16.0 - #Fabric api - fabric_version=0.119.9+1.21.5 +#Fabric api +fabric_version=0.100.8+1.21 # Mod Properties - mod_version = 1.0 - maven_group = com.expvintl - archives_base_name = MCTools \ No newline at end of file +mod_version = 1.0 +maven_group = com.expvintl +archives_base_name = MCTools \ No newline at end of file diff --git a/src/main/java/com/expvintl/mctools/commands/CAutoToolCommand.java b/src/main/java/com/expvintl/mctools/commands/CAutoToolCommand.java index 4c24ed6..e42bcfa 100644 --- a/src/main/java/com/expvintl/mctools/commands/CAutoToolCommand.java +++ b/src/main/java/com/expvintl/mctools/commands/CAutoToolCommand.java @@ -15,6 +15,7 @@ import com.mojang.brigadier.context.CommandContext; import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource; import net.minecraft.block.*; import net.minecraft.client.MinecraftClient; +import net.minecraft.client.network.PlayerListEntry; import net.minecraft.component.DataComponentTypes; import net.minecraft.component.type.AttributeModifiersComponent; import net.minecraft.enchantment.Enchantments; @@ -75,7 +76,7 @@ public class CAutoToolCommand { if(FeaturesSettings.INSTANCE.autoToolIncludePlayer.getValue()&&event.target.isPlayer()) return; float bestScore=-1; int slot=-1; - for(int i=0;i, EntityAttributeModifier> baseDamage=(attentry, modify)->{ - if(attentry.matches(EntityAttributes.ATTACK_DAMAGE)){ + if(attentry.matches(EntityAttributes.GENERIC_ATTACK_DAMAGE)){ //计算基础伤害 damageHolder [0]= (float)modify.value(); }