added robes items

This commit is contained in:
Ryan
2025-01-21 19:57:28 +02:00
parent 146dba3dac
commit 8e2ec142b1
8 changed files with 151 additions and 10 deletions

View File

@@ -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.
- added robes

View File

@@ -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 {

View File

@@ -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

View File

@@ -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

View File

@@ -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));

View File

@@ -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<Ingredient> 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<Ingredient> 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;
}
}

View File

@@ -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));
}
}

View File

@@ -1,5 +0,0 @@
{
"values": [
"terraoriginum:tick"
]
}