Creation d'un menu dans le creatif, Rework image de l'ore du Diamond shard et de l'items
@@ -4,6 +4,7 @@
|
||||
*/
|
||||
package net.mcreator.customoregen.init;
|
||||
|
||||
import net.minecraftforge.registries.RegistryObject;
|
||||
import net.minecraftforge.registries.DeferredRegister;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
@@ -11,19 +12,62 @@ import net.minecraftforge.event.BuildCreativeModeTabContentsEvent;
|
||||
|
||||
import net.minecraft.world.item.CreativeModeTabs;
|
||||
import net.minecraft.world.item.CreativeModeTab;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.core.registries.Registries;
|
||||
|
||||
import net.mcreator.customoregen.CustomOreGenMod;
|
||||
import net.mcreator.customoregen.init.CustomOreGenModItems;
|
||||
|
||||
@Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD)
|
||||
public class CustomOreGenModTabs {
|
||||
public static final DeferredRegister<CreativeModeTab> REGISTRY = DeferredRegister.create(Registries.CREATIVE_MODE_TAB, CustomOreGenMod.MODID);
|
||||
|
||||
// Start of user code block tabs
|
||||
public static final RegistryObject<CreativeModeTab> CUSTOM_ORE_GEN_TAB = REGISTRY.register("custom_ore_gen_tab",
|
||||
() -> CreativeModeTab.builder()
|
||||
.title(net.minecraft.network.chat.Component.translatable("itemGroup.custom_ore_gen"))
|
||||
.icon(() -> new ItemStack(CustomOreGenModItems.DIAMONDSHARD.get()))
|
||||
.displayItems((parameters, output) -> {
|
||||
// Minerais
|
||||
output.accept(CustomOreGenModBlocks.DEEPSLATESHARDDIAMONDORE.get().asItem());
|
||||
output.accept(CustomOreGenModBlocks.CONCENTRATEDDIAMONDORE.get().asItem());
|
||||
output.accept(CustomOreGenModBlocks.PUREGOLDENORE.get().asItem());
|
||||
output.accept(CustomOreGenModBlocks.DEEPSLATEPUREGOLDENORE.get().asItem());
|
||||
output.accept(CustomOreGenModBlocks.CONCENTRATEDCOALORE.get().asItem());
|
||||
output.accept(CustomOreGenModBlocks.IRONORE.get().asItem());
|
||||
output.accept(CustomOreGenModBlocks.DEEPSLATEIRONORE.get().asItem());
|
||||
output.accept(CustomOreGenModBlocks.LAPISORE.get().asItem());
|
||||
output.accept(CustomOreGenModBlocks.DEEPSLATELAPISORE.get().asItem());
|
||||
output.accept(CustomOreGenModBlocks.REDSTONEORE.get().asItem());
|
||||
output.accept(CustomOreGenModBlocks.DEEPSLATEREDSTONEORE.get().asItem());
|
||||
output.accept(CustomOreGenModBlocks.COPPERHIGHORE.get().asItem());
|
||||
output.accept(CustomOreGenModBlocks.COPPERLOWERORE.get().asItem());
|
||||
output.accept(CustomOreGenModBlocks.HIGHEMERALDORE.get().asItem());
|
||||
output.accept(CustomOreGenModBlocks.LOWEREMERALDORE.get().asItem());
|
||||
|
||||
// Items
|
||||
output.accept(CustomOreGenModItems.DIAMONDSHARD.get());
|
||||
output.accept(CustomOreGenModItems.ORE_BIOME_FINDER.get());
|
||||
|
||||
// Outils
|
||||
output.accept(CustomOreGenModItems.SHARDDIAMONDPICKAXE.get());
|
||||
output.accept(CustomOreGenModItems.SHARDDIAMONDSHOVEL.get());
|
||||
output.accept(CustomOreGenModItems.SHARDDIAMONDAXE.get());
|
||||
output.accept(CustomOreGenModItems.SHARDDIAMONDPAXEL.get());
|
||||
|
||||
// Armure
|
||||
output.accept(CustomOreGenModItems.SHARDDIAMONDHELMET.get());
|
||||
output.accept(CustomOreGenModItems.SHARDDIAMONDCHESTPLATE.get());
|
||||
output.accept(CustomOreGenModItems.SHARDDIAMONDLEGGINGS.get());
|
||||
output.accept(CustomOreGenModItems.SHARDDIAMONDBOOTS.get());
|
||||
})
|
||||
.build());
|
||||
// End of user code block tabs
|
||||
|
||||
@SubscribeEvent
|
||||
public static void buildTabContentsVanilla(BuildCreativeModeTabContentsEvent tabData) {
|
||||
if (tabData.getTabKey() == CreativeModeTabs.INGREDIENTS) {
|
||||
tabData.accept(CustomOreGenModItems.DIAMONDSHARD.get());
|
||||
tabData.accept(CustomOreGenModBlocks.SHARDDIAMONDBLOCKORE.get().asItem());
|
||||
tabData.accept(CustomOreGenModBlocks.DEEPSLATESHARDDIAMONDORE.get().asItem());
|
||||
} else if (tabData.getTabKey() == CreativeModeTabs.TOOLS_AND_UTILITIES) {
|
||||
tabData.accept(CustomOreGenModItems.SHARDDIAMONDPICKAXE.get());
|
||||
|
||||
@@ -26,5 +26,6 @@
|
||||
"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"
|
||||
"item.custom_ore_gen.sharddiamondpaxel": "Shard Diamond Paxel",
|
||||
"itemGroup.custom_ore_gen": "Custom Ore Gen"
|
||||
}
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"parent": "block/cube",
|
||||
"textures": {
|
||||
"down": "custom_ore_gen:block/shard_diamond_ore",
|
||||
"up": "custom_ore_gen:block/shard_diamond_ore",
|
||||
"north": "custom_ore_gen:block/shard_diamond_ore",
|
||||
"east": "custom_ore_gen:block/shard_diamond_ore",
|
||||
"south": "custom_ore_gen:block/shard_diamond_ore",
|
||||
"west": "custom_ore_gen:block/shard_diamond_ore",
|
||||
"particle": "custom_ore_gen:block/shard_diamond_ore"
|
||||
"down": "custom_ore_gen:block/shard_diamond_ore_2",
|
||||
"up": "custom_ore_gen:block/shard_diamond_ore_2",
|
||||
"north": "custom_ore_gen:block/shard_diamond_ore_2",
|
||||
"east": "custom_ore_gen:block/shard_diamond_ore_2",
|
||||
"south": "custom_ore_gen:block/shard_diamond_ore_2",
|
||||
"west": "custom_ore_gen:block/shard_diamond_ore_2",
|
||||
"particle": "custom_ore_gen:block/shard_diamond_ore_2"
|
||||
},
|
||||
"render_type": "solid"
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"parent": "block/cube_all",
|
||||
"textures": {
|
||||
"all": "custom_ore_gen:block/shard_diamond_ore_2",
|
||||
"particle": "custom_ore_gen:block/shard_diamond_ore_2"
|
||||
"all": "custom_ore_gen:block/shard_diamond_deepslate_ore",
|
||||
"particle": "custom_ore_gen:block/shard_diamond_deepslate_ore"
|
||||
},
|
||||
"render_type": "solid"
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "custom_ore_gen:item/shard_diamond-removebg-preview"
|
||||
"layer0": "custom_ore_gen:item/diamond_shard"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 507 B After Width: | Height: | Size: 633 B |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 860 B After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 860 B After Width: | Height: | Size: 860 B |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 869 B |