Jump to content

LuisAduana

Members
  • Posts

    14
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • URL
    https://www.youtube.com/channel/UCJKNQRQvO9_SairvZXVww5A
  • Location
    México

Recent Profile Visitors

60025 profile views

LuisAduana's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Can you share how your classes looks like? I have a problem. I can set on the ground the LiquidBlock but it "breaks" instantly.
  2. Can you share your items/blocks registries and the class fixed? please :C
  3. someone knows how generated by datagen?
  4. No, I can start the game normally and use the item on inventory and put the block
  5. You are using JDK 8 which only works on Minecraft/Forge 1.16 or lower. Try to install JDK 16 and make sure the path of the version installated is running, just execute "java --version" command on windows terminal and you have to see the current version. Then try install Forge again
  6. Which Forge and Java version do you have?
  7. which forge version are you trying to install?
  8. I'm trying to create a loot table for my custom block to drop my custom item but seems doesn't works. Main Class: @Mod(SwordMod.MODID) public class SwordMod { public static final String MODID = "swordmod"; private static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, SwordMod.MODID); private static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, SwordMod.MODID); public static final RegistryObject<Item> EXAMPLE_ITEM = ITEMS.register("swordskylibur_item", () -> new Item( new Item.Properties().tab(CreativeModeTab.TAB_COMBAT))); public static final RegistryObject<Block> EXAMPLE_BLOCK = BLOCKS.register("rockstone_block", () -> new Block(BlockBehaviour.Properties .of(Material.STONE, MaterialColor.COLOR_BLUE) .strength(1.5f, 15f).harvestTool(ToolType.PICKAXE) .harvestLevel(1).sound(SoundType.WOOD) // Wood sound just for test .requiresCorrectToolForDrops())); public static final RegistryObject<BlockItem> CUSTOM_BLOCK = ITEMS.register("rockstone_item", () -> new BlockItem(EXAMPLE_BLOCK.get(), new Item.Properties().tab(CreativeModeTab.TAB_BUILDING_BLOCKS))); public SwordMod() { IEventBus bus = FMLJavaModLoadingContext.get().getModEventBus(); BLOCKS.register(bus); ITEMS.register(bus); MinecraftForge.EVENT_BUS.register(this); } } loot table file (generated by misode.github.io) { "type": "minecraft:block", "pools": [ { "rolls": 1, "bonus_rolls": 0, "entries": [ { "type": "minecraft:alternatives", "children": [ { "type": "minecraft:item", "name": "swordmod:rockstone_block", "conditions": [ { "condition": "minecraft:match_tool", "predicate": { "enchantments": [ { "enchantment": "minecraft:silk_touch", "levels": { "min": 1 } } ] } } ] }, { "type": "minecraft:item", "name": "swordmod:rockstone_item", "functions": [ { "function": "minecraft:apply_bonus", "enchantment": "minecraft:fortune", "formula": "minecraft:ore_drops" }, { "function": "minecraft:explosion_decay" } ] } ] } ] } ] } And an image of my project: I hope you can help me
  9. try execute it as admin also with cmd admin permissions
  10. did you try turn off your antivirus?
  11. This is a classic design pattern, you have to implement Singleton Pattern. Wikipedia: The singleton pattern is a software design pattern that restricts the instantiation of a class to one "single" instance. This is useful when exactly one object is needed to coordinate actions across the system. The pattern implementation is easy to found but here is a quikly example: Create a new class with all the attributes you need (boolean seen) and the Class as property. Make your constructor as PRIVATE and create an static method to get the instance. public final class Singleton { private static Singleton instance; public boolean seen = false; // Default value private Singleton() {} public static Singleton getInstance() { if (instance == null) { instance = new Singleton(); } return instance; } } Where you need use the instance you always will use "getInstance" method: Singleton myInstance = Singleton.getInstance(); It doesn't matter where you call the "getInstance" method from. For access to the value or modify it, simply like this: myInstance.seen = true; The idea is that you will only create instance once, the second time when you call getInstance method you will get the same created instance and not a new one. I hope this help you
  12. I have not found nothing about "pack.mcmeta" on forge documentation. I only find that file when download a new MDK but I think it's configurated for 1.16.2 version, not for 1.17.1 Can you give me some link? thanks
  13. I'm using: MDK 1.17.1 JDK 8 I'm config the mods.toml file: [[dependencies.randommod]] modId="minecraft" mandatory=true versionRange="[1.17.1]" ordering="NONE" side="BOTH" When I execute runClient, the game load and wait for something with the message: File mod file C:\eclipse-workspace\project\build\resources\main failed to load a valid ResourcePackInfo Any idea?
×
×
  • Create New...

Important Information

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