Jump to content

Vuk5001

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by Vuk5001

  1. Found it it was : instead of . Thanks😀
  2. Did you go open with and browse then select your jre and go in bin then select javaw.exe?
  3. Hello, I started creating a mod for Minecraft 1.18.1. When I was adding a block and tested in game name would be like: block.modid.tin_ore With items it's normal. I checked errors in all files and nothing. Here is my code: package com.hiddenstudios.testmod.blocks; import com.hiddenstudios.testmod.item.ModItem; import com.hiddenstudios.testmod.testmod; import net.minecraft.world.item.BlockItem; import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.item.Item; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.material.Material; import net.minecraftforge.eventbus.api.IEventBus; import net.minecraftforge.registries.DeferredRegister; import net.minecraftforge.registries.ForgeRegistries; import net.minecraftforge.registries.RegistryObject; import java.util.function.Supplier; public class ModBlocks { public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, testmod.MOD_ID); public static final RegistryObject<Block> TIN_BLOCK = registerBlock("tin_block", () -> new Block(BlockBehaviour.Properties.of(Material.METAL) .strength(9f).requiresCorrectToolForDrops()), CreativeModeTab.TAB_MISC); public static final RegistryObject<Block> RAW_TIN_BLOCK = registerBlock("raw_tin_block", () -> new Block(BlockBehaviour.Properties.of(Material.METAL) .strength(7f).requiresCorrectToolForDrops()), CreativeModeTab.TAB_MISC); public static final RegistryObject<Block> tin_ORE = registerBlock("tin_ore", () -> new Block(BlockBehaviour.Properties.of(Material.STONE) .strength(5f).requiresCorrectToolForDrops()), CreativeModeTab.TAB_MISC); private static <T extends Block> RegistryObject<T> registerBlock(String name, Supplier<T> block, CreativeModeTab tab) { RegistryObject<T> toReturn = BLOCKS.register(name, block); registerBlockItem(name, toReturn, tab); return toReturn; } private static <T extends Block> RegistryObject<Item> registerBlockItem(String name, RegistryObject<T> block, CreativeModeTab tab) { return ModItem.ITEMS.register(name, () -> new BlockItem(block.get(), new Item.Properties().tab(tab))); } public static void register(IEventBus eventBus) { BLOCKS.register(eventBus); } } and here is my translation: { "item.testmod.tin": "Tin", "item.testmod.raw_tin": "Raw Tin", "block:testmod.tin_block": "Tin Block", "block:testmod.tin_ore": "Tin Block", "block:testmod.raw_tin_block": "Tin Block" } Thanks😀
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.