diff --git a/.claude/settings.local.json b/.claude/settings.local.json index 632d096b0..261b43bbc 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -12,7 +12,8 @@ "Bash(grep:*)", "Bash(unzip:*)", "Bash(./gradlew:*)", - "WebSearch" + "WebSearch", + "Bash(git add:*)" ] } } diff --git a/README.md b/README.md index 23a742b32..dc8b541bb 100644 --- a/README.md +++ b/README.md @@ -70,12 +70,11 @@ Il est recommandé pour la bonne utilisation du mods d'utilisé des mods complé Le mod ajoute plusieurs variantes de minerais personnalisés : #### Variantes de Diamant -- **Shard Diamond Ore** (`sharddiamondblockore`) : Un minerai de diamant qui droppe des éclats de diamant +- **Deepslate Shard Diamond Ore** (`deepslatesharddiamondore`) : Un minerai de diamant qui droppe des éclats de diamant - Se génère dans tous les biomes (forge:any) - - Hauteur : 0 à 15 - - Taille des filons : 8 blocs + - Se génère uniquement en profondeur (deepslate) + - Taille des filons : 16 blocs - Drop : 1-2 Diamond Shards (Fortune supporté) -- **Deepslate Shard Diamond Ore** (`deepslatesharddiamondore`) : Version deepslate du minerai d'éclats de diamant - **Concentrated Diamond Ore** (`concentrateddiamondore`) : Un minerai de diamant plus concentré - Se génère dans les biomes froids (cold_biomes) - Drop : 1-2 Diamants (Fortune supporté) @@ -127,6 +126,16 @@ Le mod ajoute plusieurs variantes de minerais personnalisés : - Permet de créer des outils en éclats de diamant - Peut être crafté en diamant complet (9 éclats = 1 diamant) +#### Ore Biome Finder (`ore_biome_finder`) +- **Description** : Un outil permettant d'identifier les minerais présents dans le biome actuel +- **Stack** : 1 (non stackable) +- **Utilisation** : Clic droit pour afficher les informations du biome actuel +- **Informations affichées** : + - Nom du biome et ID + - Tags du mod applicables au biome (cold_biomes, hot_biomes, etc.) + - Liste des minerais trouvables dans ce biome +- **Craft** : Compass + Diamond Shards (voir recettes ci-dessous) + ### Outils en Diamond Shard Le mod introduit une nouvelle catégorie d'outils située entre le fer et le diamant : @@ -147,6 +156,31 @@ Le mod introduit une nouvelle catégorie d'outils située entre le fer et le dia - **Vitesse de minage** : 7.0 - **Dégâts d'attaque** : 6 +#### Paxel en Éclat de Diamant (`sharddiamondpaxel`) +- **Description** : Outil combiné pioche + pelle + hache, tout-en-un pour le minage +- **Durabilité** : 1000 utilisations +- **Vitesse de minage** : 6.5 +- **Dégâts d'attaque** : 1 (pas fait pour le combat) +- **Réparation** : Utilise des Diamond Shards +- **Fonctionnalités** : + - Mine tous les blocs (pierre, bois, terre, etc.) + - Efficace sur tous les types de blocs + - Remplace les 3 outils séparés + +### Armure en Diamond Shard + +Le mod introduit une armure intermédiaire située entre le fer et le diamant : + +| Pièce | Protection | Durabilité | Craft | +|-------|-----------|------------|-------| +| Casque | 3 | 250 | 5 Diamond Shards | +| Plastron | 7 | 300 | 8 Diamond Shards + 1 Diamant | +| Jambières | 5 | 280 | 7 Diamond Shards + 1 Diamant | +| Bottes | 2 | 230 | 4 Diamond Shards | +| **Total** | **17** | **1060** | **24 Shards + 2 Diamants** | + +**Comparaison** : Fer (15 armure, 535 durabilité) | Diamond Shard (17 armure, 1060 durabilité) | Diamant (20 armure, 2048 durabilité) + ## Distribution des Minerais par Biomes Le mod utilise une classification logique des biomes pour la génération des minerais via les biome modifiers de Forge. Le support de **Biomes O' Plenty** est inclus avec 69 biomes supplémentaires. @@ -160,13 +194,14 @@ Le mod utilise une classification logique des biomes pour la génération des mi | **Mountain** | High Emerald | 22 | 10 | | **Rare** | Lower Emerald | 10 | 10 | | **Tempered** | Iron, Deepslate Iron, Concentrated Coal | 23 | 23 | -| **All** | Shard Diamond, Deepslate Shard Diamond | - | - | +| **All** | Deepslate Shard Diamond | - | - | --- ### 🔷 forge:any (Tous les biomes) -**Minerais** : Shard Diamond Ore, Deepslate Shard Diamond Ore +**Minerais** : Deepslate Shard Diamond Ore - **TOUS** les biomes (vanilla + mods) +- **Se génère uniquement en profondeur (deepslate)** --- @@ -430,6 +465,14 @@ Le mod utilise un système de drops configurable (`ConfigurableOreDropsProcedure ## Recettes de Craft +### Ore Biome Finder +``` +[DiamantShard] [Compas] [DiamantShard] +[Compas] [ ] [Compas] +[DiamantShard] [Compas] [DiamantShard] + = 1 Ore Biome Finder +``` + ### Diamant à partir d'Éclats ``` [Éclat] [Éclat] [Éclat] @@ -444,12 +487,54 @@ Les recettes suivent le pattern standard des outils Minecraft : - **Pelle** : 1 Diamond Shard + 2 bâtons - **Hache** : 3 Diamond Shards + 2 bâtons +### Paxel en Diamond Shard +``` +[Hache] [Pelle] [Pioche] +[Bâton] [ ] [Bâton] + = 1 Paxel en Diamond Shard +``` + +### Armure en Diamond Shard +Les recettes suivent le pattern standard des armures Minecraft : +- **Casque** : 5 Diamond Shards +- **Plastron** : 8 Diamond Shards + 1 Diamant +- **Jambières** : 7 Diamond Shards + 1 Diamant +- **Bottes** : 4 Diamond Shards + +## Commandes + +### `/ores` ou `/ore` +Une commande permettant d'identifier les minerais présents dans le biome actuel. + +**Utilisation** : +- Jouez uniquement (doit être exécutée par un joueur) +- Affiche les mêmes informations que l'Ore Biome Finder + +**Informations affichées** : +- Nom du biome et ID (ex: `minecraft:plains`) +- Tags du mod applicables au biome (cold_biomes, hot_biomes, mountain_biomes, tempered_biomes, rare_biomes) +- Liste des minerais trouvables dans le biome actuel + +**Exemple de sortie** : +``` +=== Minerais dans: plains === +Biome ID: minecraft:plains +Tags du mod: tempered_biomes +Minerais trouvables: + * Charbon Concentre + * Fer (stone) + * Fer (deepslate) + * Diamant Shard (deepslate) + * Bloc Diamant Shard +``` + ## Intégration ### Mode Créatif -Les items sont intégrés via `CustomOreGenModTabs` : -- Diamond Shards et blocs de minerais -- Outils en Diamond Shard +Les items sont organisés dans les onglets créatifs via `CustomOreGenModTabs` : +- **INGREDIENTS** : Diamond Shards et blocs de minerais +- **TOOLS_AND_UTILITIES** : Pioche, pelle, hache, paxel et Ore Biome Finder +- **COMBAT** : Armure complète en Diamond Shard (casque, plastron, jambières, bottes) ### Langue Le mod inclut des fichiers de localisation en anglais (`en_us.json`) avec des noms descriptifs pour tous les blocs et objets. @@ -514,6 +599,7 @@ config/custom_ore_gen-common.toml ``` net.mcreator.customoregen/ ├── CustomOreGenMod.java # Classe principale du mod +├── OresCommand.java # Commande /ores pour détecter les minerais ├── block/ # Classes des blocs (16 minerais) │ ├── SharddiamondblockoreBlock.java │ ├── ConcentrateddiamondoreBlock.java @@ -536,9 +622,15 @@ net.mcreator.customoregen/ │ └── ConfigHelper.java # Helper pour la configuration ├── item/ # Classes des items │ ├── DiamondshardItem.java # Item Diamond Shard (RARE) +│ ├── OreBiomeFinderItem.java # Item Ore Biome Finder │ ├── SharddiamondpickaxeItem.java │ ├── SharddiamondshovelItem.java -│ └── SharddiamondaxeItem.java +│ ├── SharddiamondaxeItem.java +│ ├── SharddiamondpaxelItem.java # Paxel (outil combiné) +│ ├── SharddiamondhelmetItem.java # Casque en Diamond Shard +│ ├── SharddiamondchestplateItem.java # Plastron en Diamond Shard +│ ├── SharddiamondleggingsItem.java # Jambières en Diamond Shard +│ └── SharddiamondbootsItem.java # Bottes en Diamond Shard ├── procedures/ # Procédures et logique │ ├── ConfigurableOreDropsProcedure.java # Drops configurables │ └── OreexperienceProcedure.java # Drops d'XP @@ -551,6 +643,10 @@ net.mcreator.customoregen/ ### Classes Principales - **CustomOreGenMod** : Point d'entrée du mod, gère l'initialisation et le réseau +- **OresCommand** : Commande `/ores` pour identifier les minerais du biome actuel +- **OreBiomeFinderItem** : Item utilisable pour détecter les minerais du biome (clic droit) +- **SharddiamondpaxelItem** : Paxel combinant pioche + pelle + hache en un seul outil +- **Sharddiamondhelmet/chestplate/leggings/bootsItem** : Armure en Diamond Shard - **ModConfigs** : Configuration complète avec 4 sections (ore_generation, tool_stats, drops, features) - **ConfigurableOreDropsProcedure** : Gère les drops des minerais avec support Fortune/Silk Touch - **OreexperienceProcedure** : Gère les drops d'expérience lors du minage @@ -560,8 +656,12 @@ net.mcreator.customoregen/ Custom Ore Gem est conçu pour : - **Modifier la distribution des ressources** Minecraft avec de nouvelles variantes de minerais - **Fournir un système de drops configurable** pour les pack makers et moddeurs -- **Introduire une progression intermédiaire** à travers les Diamond Shards +- **Introduire une progression intermédiaire** à travers les Diamond Shards (outils et armure) +- **Offrir des outils d'exploration** avec l'Ore Biome Finder et la commande `/ores` +- **Proposer un outil tout-en-un** avec le Paxel en Diamond Shard (1000 durabilité) +- **Fournir une armure intermédiaire** entre fer et diamant (17 protection, 1060 durabilité) - **S'intégrer avec KubeJS** pour permettre des modifications avancées +- **Supporter Biomes O' Plenty** avec 69 biomes supplémentaires classés par température ## Crédits diff --git a/diamond_shard_paxel.png b/diamond_shard_paxel.png new file mode 100644 index 000000000..ac10e3e9e Binary files /dev/null and b/diamond_shard_paxel.png differ diff --git a/shard_armor/sharddiamondarmor_body.png b/shard_armor/sharddiamondarmor_body.png new file mode 100644 index 000000000..15cf585b9 Binary files /dev/null and b/shard_armor/sharddiamondarmor_body.png differ diff --git a/shard_armor/sharddiamondarmor_boots.png b/shard_armor/sharddiamondarmor_boots.png new file mode 100644 index 000000000..7b0c2c941 Binary files /dev/null and b/shard_armor/sharddiamondarmor_boots.png differ diff --git a/shard_armor/sharddiamondarmor_head.png b/shard_armor/sharddiamondarmor_head.png new file mode 100644 index 000000000..b9a01f630 Binary files /dev/null and b/shard_armor/sharddiamondarmor_head.png differ diff --git a/shard_armor/sharddiamondarmor_layer_1.png b/shard_armor/sharddiamondarmor_layer_1.png new file mode 100644 index 000000000..7458059ed Binary files /dev/null and b/shard_armor/sharddiamondarmor_layer_1.png differ diff --git a/shard_armor/sharddiamondarmor_layer_2.png b/shard_armor/sharddiamondarmor_layer_2.png new file mode 100644 index 000000000..2888cd240 Binary files /dev/null and b/shard_armor/sharddiamondarmor_layer_2.png differ diff --git a/shard_armor/sharddiamondarmor_leggings.png b/shard_armor/sharddiamondarmor_leggings.png new file mode 100644 index 000000000..d74c77677 Binary files /dev/null and b/shard_armor/sharddiamondarmor_leggings.png differ diff --git a/src/main/java/net/mcreator/customoregen/init/CustomOreGenModItems.java b/src/main/java/net/mcreator/customoregen/init/CustomOreGenModItems.java index 9a02c0f2a..8d8940048 100644 --- a/src/main/java/net/mcreator/customoregen/init/CustomOreGenModItems.java +++ b/src/main/java/net/mcreator/customoregen/init/CustomOreGenModItems.java @@ -17,6 +17,11 @@ import net.mcreator.customoregen.item.SharddiamondpickaxeItem; import net.mcreator.customoregen.item.SharddiamondaxeItem; import net.mcreator.customoregen.item.DiamondshardItem; import net.mcreator.customoregen.item.OreBiomeFinderItem; +import net.mcreator.customoregen.item.SharddiamondhelmetItem; +import net.mcreator.customoregen.item.SharddiamondchestplateItem; +import net.mcreator.customoregen.item.SharddiamondleggingsItem; +import net.mcreator.customoregen.item.SharddiamondbootsItem; +import net.mcreator.customoregen.item.SharddiamondpaxelItem; import net.mcreator.customoregen.CustomOreGenMod; public class CustomOreGenModItems { @@ -44,7 +49,17 @@ public class CustomOreGenModItems { // Start of user code block custom items public static final RegistryObject ORE_BIOME_FINDER = REGISTRY.register("ore_biome_finder", () -> new OreBiomeFinderItem()); + + // Diamond Shard Armor + public static final RegistryObject SHARDDIAMONDHELMET = REGISTRY.register("sharddiamondhelmet", () -> new SharddiamondhelmetItem()); + public static final RegistryObject SHARDDIAMONDCHESTPLATE = REGISTRY.register("sharddiamondchestplate", () -> new SharddiamondchestplateItem()); + public static final RegistryObject SHARDDIAMONDLEGGINGS = REGISTRY.register("sharddiamondleggings", () -> new SharddiamondleggingsItem()); + public static final RegistryObject SHARDDIAMONDBOOTS = REGISTRY.register("sharddiamondboots", () -> new SharddiamondbootsItem()); + + // Diamond Shard Paxel + public static final RegistryObject SHARDDIAMONDPAXEL = REGISTRY.register("sharddiamondpaxel", () -> new SharddiamondpaxelItem()); // End of user code block custom items + private static RegistryObject block(RegistryObject block) { return REGISTRY.register(block.getId().getPath(), () -> new BlockItem(block.get(), new Item.Properties())); } diff --git a/src/main/java/net/mcreator/customoregen/init/CustomOreGenModTabs.java b/src/main/java/net/mcreator/customoregen/init/CustomOreGenModTabs.java index 8ab6c26ca..4ce7cfd08 100644 --- a/src/main/java/net/mcreator/customoregen/init/CustomOreGenModTabs.java +++ b/src/main/java/net/mcreator/customoregen/init/CustomOreGenModTabs.java @@ -29,6 +29,13 @@ public class CustomOreGenModTabs { tabData.accept(CustomOreGenModItems.SHARDDIAMONDPICKAXE.get()); tabData.accept(CustomOreGenModItems.SHARDDIAMONDSHOVEL.get()); tabData.accept(CustomOreGenModItems.SHARDDIAMONDAXE.get()); + tabData.accept(CustomOreGenModItems.SHARDDIAMONDPAXEL.get()); + tabData.accept(CustomOreGenModItems.ORE_BIOME_FINDER.get()); + } else if (tabData.getTabKey() == CreativeModeTabs.COMBAT) { + tabData.accept(CustomOreGenModItems.SHARDDIAMONDHELMET.get()); + tabData.accept(CustomOreGenModItems.SHARDDIAMONDCHESTPLATE.get()); + tabData.accept(CustomOreGenModItems.SHARDDIAMONDLEGGINGS.get()); + tabData.accept(CustomOreGenModItems.SHARDDIAMONDBOOTS.get()); } } } diff --git a/src/main/java/net/mcreator/customoregen/item/SharddiamondbootsItem.java b/src/main/java/net/mcreator/customoregen/item/SharddiamondbootsItem.java new file mode 100644 index 000000000..393b5705c --- /dev/null +++ b/src/main/java/net/mcreator/customoregen/item/SharddiamondbootsItem.java @@ -0,0 +1,49 @@ +package net.mcreator.customoregen.item; + +import net.minecraft.world.item.crafting.Ingredient; +import net.minecraft.world.item.ArmorMaterial; +import net.minecraft.world.item.ArmorItem; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Item; +import net.minecraft.sounds.SoundEvent; +import net.minecraft.sounds.SoundEvents; + +import net.mcreator.customoregen.init.CustomOreGenModItems; + +public class SharddiamondbootsItem extends ArmorItem { + public SharddiamondbootsItem() { + super(new ArmorMaterial() { + public int getDurabilityForType(ArmorItem.Type type) { + return 230; // Bottes + } + + public int getDefenseForType(ArmorItem.Type type) { + return 2; // Protection + } + + public int getEnchantmentValue() { + return 14; + } + + public SoundEvent getEquipSound() { + return SoundEvents.ARMOR_EQUIP_DIAMOND; + } + + public Ingredient getRepairIngredient() { + return Ingredient.of(new ItemStack(CustomOreGenModItems.DIAMONDSHARD.get())); + } + + public String getName() { + return "shard_diamond"; + } + + public float getToughness() { + return 1.0f; + } + + public float getKnockbackResistance() { + return 0.0f; + } + }, ArmorItem.Type.BOOTS, new Item.Properties()); + } +} diff --git a/src/main/java/net/mcreator/customoregen/item/SharddiamondchestplateItem.java b/src/main/java/net/mcreator/customoregen/item/SharddiamondchestplateItem.java new file mode 100644 index 000000000..457a38c69 --- /dev/null +++ b/src/main/java/net/mcreator/customoregen/item/SharddiamondchestplateItem.java @@ -0,0 +1,49 @@ +package net.mcreator.customoregen.item; + +import net.minecraft.world.item.crafting.Ingredient; +import net.minecraft.world.item.ArmorMaterial; +import net.minecraft.world.item.ArmorItem; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Item; +import net.minecraft.sounds.SoundEvent; +import net.minecraft.sounds.SoundEvents; + +import net.mcreator.customoregen.init.CustomOreGenModItems; + +public class SharddiamondchestplateItem extends ArmorItem { + public SharddiamondchestplateItem() { + super(new ArmorMaterial() { + public int getDurabilityForType(ArmorItem.Type type) { + return 300; // Plastron + } + + public int getDefenseForType(ArmorItem.Type type) { + return 7; // Protection + } + + public int getEnchantmentValue() { + return 14; + } + + public SoundEvent getEquipSound() { + return SoundEvents.ARMOR_EQUIP_DIAMOND; + } + + public Ingredient getRepairIngredient() { + return Ingredient.of(new ItemStack(CustomOreGenModItems.DIAMONDSHARD.get())); + } + + public String getName() { + return "shard_diamond"; + } + + public float getToughness() { + return 1.0f; + } + + public float getKnockbackResistance() { + return 0.0f; + } + }, ArmorItem.Type.CHESTPLATE, new Item.Properties()); + } +} diff --git a/src/main/java/net/mcreator/customoregen/item/SharddiamondhelmetItem.java b/src/main/java/net/mcreator/customoregen/item/SharddiamondhelmetItem.java new file mode 100644 index 000000000..034ce5f24 --- /dev/null +++ b/src/main/java/net/mcreator/customoregen/item/SharddiamondhelmetItem.java @@ -0,0 +1,49 @@ +package net.mcreator.customoregen.item; + +import net.minecraft.world.item.crafting.Ingredient; +import net.minecraft.world.item.ArmorMaterial; +import net.minecraft.world.item.ArmorItem; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Item; +import net.minecraft.sounds.SoundEvent; +import net.minecraft.sounds.SoundEvents; + +import net.mcreator.customoregen.init.CustomOreGenModItems; + +public class SharddiamondhelmetItem extends ArmorItem { + public SharddiamondhelmetItem() { + super(new ArmorMaterial() { + public int getDurabilityForType(ArmorItem.Type type) { + return 250; // Casque + } + + public int getDefenseForType(ArmorItem.Type type) { + return 3; // Protection + } + + public int getEnchantmentValue() { + return 14; + } + + public SoundEvent getEquipSound() { + return SoundEvents.ARMOR_EQUIP_DIAMOND; + } + + public Ingredient getRepairIngredient() { + return Ingredient.of(new ItemStack(CustomOreGenModItems.DIAMONDSHARD.get())); + } + + public String getName() { + return "shard_diamond"; + } + + public float getToughness() { + return 1.0f; + } + + public float getKnockbackResistance() { + return 0.0f; + } + }, ArmorItem.Type.HELMET, new Item.Properties()); + } +} diff --git a/src/main/java/net/mcreator/customoregen/item/SharddiamondleggingsItem.java b/src/main/java/net/mcreator/customoregen/item/SharddiamondleggingsItem.java new file mode 100644 index 000000000..c6281edc9 --- /dev/null +++ b/src/main/java/net/mcreator/customoregen/item/SharddiamondleggingsItem.java @@ -0,0 +1,49 @@ +package net.mcreator.customoregen.item; + +import net.minecraft.world.item.crafting.Ingredient; +import net.minecraft.world.item.ArmorMaterial; +import net.minecraft.world.item.ArmorItem; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Item; +import net.minecraft.sounds.SoundEvent; +import net.minecraft.sounds.SoundEvents; + +import net.mcreator.customoregen.init.CustomOreGenModItems; + +public class SharddiamondleggingsItem extends ArmorItem { + public SharddiamondleggingsItem() { + super(new ArmorMaterial() { + public int getDurabilityForType(ArmorItem.Type type) { + return 280; // Jambières + } + + public int getDefenseForType(ArmorItem.Type type) { + return 5; // Protection + } + + public int getEnchantmentValue() { + return 14; + } + + public SoundEvent getEquipSound() { + return SoundEvents.ARMOR_EQUIP_DIAMOND; + } + + public Ingredient getRepairIngredient() { + return Ingredient.of(new ItemStack(CustomOreGenModItems.DIAMONDSHARD.get())); + } + + public String getName() { + return "shard_diamond"; + } + + public float getToughness() { + return 1.0f; + } + + public float getKnockbackResistance() { + return 0.0f; + } + }, ArmorItem.Type.LEGGINGS, new Item.Properties()); + } +} diff --git a/src/main/java/net/mcreator/customoregen/item/SharddiamondpaxelItem.java b/src/main/java/net/mcreator/customoregen/item/SharddiamondpaxelItem.java new file mode 100644 index 000000000..1d8f78193 --- /dev/null +++ b/src/main/java/net/mcreator/customoregen/item/SharddiamondpaxelItem.java @@ -0,0 +1,80 @@ +package net.mcreator.customoregen.item; + +import net.minecraft.world.item.crafting.Ingredient; +import net.minecraft.world.item.Tier; +import net.minecraft.world.item.PickaxeItem; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Item; +import net.minecraft.tags.TagKey; +import net.minecraft.tags.BlockTags; +import net.minecraft.world.level.block.state.BlockState; + +import net.mcreator.customoregen.init.CustomOreGenModItems; + +public class SharddiamondpaxelItem extends PickaxeItem { + public SharddiamondpaxelItem() { + super(new Tier() { + public int getUses() { + return 1000; + } + + public float getSpeed() { + return 6.5f; + } + + public float getAttackDamageBonus() { + return 0f; + } + + public int getLevel() { + return 3; + } + + public int getEnchantmentValue() { + return 14; + } + + public Ingredient getRepairIngredient() { + return Ingredient.of(new ItemStack(CustomOreGenModItems.DIAMONDSHARD.get())); + } + }, 1, -2.8f, new Item.Properties()); + } + + @Override + public float getDestroySpeed(ItemStack stack, BlockState state) { + // Effective on all blocks that pickaxe, shovel, or axe can mine + if (state.is(BlockTags.MINEABLE_WITH_PICKAXE) || + state.is(BlockTags.MINEABLE_WITH_SHOVEL) || + state.is(BlockTags.MINEABLE_WITH_AXE)) { + return getSpeed(); + } + return super.getDestroySpeed(stack, state); + } + + @Override + public boolean isCorrectToolForDrops(ItemStack stack, BlockState state) { + // Can mine blocks that require pickaxe, shovel, or axe + if (state.is(BlockTags.MINEABLE_WITH_PICKAXE) || + state.is(BlockTags.MINEABLE_WITH_SHOVEL) || + state.is(BlockTags.MINEABLE_WITH_AXE)) { + return TierSortingCorrectToolForDrops(stack, state); + } + return false; + } + + private boolean TierSortingCorrectToolForDrops(ItemStack stack, BlockState state) { + // Check if tool tier is sufficient for the block + return getTier().getLevel() >= getRequiredToolLevel(state); + } + + private int getRequiredToolLevel(BlockState state) { + if (state.is(BlockTags.NEEDS_DIAMOND_TOOL)) { + return 3; + } else if (state.is(BlockTags.NEEDS_IRON_TOOL)) { + return 2; + } else if (state.is(BlockTags.NEEDS_STONE_TOOL)) { + return 1; + } + return 0; + } +} diff --git a/src/main/resources/assets/custom_ore_gen/lang/en_us.json b/src/main/resources/assets/custom_ore_gen/lang/en_us.json index a3b400cf8..d84cfbee9 100644 --- a/src/main/resources/assets/custom_ore_gen/lang/en_us.json +++ b/src/main/resources/assets/custom_ore_gen/lang/en_us.json @@ -21,5 +21,10 @@ "block.custom_ore_gen.puregoldenore": "Pure golden ore", "block.custom_ore_gen.highemeraldore": "emerald ore", "item.custom_ore_gen.sharddiamondshovel": "Shard diamond shovel", - "item.custom_ore_gen.ore_biome_finder": "Ore Biome Finder" + "item.custom_ore_gen.ore_biome_finder": "Ore Biome Finder", + "item.custom_ore_gen.sharddiamondhelmet": "Shard Diamond Helmet", + "item.custom_ore_gen.sharddiamondchestplate": "Shard Diamond Chestplate", + "item.custom_ore_gen.sharddiamondleggings": "Shard Diamond Leggings", + "item.custom_ore_gen.sharddiamondboots": "Shard Diamond Boots", + "item.custom_ore_gen.sharddiamondpaxel": "Shard Diamond Paxel" } \ No newline at end of file diff --git a/src/main/resources/assets/custom_ore_gen/models/item/sharddiamondboots.json b/src/main/resources/assets/custom_ore_gen/models/item/sharddiamondboots.json new file mode 100644 index 000000000..5a0df3348 --- /dev/null +++ b/src/main/resources/assets/custom_ore_gen/models/item/sharddiamondboots.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "custom_ore_gen:item/sharddiamondboots" + } +} diff --git a/src/main/resources/assets/custom_ore_gen/models/item/sharddiamondchestplate.json b/src/main/resources/assets/custom_ore_gen/models/item/sharddiamondchestplate.json new file mode 100644 index 000000000..5ae97b043 --- /dev/null +++ b/src/main/resources/assets/custom_ore_gen/models/item/sharddiamondchestplate.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "custom_ore_gen:item/sharddiamondchestplate" + } +} diff --git a/src/main/resources/assets/custom_ore_gen/models/item/sharddiamondhelmet.json b/src/main/resources/assets/custom_ore_gen/models/item/sharddiamondhelmet.json new file mode 100644 index 000000000..680aef470 --- /dev/null +++ b/src/main/resources/assets/custom_ore_gen/models/item/sharddiamondhelmet.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "custom_ore_gen:item/sharddiamondhelmet" + } +} diff --git a/src/main/resources/assets/custom_ore_gen/models/item/sharddiamondleggings.json b/src/main/resources/assets/custom_ore_gen/models/item/sharddiamondleggings.json new file mode 100644 index 000000000..a713e2866 --- /dev/null +++ b/src/main/resources/assets/custom_ore_gen/models/item/sharddiamondleggings.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "custom_ore_gen:item/sharddiamondleggings" + } +} diff --git a/src/main/resources/assets/custom_ore_gen/models/item/sharddiamondpaxel.json b/src/main/resources/assets/custom_ore_gen/models/item/sharddiamondpaxel.json new file mode 100644 index 000000000..60b6ac318 --- /dev/null +++ b/src/main/resources/assets/custom_ore_gen/models/item/sharddiamondpaxel.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "custom_ore_gen:item/sharddiamondpaxel" + } +} diff --git a/src/main/resources/assets/custom_ore_gen/textures/item/sharddiamondboots.png b/src/main/resources/assets/custom_ore_gen/textures/item/sharddiamondboots.png new file mode 100644 index 000000000..7b0c2c941 Binary files /dev/null and b/src/main/resources/assets/custom_ore_gen/textures/item/sharddiamondboots.png differ diff --git a/src/main/resources/assets/custom_ore_gen/textures/item/sharddiamondchestplate.png b/src/main/resources/assets/custom_ore_gen/textures/item/sharddiamondchestplate.png new file mode 100644 index 000000000..15cf585b9 Binary files /dev/null and b/src/main/resources/assets/custom_ore_gen/textures/item/sharddiamondchestplate.png differ diff --git a/src/main/resources/assets/custom_ore_gen/textures/item/sharddiamondhelmet.png b/src/main/resources/assets/custom_ore_gen/textures/item/sharddiamondhelmet.png new file mode 100644 index 000000000..b9a01f630 Binary files /dev/null and b/src/main/resources/assets/custom_ore_gen/textures/item/sharddiamondhelmet.png differ diff --git a/src/main/resources/assets/custom_ore_gen/textures/item/sharddiamondleggings.png b/src/main/resources/assets/custom_ore_gen/textures/item/sharddiamondleggings.png new file mode 100644 index 000000000..d74c77677 Binary files /dev/null and b/src/main/resources/assets/custom_ore_gen/textures/item/sharddiamondleggings.png differ diff --git a/src/main/resources/assets/custom_ore_gen/textures/item/sharddiamondpaxel.png b/src/main/resources/assets/custom_ore_gen/textures/item/sharddiamondpaxel.png new file mode 100644 index 000000000..ac10e3e9e Binary files /dev/null and b/src/main/resources/assets/custom_ore_gen/textures/item/sharddiamondpaxel.png differ diff --git a/src/main/resources/assets/custom_ore_gen/textures/models/armor/sharddiamondarmor_layer_1.png b/src/main/resources/assets/custom_ore_gen/textures/models/armor/sharddiamondarmor_layer_1.png new file mode 100644 index 000000000..7458059ed Binary files /dev/null and b/src/main/resources/assets/custom_ore_gen/textures/models/armor/sharddiamondarmor_layer_1.png differ diff --git a/src/main/resources/assets/custom_ore_gen/textures/models/armor/sharddiamondarmor_layer_2.png b/src/main/resources/assets/custom_ore_gen/textures/models/armor/sharddiamondarmor_layer_2.png new file mode 100644 index 000000000..2888cd240 Binary files /dev/null and b/src/main/resources/assets/custom_ore_gen/textures/models/armor/sharddiamondarmor_layer_2.png differ diff --git a/src/main/resources/data/custom_ore_gen/forge/biome_modifier/sharddiamondblockore_biome_modifier.json b/src/main/resources/data/custom_ore_gen/forge/biome_modifier/sharddiamondblockore_biome_modifier.json.disabled similarity index 100% rename from src/main/resources/data/custom_ore_gen/forge/biome_modifier/sharddiamondblockore_biome_modifier.json rename to src/main/resources/data/custom_ore_gen/forge/biome_modifier/sharddiamondblockore_biome_modifier.json.disabled diff --git a/src/main/resources/data/custom_ore_gen/recipes/sharddiamondboots.json b/src/main/resources/data/custom_ore_gen/recipes/sharddiamondboots.json new file mode 100644 index 000000000..a82447063 --- /dev/null +++ b/src/main/resources/data/custom_ore_gen/recipes/sharddiamondboots.json @@ -0,0 +1,18 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "equipment", + "pattern": [ + " ", + "aaa", + "a a" + ], + "key": { + "a": { + "item": "custom_ore_gen:diamondshard" + } + }, + "result": { + "item": "custom_ore_gen:sharddiamondboots", + "count": 1 + } +} diff --git a/src/main/resources/data/custom_ore_gen/recipes/sharddiamondchestplate.json b/src/main/resources/data/custom_ore_gen/recipes/sharddiamondchestplate.json new file mode 100644 index 000000000..ec936f26a --- /dev/null +++ b/src/main/resources/data/custom_ore_gen/recipes/sharddiamondchestplate.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "equipment", + "pattern": [ + "aDa", + "aaa", + "aaa" + ], + "key": { + "a": { + "item": "custom_ore_gen:diamondshard" + }, + "D": { + "item": "minecraft:diamond" + } + }, + "result": { + "item": "custom_ore_gen:sharddiamondchestplate", + "count": 1 + } +} diff --git a/src/main/resources/data/custom_ore_gen/recipes/sharddiamondhelmet.json b/src/main/resources/data/custom_ore_gen/recipes/sharddiamondhelmet.json new file mode 100644 index 000000000..918d4dd00 --- /dev/null +++ b/src/main/resources/data/custom_ore_gen/recipes/sharddiamondhelmet.json @@ -0,0 +1,18 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "equipment", + "pattern": [ + "aaa", + "a a", + " " + ], + "key": { + "a": { + "item": "custom_ore_gen:diamondshard" + } + }, + "result": { + "item": "custom_ore_gen:sharddiamondhelmet", + "count": 1 + } +} diff --git a/src/main/resources/data/custom_ore_gen/recipes/sharddiamondleggings.json b/src/main/resources/data/custom_ore_gen/recipes/sharddiamondleggings.json new file mode 100644 index 000000000..f021efa65 --- /dev/null +++ b/src/main/resources/data/custom_ore_gen/recipes/sharddiamondleggings.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "equipment", + "pattern": [ + "aDa", + "a a", + "a a" + ], + "key": { + "a": { + "item": "custom_ore_gen:diamondshard" + }, + "D": { + "item": "minecraft:diamond" + } + }, + "result": { + "item": "custom_ore_gen:sharddiamondleggings", + "count": 1 + } +} diff --git a/src/main/resources/data/custom_ore_gen/recipes/sharddiamondpaxel.json b/src/main/resources/data/custom_ore_gen/recipes/sharddiamondpaxel.json new file mode 100644 index 000000000..ebc9f3a55 --- /dev/null +++ b/src/main/resources/data/custom_ore_gen/recipes/sharddiamondpaxel.json @@ -0,0 +1,27 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "equipment", + "pattern": [ + "APS", + "S S", + " " + ], + "key": { + "A": { + "item": "custom_ore_gen:sharddiamondaxe" + }, + "P": { + "item": "custom_ore_gen:sharddiamondshovel" + }, + "S": { + "item": "custom_ore_gen:sharddiamondpickaxe" + }, + " ": { + "item": "minecraft:stick" + } + }, + "result": { + "item": "custom_ore_gen:sharddiamondpaxel", + "count": 1 + } +}