diff --git a/build.gradle b/build.gradle index b241826..7105851 100644 --- a/build.gradle +++ b/build.gradle @@ -11,7 +11,7 @@ buildscript { apply plugin: 'net.minecraftforge.gradle' group = 'com.snek152.swordselection' -version = '0.2.0-1.16.5' +version = '1.16.5-0.2.1' archivesBaseName = 'swordselection' java.toolchain.languageVersion = JavaLanguageVersion.of(8) // Mojang ships Java 8 to end users, so your mod should target Java 8. @@ -151,3 +151,21 @@ jar { } jar.finalizedBy('reobfJar') + +processResources { + // This will ensure that this task is redone when the versions change. + inputs.property 'version', project.version + + // Replace stuff in mods.toml, nothing else + from(sourceSets.main.resources.srcDirs) { + include 'META-INF/mods.toml' + + // Replace version + expand 'version':project.version + } + + // Copy everything else except the mods.toml + from(sourceSets.main.resources.srcDirs) { + exclude 'META-INF/mods.toml' + } +} \ No newline at end of file diff --git a/src/main/java/com/snek152/swordselection/item/ModItems.java b/src/main/java/com/snek152/swordselection/item/ModItems.java index 10c12b3..3f20167 100644 --- a/src/main/java/com/snek152/swordselection/item/ModItems.java +++ b/src/main/java/com/snek152/swordselection/item/ModItems.java @@ -20,7 +20,7 @@ public class ModItems { new Item.Properties() .defaultMaxDamage(210) .group(ItemGroup.COMBAT) - .addToolType(ToolType.PICKAXE,0))); + .addToolType(ToolType.HOE,0))); // Iron broadsword public static final RegistryObject IRON_BROADSWORD = @@ -38,6 +38,29 @@ public class ModItems { .defaultMaxDamage(250) .group(ItemGroup.COMBAT))); + // Stone sickles + public static final RegistryObject STONE_SICKLES = + Registration.ITEMS.register("stone_sickles", + () -> new SwordItem(ItemTier.STONE, 0,-1.2f, + new Item.Properties() + .defaultMaxDamage(91) + .group(ItemGroup.COMBAT) + .addToolType(ToolType.HOE,0))); + // Stone broadsword + public static final RegistryObject STONE_BROADSWORD = + Registration.ITEMS.register("stone_broadsword", + () -> new BroadSword(ItemTier.STONE, 5,-3.4f, + new Item.Properties() + .defaultMaxDamage(142) + .group(ItemGroup.COMBAT))); + + // Stone longsword + public static final RegistryObject STONE_LONGSWORD = + Registration.ITEMS.register("stone_longsword", + () -> new Longsword(ItemTier.STONE, 4,-2.4f, + new Item.Properties() + .defaultMaxDamage(131) + .group(ItemGroup.COMBAT))); public static void register() {} } diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 2d8b629..82ee6ee 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -8,7 +8,7 @@ logoFile="swordselection.png" #optional [[mods]] #mandatory modId="swordselection" #mandatory -version="0.2.0" #mandatory +version="${version}" #mandatory displayName="Sword Selection" #mandatory #updateJSONURL="http://myurl.me/" #optional #displayURL="http://example.com/" #optional diff --git a/src/main/resources/assets/swordselection/lang/en_us.json b/src/main/resources/assets/swordselection/lang/en_us.json index 31d6620..7759c7b 100644 --- a/src/main/resources/assets/swordselection/lang/en_us.json +++ b/src/main/resources/assets/swordselection/lang/en_us.json @@ -1,5 +1,8 @@ { "item.swordselection.iron_sickles": "Iron Sickles", "item.swordselection.iron_broadsword": "Iron Broadsword", - "item.swordselection.iron_longsword": "Iron Longsword" + "item.swordselection.iron_longsword": "Iron Longsword", + "item.swordselection.stone_sickles": "Stone Sickles", + "item.swordselection.stone_broadsword": "Stone Broadsword", + "item.swordselection.stone_longsword": "Stone Longsword" } \ No newline at end of file diff --git a/src/main/resources/assets/swordselection/models/item/stone_broadsword.json b/src/main/resources/assets/swordselection/models/item/stone_broadsword.json new file mode 100644 index 0000000..2d907eb --- /dev/null +++ b/src/main/resources/assets/swordselection/models/item/stone_broadsword.json @@ -0,0 +1,6 @@ +{ + "parent": "item/handheld", + "textures": { + "layer0": "swordselection:item/stone_broadsword" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/swordselection/models/item/stone_longsword.json b/src/main/resources/assets/swordselection/models/item/stone_longsword.json new file mode 100644 index 0000000..ff5ac56 --- /dev/null +++ b/src/main/resources/assets/swordselection/models/item/stone_longsword.json @@ -0,0 +1,6 @@ +{ + "parent": "item/handheld", + "textures": { + "layer0": "swordselection:item/stone_longsword" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/swordselection/models/item/stone_sickles.json b/src/main/resources/assets/swordselection/models/item/stone_sickles.json new file mode 100644 index 0000000..6247c77 --- /dev/null +++ b/src/main/resources/assets/swordselection/models/item/stone_sickles.json @@ -0,0 +1,6 @@ +{ + "parent": "item/handheld", + "textures":{ + "layer0": "swordselection:item/stone_sickles" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/swordselection/textures/item/stone_broadsword.png b/src/main/resources/assets/swordselection/textures/item/stone_broadsword.png new file mode 100644 index 0000000..2736995 Binary files /dev/null and b/src/main/resources/assets/swordselection/textures/item/stone_broadsword.png differ diff --git a/src/main/resources/assets/swordselection/textures/item/stone_longsword.png b/src/main/resources/assets/swordselection/textures/item/stone_longsword.png new file mode 100644 index 0000000..f1c3de1 Binary files /dev/null and b/src/main/resources/assets/swordselection/textures/item/stone_longsword.png differ diff --git a/src/main/resources/assets/swordselection/textures/item/stone_sickles.png b/src/main/resources/assets/swordselection/textures/item/stone_sickles.png new file mode 100644 index 0000000..37f48de Binary files /dev/null and b/src/main/resources/assets/swordselection/textures/item/stone_sickles.png differ diff --git a/src/main/resources/data/swordselection/recipes/stone_broadsword.json b/src/main/resources/data/swordselection/recipes/stone_broadsword.json new file mode 100644 index 0000000..96e0a12 --- /dev/null +++ b/src/main/resources/data/swordselection/recipes/stone_broadsword.json @@ -0,0 +1,8 @@ +{ + "type": "minecraft:stonecutting", + "ingredient": { + "item": "minecraft:stone_sword" + }, + "result": "swordselection:stone_broadsword", + "count": 1 +} \ No newline at end of file diff --git a/src/main/resources/data/swordselection/recipes/stone_longsword.json b/src/main/resources/data/swordselection/recipes/stone_longsword.json new file mode 100644 index 0000000..4cdd3d3 --- /dev/null +++ b/src/main/resources/data/swordselection/recipes/stone_longsword.json @@ -0,0 +1,8 @@ +{ + "type": "minecraft:stonecutting", + "ingredient": { + "item": "minecraft:stone_sword" + }, + "result": "swordselection:stone_longsword", + "count": 1 +} \ No newline at end of file diff --git a/src/main/resources/data/swordselection/recipes/stone_sickles.json b/src/main/resources/data/swordselection/recipes/stone_sickles.json new file mode 100644 index 0000000..793d30c --- /dev/null +++ b/src/main/resources/data/swordselection/recipes/stone_sickles.json @@ -0,0 +1,8 @@ +{ + "type": "minecraft:stonecutting", + "ingredient": { + "item": "minecraft:stone_sword" + }, + "result": "swordselection:stone_sickles", + "count": 1 +} \ No newline at end of file