-
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
21 changed files
with
184 additions
and
14 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
8 changes: 6 additions & 2 deletions
8
src/main/generated/.cache/9adbe1c44971b18122390f472ecf7bb970889f75
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
6 changes: 6 additions & 0 deletions
6
src/main/generated/assets/squaredadditions/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": "minecraft:item/generated", | ||
"textures": { | ||
"layer0": "squaredadditions:item/rose_gold_boots" | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
src/main/generated/assets/squaredadditions/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": "minecraft:item/generated", | ||
"textures": { | ||
"layer0": "squaredadditions:item/rose_gold_chestplate" | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
src/main/generated/assets/squaredadditions/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": "minecraft:item/generated", | ||
"textures": { | ||
"layer0": "squaredadditions:item/rose_gold_helmet" | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
src/main/generated/assets/squaredadditions/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": "minecraft:item/generated", | ||
"textures": { | ||
"layer0": "squaredadditions:item/rose_gold_leggings" | ||
} | ||
} |
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
64 changes: 55 additions & 9 deletions
64
src/main/java/pl/xyundy/squaredadditions/item/ModArmorMaterial.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,51 +1,97 @@ | ||
package pl.xyundy.squaredadditions.item; | ||
|
||
import java.util.EnumMap; | ||
import java.util.function.Supplier; | ||
|
||
import net.minecraft.item.ArmorItem; | ||
import net.minecraft.item.ArmorMaterial; | ||
import net.minecraft.item.ArmorMaterials; | ||
import net.minecraft.recipe.Ingredient; | ||
import net.minecraft.sound.SoundEvent; | ||
import net.minecraft.sound.SoundEvents; | ||
import net.minecraft.util.Lazy; | ||
import net.minecraft.util.StringIdentifiable; | ||
import net.minecraft.util.Util; | ||
import pl.xyundy.squaredadditions.SquaredAdditions; | ||
|
||
public enum ModArmorMaterial implements ArmorMaterial { | ||
; | ||
ROSE_GOLD("rose_gold", 7, Util.make(new EnumMap(ArmorItem.Type.class), map -> { | ||
map.put(ArmorItem.Type.BOOTS, 2); | ||
map.put(ArmorItem.Type.LEGGINGS, 4); | ||
map.put(ArmorItem.Type.CHESTPLATE, 6); | ||
map.put(ArmorItem.Type.HELMET, 3); | ||
}), 25, SoundEvents.ITEM_ARMOR_EQUIP_GOLD, 0.0f, 0.0f, () -> Ingredient.ofItems(ModItems.ROSE_GOLD_INGOT)); | ||
|
||
public static final StringIdentifiable.Codec<ArmorMaterials> CODEC; | ||
private static final EnumMap<ArmorItem.Type, Integer> BASE_DURABILITY; | ||
private final String name; | ||
private final int durabilityMultiplier; | ||
private final EnumMap<ArmorItem.Type, Integer> protectionAmounts; | ||
private final int enchantability; | ||
private final SoundEvent equipSound; | ||
private final float toughness; | ||
private final float knockbackResistance; | ||
private final Lazy<Ingredient> repairIngredientSupplier; | ||
|
||
private ModArmorMaterial(String name, int durabilityMultiplier, EnumMap<ArmorItem.Type, Integer> protectionAmounts, int enchantability, SoundEvent equipSound, float toughness, float knockbackResistance, Supplier<Ingredient> repairIngredientSupplier) { | ||
this.name = name; | ||
this.durabilityMultiplier = durabilityMultiplier; | ||
this.protectionAmounts = protectionAmounts; | ||
this.enchantability = enchantability; | ||
this.equipSound = equipSound; | ||
this.toughness = toughness; | ||
this.knockbackResistance = knockbackResistance; | ||
this.repairIngredientSupplier = new Lazy<Ingredient>(repairIngredientSupplier); | ||
} | ||
|
||
@Override | ||
public int getDurability(ArmorItem.Type type) { | ||
return 0; | ||
return BASE_DURABILITY.get((Object)type) * this.durabilityMultiplier; | ||
} | ||
|
||
@Override | ||
public int getProtection(ArmorItem.Type type) { | ||
return 0; | ||
return this.protectionAmounts.get((Object)type); | ||
} | ||
|
||
@Override | ||
public int getEnchantability() { | ||
return 0; | ||
return this.enchantability; | ||
} | ||
|
||
@Override | ||
public SoundEvent getEquipSound() { | ||
return null; | ||
return this.equipSound; | ||
} | ||
|
||
@Override | ||
public Ingredient getRepairIngredient() { | ||
return null; | ||
return this.repairIngredientSupplier.get(); | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return ""; | ||
|
||
return SquaredAdditions.MOD_ID + ":" + this.name; | ||
} | ||
|
||
@Override | ||
public float getToughness() { | ||
return 0; | ||
return this.toughness; | ||
} | ||
|
||
@Override | ||
public float getKnockbackResistance() { | ||
return 0; | ||
return this.knockbackResistance; | ||
} | ||
|
||
static { | ||
CODEC = StringIdentifiable.createCodec(ArmorMaterials::values); | ||
BASE_DURABILITY = Util.make(new EnumMap(ArmorItem.Type.class), map -> { | ||
map.put(ArmorItem.Type.BOOTS, 13); | ||
map.put(ArmorItem.Type.LEGGINGS, 15); | ||
map.put(ArmorItem.Type.CHESTPLATE, 16); | ||
map.put(ArmorItem.Type.HELMET, 11); | ||
}); | ||
} | ||
} |
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
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
Binary file added
BIN
+273 Bytes
src/main/resources/assets/squaredadditions/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
+351 Bytes
src/main/resources/assets/squaredadditions/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
+264 Bytes
src/main/resources/assets/squaredadditions/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
+282 Bytes
src/main/resources/assets/squaredadditions/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.
Binary file added
BIN
+1.7 KB
...n/resources/assets/squaredadditions/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
+1.11 KB
...n/resources/assets/squaredadditions/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.
17 changes: 17 additions & 0 deletions
17
src/main/resources/data/squaredadditions/recipes/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,17 @@ | ||
{ | ||
"type": "minecraft:crafting_shaped", | ||
"category": "misc", | ||
"pattern": [ | ||
" ", | ||
"# #", | ||
"# #" | ||
], | ||
"key": { | ||
"#": { | ||
"item": "squaredadditions:rose_gold_ingot" | ||
} | ||
}, | ||
"result": { | ||
"item": "squaredadditions:rose_gold_boots" | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
src/main/resources/data/squaredadditions/recipes/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,17 @@ | ||
{ | ||
"type": "minecraft:crafting_shaped", | ||
"category": "misc", | ||
"pattern": [ | ||
"# #", | ||
"###", | ||
"###" | ||
], | ||
"key": { | ||
"#": { | ||
"item": "squaredadditions:rose_gold_ingot" | ||
} | ||
}, | ||
"result": { | ||
"item": "squaredadditions:rose_gold_chestplate" | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
src/main/resources/data/squaredadditions/recipes/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,17 @@ | ||
{ | ||
"type": "minecraft:crafting_shaped", | ||
"category": "misc", | ||
"pattern": [ | ||
"###", | ||
"# #", | ||
" " | ||
], | ||
"key": { | ||
"#": { | ||
"item": "squaredadditions:rose_gold_ingot" | ||
} | ||
}, | ||
"result": { | ||
"item": "squaredadditions:rose_gold_helmet" | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
src/main/resources/data/squaredadditions/recipes/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,17 @@ | ||
{ | ||
"type": "minecraft:crafting_shaped", | ||
"category": "misc", | ||
"pattern": [ | ||
"###", | ||
"# #", | ||
"# #" | ||
], | ||
"key": { | ||
"#": { | ||
"item": "squaredadditions:rose_gold_ingot" | ||
} | ||
}, | ||
"result": { | ||
"item": "squaredadditions:rose_gold_leggings" | ||
} | ||
} |