Преглед изворни кода

调整数个编译相关的问题

LTCatt пре 5 година
родитељ
комит
8e3fd8b8d6

+ 1 - 1
.gitignore

@@ -13,7 +13,7 @@ out
 *.iml
 .idea/workspace.xml
 .idea/*/
-!.idea/runConfigurations/
+.idea/gradle.xml
 
 # gradle
 build

+ 2 - 1
.idea/gradle.xml

@@ -4,7 +4,8 @@
   <component name="GradleSettings">
     <option name="linkedExternalProjectsSettings">
       <GradleProjectSettings>
-        <option name="disableWrapperSourceDistributionNotification" value="true" />
+        <option name="delegatedBuild" value="false" />
+        <option name="testRunner" value="PLATFORM" />
         <option name="distributionType" value="DEFAULT_WRAPPED" />
         <option name="externalProjectPath" value="$PROJECT_DIR$" />
         <option name="gradleJvm" value="1.8" />

+ 4 - 0
build.gradle

@@ -148,4 +148,8 @@ publishing {
             url "file:///${project.projectDir}/mcmodsrepo"
         }
     }
+}
+
+tasks.withType(JavaCompile) {
+    options.encoding = "UTF-8"
 }

+ 0 - 1
src/main/java/com/hexdragon/blacksmithre/enchantment/DecayCurseEnchantment.java

@@ -5,7 +5,6 @@ import net.minecraft.enchantment.EnchantmentType;
 import net.minecraft.inventory.EquipmentSlotType;
 
 // 腐朽诅咒:拥有这个附魔的工具在 修补、合并、从经验修补获得耐久度 时增加的耐久度下降 70%
-// 测试Push
 public class DecayCurseEnchantment extends Enchantment {
     public DecayCurseEnchantment() {super(Rarity.VERY_RARE, EnchantmentType.BREAKABLE, new EquipmentSlotType[]{EquipmentSlotType.MAINHAND});}
 

+ 2 - 3
src/main/java/com/hexdragon/corere/item/EnchantmentHelperRe.java

@@ -1,6 +1,5 @@
 package com.hexdragon.corere.item;
 
-import com.sun.istack.internal.NotNull;
 import net.minecraft.enchantment.Enchantment;
 import net.minecraft.enchantment.EnchantmentHelper;
 import net.minecraft.item.ItemStack;
@@ -11,12 +10,12 @@ import java.util.stream.Collectors;
 public class EnchantmentHelperRe {
 
     // 获取物品的所有诅咒附魔
-    public static Map<Enchantment, Integer> getCurseEnchantments(@NotNull ItemStack stack) {
+    public static Map<Enchantment, Integer> getCurseEnchantments(ItemStack stack) {
         return EnchantmentHelper.getEnchantments(stack).entrySet().stream().filter((pair) -> pair.getKey().isCurse()).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
     }
 
     // 获取物品的所有非诅咒附魔
-    public static Map<Enchantment, Integer> getNonCurseEnchantments(@NotNull ItemStack stack) {
+    public static Map<Enchantment, Integer> getNonCurseEnchantments(ItemStack stack) {
         return EnchantmentHelper.getEnchantments(stack).entrySet().stream().filter((pair) -> !pair.getKey().isCurse()).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
     }
 

+ 1 - 2
src/main/resources/META-INF/mods.toml

@@ -32,8 +32,7 @@ displayName = "Blacksmith: Rebirth" #mandatory
 authors = "Hex Dragon" #optional
 # The description text for the mod (multi line!) (#mandatory)
 description = '''
-by LTCat, 00ll00 and HerobrineXia
-'''
+by LTCat, 00ll00 and HerobrineXia'''
 # A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional.
 [[dependencies.blacksmithre]] #optional
 # the modid of the dependency