-
Posts
14 -
Joined
-
Last visited
Everything posted by LuisAduana
-
[SOLVED] [1.17.1] How to/Fluids not working
LuisAduana replied to Majd123mc's topic in Modder Support
Can you share how your classes looks like? I have a problem. I can set on the ground the LiquidBlock but it "breaks" instantly. -
[1.17.1] Custom Fluid tick method not running
LuisAduana replied to Goosey's topic in Modder Support
Can you share your items/blocks registries and the class fixed? please :C -
[1.17.1] .harvestTool(ToolType.PICKAXE) not working
LuisAduana replied to Noah40's topic in Modder Support
someone knows how generated by datagen? -
No, I can start the game normally and use the item on inventory and put the block
-
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
-
Which Forge and Java version do you have?
-
which forge version are you trying to install?
-
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
-
try execute it as admin also with cmd admin permissions
-
did you try turn off your antivirus?
-
How do I create a global variable that works across all my NPC's?
LuisAduana replied to Ds24's topic in Noppes' Mods
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 -
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?