diff --git a/CHANGELOG b/CHANGELOG index e7de6c8..ef0c6fd 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,8 @@ # Changes +## 1.20.1-1.0.6 - Fixed bug which caused the Monarch's solar energy to not be functional. - Changed texture of the cotton crop. - Changed texture of the cotton ball. - Added Item "Ghostly Cloth". -- Renamed java class "sun_totem" to "sunTotem" to fit convention. \ No newline at end of file +- Renamed java class "sun_totem" to "sunTotem" to fit convention. +- added robes \ No newline at end of file diff --git a/build.gradle b/build.gradle index a71990d..1637348 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'fabric-loom' version '1.5-SNAPSHOT' + id 'fabric-loom' version '1.9-SNAPSHOT' id 'maven-publish' } @@ -32,6 +32,21 @@ repositories { name "jitpack" url "https://jitpack.io" } + maven { + name = 'GeckoLib' + url 'https://dl.cloudsmith.io/public/geckolib3/geckolib/maven/' + content { + includeGroup("software.bernie.geckolib") + } + } + maven { + name = 'GeckoLib' + url 'https://dl.cloudsmith.io/public/geckolib3/geckolib/maven/' + content { + includeGroupByRegex("software\\.bernie.*") + includeGroup("com.eliotlash.mclib") + } +} } dependencies { @@ -40,12 +55,16 @@ dependencies { modImplementation "net.fabricmc:fabric-loader:${project.loader_version}" modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" + modImplementation "com.terraformersmc:modmenu:${project.modmenu_version}" + modImplementation "com.github.apace100:origins-fabric:${project.origins_version}" modImplementation "com.github.apace100:apoli:${project.apoli_version}" modApi("com.github.Virtuoel:Pehkui:${pehkui_version}", { exclude group: "net.fabricmc.fabric-api" }) + modImplementation("software.bernie.geckolib:geckolib-fabric-${minecraft_version}:${geckolib_version}") + implementation("com.eliotlash.mclib:mclib:20") } processResources { diff --git a/gradle.properties b/gradle.properties index 09d6e67..a017ce0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,7 @@ org.gradle.jvmargs=-Xmx2G # Fabric Properties minecraft_version=1.20.1 yarn_mappings=1.20.1+build.10 -loader_version=0.15.6 +loader_version=0.16.10 # Mod Properties mod_version=1.20.1-1.0.4 @@ -12,8 +12,9 @@ maven_group=com.smithy archives_base_name=TerraOriginum # Dependencies -fabric_version=0.91.0+1.20.1 +fabric_version=0.92.3+1.20.1 modmenu_version=7.2.2 pehkui_version=3.7.8 origins_version=v1.10.0 apoli_version=2.9.0 +geckolib_version=4.7 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a595206..81aa1c0 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/java/com/smithy/terraoriginum/TerraOriginum.java b/src/main/java/com/smithy/terraoriginum/TerraOriginum.java index a4b95f6..7c1ee2c 100644 --- a/src/main/java/com/smithy/terraoriginum/TerraOriginum.java +++ b/src/main/java/com/smithy/terraoriginum/TerraOriginum.java @@ -26,6 +26,7 @@ public class TerraOriginum implements ModInitializer { cottonItems.register(); sunTotem.register(); ghostlyItems.register(); + robesItems.register(); ItemGroupEvents.modifyEntriesEvent(ItemGroups.TOOLS).register((content) -> content.add(umbrella.UMBRELLA)); ItemGroupEvents.modifyEntriesEvent(ItemGroups.TOOLS).register((content) -> content.add(sunTotem.SUN_TOTEM)); diff --git a/src/main/java/com/smithy/terraoriginum/customMaterials/robesMaterial.java b/src/main/java/com/smithy/terraoriginum/customMaterials/robesMaterial.java new file mode 100644 index 0000000..4e8ce58 --- /dev/null +++ b/src/main/java/com/smithy/terraoriginum/customMaterials/robesMaterial.java @@ -0,0 +1,89 @@ +package com.smithy.terraoriginum.customMaterials; + +import net.minecraft.item.ArmorItem; +import net.minecraft.item.ArmorMaterial; +import net.minecraft.recipe.Ingredient; +import net.minecraft.sound.SoundEvent; +import net.minecraft.sound.SoundEvents; + +import java.util.function.Supplier; + +import com.smithy.terraoriginum.TerraOriginum; +import com.smithy.terraoriginum.items.cottonItems; + +public enum robesMaterial implements ArmorMaterial { + ROBES("robes", 42, new int[] { 4, 9, 7, 4 }, 19, + SoundEvents.ITEM_ARMOR_EQUIP_NETHERITE, 5, 0.1f, () -> Ingredient.ofItems(cottonItems.COTTON_BALL)); + + private final String name; + private final int durabilityMultiplier; + private final int[] protectionAmounts; + private final int enchantability; + private final SoundEvent equipSound; + private final float toughness; + private final float knockbackResistance; + private final Supplier repairIngredient; + + private static final int[] BASE_DURABILITY = { 11, 16, 15, 13 }; + + robesMaterial( + String name, + int durabilityMultiplier, + int[] protectionAmounts, + int enchantability, + SoundEvent equipSound, + float toughness, + float knockbackResistance, + Supplier repairIngredient + ) { + + this.name = name; + this.durabilityMultiplier = durabilityMultiplier; + this.protectionAmounts = protectionAmounts; + this.enchantability = enchantability; + this.equipSound = equipSound; + this.toughness = toughness; + this.knockbackResistance = knockbackResistance; + this.repairIngredient = repairIngredient; + } + + @Override + public int getDurability(ArmorItem.Type type) { + return BASE_DURABILITY[type.ordinal()] * this.durabilityMultiplier; + } + + @Override + public int getProtection(ArmorItem.Type type) { + return protectionAmounts[type.ordinal()]; + } + + @Override + public int getEnchantability() { + return this.enchantability; + } + + @Override + public SoundEvent getEquipSound() { + return this.equipSound; + } + + @Override + public Ingredient getRepairIngredient() { + return this.repairIngredient.get(); + } + + @Override + public String getName() { + return TerraOriginum.MOD_ID + ":" + this.name; + } + + @Override + public float getToughness() { + return this.toughness; + } + + @Override + public float getKnockbackResistance() { + return this.knockbackResistance; + } +} \ No newline at end of file diff --git a/src/main/java/com/smithy/terraoriginum/items/robesItems.java b/src/main/java/com/smithy/terraoriginum/items/robesItems.java new file mode 100644 index 0000000..abf778b --- /dev/null +++ b/src/main/java/com/smithy/terraoriginum/items/robesItems.java @@ -0,0 +1,34 @@ +package com.smithy.terraoriginum.items; + +import com.smithy.terraoriginum.TerraOriginum; +import com.smithy.terraoriginum.customMaterials.robesMaterial; + +import net.fabricmc.fabric.api.item.v1.FabricItemSettings; +import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents; +import net.minecraft.item.ArmorItem; +import net.minecraft.item.Item; +import net.minecraft.item.ItemGroups; +import net.minecraft.registry.Registries; +import net.minecraft.registry.Registry; +import net.minecraft.util.Identifier; +import net.minecraft.util.Rarity; + +public class robesItems { + + public static final Item ROBES_HELMET = new ArmorItem(robesMaterial.ROBES, ArmorItem.Type.HELMET, new FabricItemSettings().rarity(Rarity.EPIC)); + public static final Item ROBES_CHESTPLATE = new ArmorItem(robesMaterial.ROBES, ArmorItem.Type.CHESTPLATE, new FabricItemSettings().rarity(Rarity.EPIC)); + public static final Item ROBES_LEGGING = new ArmorItem(robesMaterial.ROBES, ArmorItem.Type.LEGGINGS, new FabricItemSettings().rarity(Rarity.EPIC)); + public static final Item ROBES_BOOTS = new ArmorItem(robesMaterial.ROBES, ArmorItem.Type.BOOTS, new FabricItemSettings().rarity(Rarity.EPIC)); + + public static void register() { + Registry.register(Registries.ITEM, new Identifier(TerraOriginum.MOD_ID, "robes_helmet"), ROBES_HELMET); + Registry.register(Registries.ITEM, new Identifier(TerraOriginum.MOD_ID, "robes_chestplate"), ROBES_CHESTPLATE); + Registry.register(Registries.ITEM, new Identifier(TerraOriginum.MOD_ID, "robes_leggings"), ROBES_LEGGING); + Registry.register(Registries.ITEM, new Identifier(TerraOriginum.MOD_ID, "robes_boots"), ROBES_BOOTS); + + ItemGroupEvents.modifyEntriesEvent(ItemGroups.COMBAT).register((content) -> content.add(ROBES_HELMET)); + ItemGroupEvents.modifyEntriesEvent(ItemGroups.COMBAT).register((content) -> content.add(ROBES_CHESTPLATE)); + ItemGroupEvents.modifyEntriesEvent(ItemGroups.COMBAT).register((content) -> content.add(ROBES_LEGGING)); + ItemGroupEvents.modifyEntriesEvent(ItemGroups.COMBAT).register((content) -> content.add(ROBES_BOOTS)); + } +} diff --git a/src/main/resources/data/minecraft/tags/functions/tick.json b/src/main/resources/data/minecraft/tags/functions/tick.json deleted file mode 100644 index 7f5e242..0000000 --- a/src/main/resources/data/minecraft/tags/functions/tick.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "terraoriginum:tick" - ] -} \ No newline at end of file