ArmorMaterials .java

net.minecraft.world.item.equipment.ArmorMaterials (interface): members: makeDefense, CHAINMAIL, ARMADILLO_SCUTE, TURTLE_SCUTE, LEATHER, NETHERITE, DIAMOND.

net.minecraft.world.item.equipmentinterface47 linescommon2.3 KB

API Surface (0)

No public/protected methods detected (fields or constants only).

Fields & Constants (9)

LEATHER
COPPER
CHAINMAIL
IRON
GOLD
DIAMOND
TURTLE_SCUTE
NETHERITE
ARMADILLO_SCUTE

Code Graph: Dependencies (3)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

ArmorMaterials.java47 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world.item.equipment;
2
3
import com.google.common.collect.Maps;
4
import java.util.Map;
5
import net.minecraft.sounds.SoundEvents;
6
import net.minecraft.tags.ItemTags;
7
8
/**
9
 * Access widened by fabric-transitive-access-wideners-v1 to accessible
10
 */
11
public interface ArmorMaterials {
12
	ArmorMaterial LEATHER = new ArmorMaterial(
13
		5, makeDefense(1, 2, 3, 1, 3), 15, SoundEvents.ARMOR_EQUIP_LEATHER, 0.0F, 0.0F, ItemTags.REPAIRS_LEATHER_ARMOR, EquipmentAssets.LEATHER
14
	);
15
	ArmorMaterial COPPER = new ArmorMaterial(
16
		11, makeDefense(1, 3, 4, 2, 4), 8, SoundEvents.ARMOR_EQUIP_COPPER, 0.0F, 0.0F, ItemTags.REPAIRS_COPPER_ARMOR, EquipmentAssets.COPPER
17
	);
18
	ArmorMaterial CHAINMAIL = new ArmorMaterial(
19
		15, makeDefense(1, 4, 5, 2, 4), 12, SoundEvents.ARMOR_EQUIP_CHAIN, 0.0F, 0.0F, ItemTags.REPAIRS_CHAIN_ARMOR, EquipmentAssets.CHAINMAIL
20
	);
21
	ArmorMaterial IRON = new ArmorMaterial(
22
		15, makeDefense(2, 5, 6, 2, 5), 9, SoundEvents.ARMOR_EQUIP_IRON, 0.0F, 0.0F, ItemTags.REPAIRS_IRON_ARMOR, EquipmentAssets.IRON
23
	);
24
	ArmorMaterial GOLD = new ArmorMaterial(
25
		7, makeDefense(1, 3, 5, 2, 7), 25, SoundEvents.ARMOR_EQUIP_GOLD, 0.0F, 0.0F, ItemTags.REPAIRS_GOLD_ARMOR, EquipmentAssets.GOLD
26
	);
27
	ArmorMaterial DIAMOND = new ArmorMaterial(
28
		33, makeDefense(3, 6, 8, 3, 11), 10, SoundEvents.ARMOR_EQUIP_DIAMOND, 2.0F, 0.0F, ItemTags.REPAIRS_DIAMOND_ARMOR, EquipmentAssets.DIAMOND
29
	);
30
	ArmorMaterial TURTLE_SCUTE = new ArmorMaterial(
31
		25, makeDefense(2, 5, 6, 2, 5), 9, SoundEvents.ARMOR_EQUIP_TURTLE, 0.0F, 0.0F, ItemTags.REPAIRS_TURTLE_HELMET, EquipmentAssets.TURTLE_SCUTE
32
	);
33
	ArmorMaterial NETHERITE = new ArmorMaterial(
34
		37, makeDefense(3, 6, 8, 3, 19), 15, SoundEvents.ARMOR_EQUIP_NETHERITE, 3.0F, 0.1F, ItemTags.REPAIRS_NETHERITE_ARMOR, EquipmentAssets.NETHERITE
35
	);
36
	ArmorMaterial ARMADILLO_SCUTE = new ArmorMaterial(
37
		4, makeDefense(3, 6, 8, 3, 11), 10, SoundEvents.ARMOR_EQUIP_WOLF, 0.0F, 0.0F, ItemTags.REPAIRS_WOLF_ARMOR, EquipmentAssets.ARMADILLO_SCUTE
38
	);
39
40
	/**
41
	 * Access widened by fabric-transitive-access-wideners-v1 to accessible
42
	 */
43
	static Map<ArmorType, Integer> makeDefense(final int boots, final int legs, final int chest, final int helm, final int body) {
44
		return Maps.newEnumMap(Map.of(ArmorType.BOOTS, boots, ArmorType.LEGGINGS, legs, ArmorType.CHESTPLATE, chest, ArmorType.HELMET, helm, ArmorType.BODY, body));
45
	}
46
}
47

Decompiled Minecraft 26.3 source of ArmorMaterials (net/minecraft/world/item/equipment/ArmorMaterials.java) with Mojang official mappings, stored verbatim on the site.