-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
136 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 0 additions & 16 deletions
16
src/main/java/net/fabricmc/example/mixin/ExampleMixin.java
This file was deleted.
Oops, something went wrong.
35 changes: 35 additions & 0 deletions
35
src/main/java/net/mandl/oxidizedarmor/OxidizedArmorItems.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package net.mandl.oxidizedarmor; | ||
|
||
import java.util.LinkedHashMap; | ||
import java.util.Map; | ||
|
||
import net.mandl.oxidizedarmor.armor.RoseGoldArmorMaterial; | ||
import net.minecraft.entity.EquipmentSlot; | ||
import net.minecraft.item.ArmorItem; | ||
import net.minecraft.item.ArmorMaterial; | ||
import net.minecraft.item.Item; | ||
import net.minecraft.util.Identifier; | ||
import net.minecraft.util.registry.Registry; | ||
import safro.oxidized.Oxidized; | ||
|
||
public class OxidizedArmorItems { | ||
private static final Map<Identifier, Item> ITEMS = new LinkedHashMap<>(); | ||
|
||
public static final ArmorMaterial ROSE_GOLD_ARMOR = new RoseGoldArmorMaterial(); | ||
public static final Item ROSE_GOLD_HELMET = add("rose_gold_helmet", new ArmorItem(ROSE_GOLD_ARMOR, EquipmentSlot.HEAD, new Item.Settings().group(Oxidized.ITEMGROUP))); | ||
public static final Item ROSE_GOLD_CHESTPLATE = add("rose_gold_chestplate", new ArmorItem(ROSE_GOLD_ARMOR, EquipmentSlot.CHEST, new Item.Settings().group(Oxidized.ITEMGROUP))); | ||
public static final Item ROSE_GOLD_LEGGINGS = add("rose_gold_leggings", new ArmorItem(ROSE_GOLD_ARMOR, EquipmentSlot.LEGS, new Item.Settings().group(Oxidized.ITEMGROUP))); | ||
public static final Item ROSE_GOLD_BOOTS = add("rose_gold_boots", new ArmorItem(ROSE_GOLD_ARMOR, EquipmentSlot.FEET, new Item.Settings().group(Oxidized.ITEMGROUP))); | ||
|
||
|
||
private static <I extends Item> I add(String name, I item) { | ||
ITEMS.put(new Identifier(OxidizedArmorMod.MODID, name), item); | ||
return item; | ||
} | ||
|
||
public static void registerItems() { | ||
for (Identifier id : ITEMS.keySet()) { | ||
Registry.register(Registry.ITEM, id, ITEMS.get(id)); | ||
} | ||
} | ||
} |
9 changes: 5 additions & 4 deletions
9
...java/net/fabricmc/example/ExampleMod.java → ...mandl/oxidizedarmor/OxidizedArmorMod.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,22 @@ | ||
package net.fabricmc.example; | ||
package net.mandl.oxidizedarmor; | ||
|
||
import net.fabricmc.api.ModInitializer; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
public class ExampleMod implements ModInitializer { | ||
public class OxidizedArmorMod implements ModInitializer { | ||
// This logger is used to write text to the console and the log file. | ||
// It is considered best practice to use your mod id as the logger's name. | ||
// That way, it's clear which mod wrote info, warnings, and errors. | ||
public static final Logger LOGGER = LoggerFactory.getLogger("modid"); | ||
public static final String MODID = "oxidized-armor"; | ||
public static final Logger LOGGER = LoggerFactory.getLogger(MODID); | ||
|
||
@Override | ||
public void onInitialize() { | ||
// This code runs as soon as Minecraft is in a mod-load-ready state. | ||
// However, some things (like resources) may still be uninitialized. | ||
// Proceed with mild caution. | ||
|
||
LOGGER.info("Hello Fabric world!"); | ||
OxidizedArmorItems.registerItems(); | ||
} | ||
} |
54 changes: 54 additions & 0 deletions
54
src/main/java/net/mandl/oxidizedarmor/armor/RoseGoldArmorMaterial.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package net.mandl.oxidizedarmor.armor; | ||
|
||
import net.minecraft.entity.EquipmentSlot; | ||
import net.minecraft.item.ArmorMaterial; | ||
import net.minecraft.item.Items; | ||
import net.minecraft.recipe.Ingredient; | ||
import net.minecraft.sound.SoundEvent; | ||
import net.minecraft.sound.SoundEvents; | ||
|
||
|
||
public class RoseGoldArmorMaterial implements ArmorMaterial { | ||
private static final int[] BASE_DURABILITY = new int[] {13, 15, 16, 11}; | ||
private static final int[] PROTECTION_VALUES = new int[] {2, 5, 6, 2}; // iron | ||
|
||
@Override | ||
public int getDurability(EquipmentSlot slot) { | ||
return BASE_DURABILITY[slot.getEntitySlotId()] * 15; // iron | ||
} | ||
|
||
@Override | ||
public int getProtectionAmount(EquipmentSlot slot) { | ||
return PROTECTION_VALUES[slot.getEntitySlotId()]; | ||
} | ||
|
||
@Override | ||
public int getEnchantability() { | ||
return 25; // gold | ||
} | ||
|
||
@Override | ||
public SoundEvent getEquipSound() { | ||
return SoundEvents.ITEM_ARMOR_EQUIP_GOLD; | ||
} | ||
|
||
@Override | ||
public Ingredient getRepairIngredient() { | ||
return Ingredient.ofItems(Items.COPPER_INGOT); | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return "rose_gold"; | ||
} | ||
|
||
@Override | ||
public float getToughness() { | ||
return 0f; // anything except diamond or netherite | ||
} | ||
|
||
@Override | ||
public float getKnockbackResistance() { | ||
return 0f; | ||
} | ||
} |
Binary file added
BIN
+9.79 KB
src/main/resources/assets/minecraft/textures/models/armor/rose_gold_layer_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+7.17 KB
src/main/resources/assets/minecraft/textures/models/armor/rose_gold_layer_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions
6
src/main/resources/assets/oxidized-armor/models/item/rose_gold_boots.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"parent": "item/generated", | ||
"textures": { | ||
"layer0": "oxidized-armor:item/rose_gold_boots" | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
src/main/resources/assets/oxidized-armor/models/item/rose_gold_chestplate.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"parent": "item/generated", | ||
"textures": { | ||
"layer0": "oxidized-armor:item/rose_gold_chestplate" | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
src/main/resources/assets/oxidized-armor/models/item/rose_gold_helmet.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"parent": "item/generated", | ||
"textures": { | ||
"layer0": "oxidized-armor:item/rose_gold_helmet" | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
src/main/resources/assets/oxidized-armor/models/item/rose_gold_leggings.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"parent": "item/generated", | ||
"textures": { | ||
"layer0": "oxidized-armor:item/rose_gold_leggings" | ||
} | ||
} |
Binary file added
BIN
+696 Bytes
src/main/resources/assets/oxidized-armor/textures/item/rose_gold_boots.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+794 Bytes
src/main/resources/assets/oxidized-armor/textures/item/rose_gold_chestplate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+786 Bytes
src/main/resources/assets/oxidized-armor/textures/item/rose_gold_helmet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+712 Bytes
src/main/resources/assets/oxidized-armor/textures/item/rose_gold_leggings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.