Jump to content

I want to create small mod but I have no idea how


Gatis

Recommended Posts

Hi, my name is Gatis.

Mostly all I do is play minecraft on Hypixel server. I play Skyblock where almost every player has installed QOL mods. They are nice and work nice but recently the grind I'm on requires not wasting time on boosts and if I'm watching something I usually miss it. Let me explain better.

So there is "Mining speed boost" when it's ready message appears in chat. Mod I've been using allows to copy chat message, paste it in mod and next time same message appears it flashes big notification message on screen that speed boost is ready. The thing is somehow I still miss the notification. SO, I want to create mod that can detect that message and make more noticable notification (ex. bigger) or even stop me from moving for 10 sec if I don't use it instantly. I have no knowledge about java

I have prepared intellij with forge on 1.8.9 I'm just left with this: 


               package com.example.examplemod;

 

               import net.minecraft.init.Blocks;

               import net.minecraftforge.fml.common.Mod;

               import net.minecraftforge.fml.common.Mod.EventHandler;

               import net.minecraftforge.fml.common.event.FMLInitializationEvent;

 

              @Mod(modid = ExampleMod.MODID, version = ExampleMod.VERSION)

              public class GatisMOD

             {

                          public static final String MODID = "GatisMOD"; \

                          public static final String VERSION = "1.0";

 

                         @EventHandler

                         public void init(FMLInitializationEvent event)

                         {

                                     // some example code

                                     System.out.println("DIRT BLOCK >> "+Blocks.dirt.getUnlocalizedName());

                         }

}

 

 

I've watched many video, mostly they show how to setup everything but how to create, prepare file and later (export I guess) export to import in mods folder to use they don't

I'd appreciate any help, maybe someone would explain some things to me. In future I have plans to make other feature but I guess not for now.

Edited by Gatis
Edited one sentence
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I made it by copying the properties of the soul one. How do I copy the block entity too? package net.Blue4X.Revive; import net.minecraft.world.item.BlockItem; import net.minecraft.world.item.Item; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.CampfireBlock; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.BlockStateProperties; 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; import java.util.function.ToIntFunction; public class ModBlocks { public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, TheRevival.MODID); public static final RegistryObject<Block> BLOCK_CAMPFIRE = registerBlock( () -> new CampfireBlock(true, 4, BlockBehaviour.Properties.ofFullCopy(Blocks.SOUL_CAMPFIRE) .ignitedByLava() .noOcclusion() .lightLevel(litBlockEmission(15)) ) ); private static <T extends Block> RegistryObject<T> registerBlock(Supplier<T> block) { RegistryObject<T> toReturn = BLOCKS.register("block_campfire", block); registerBlockItem(toReturn); return toReturn; } private static <T extends Block> void registerBlockItem(RegistryObject<T> block) { ModItems.ITEMS.register("block_campfire", () -> new BlockItem(block.get(), new Item.Properties())); } public static void register(IEventBus EventBus) { BLOCKS.register(EventBus); } private static ToIntFunction<BlockState> litBlockEmission(int pLightValue) { return p_50763_ -> p_50763_.getValue(BlockStateProperties.LIT) ? pLightValue : 0; } } Minecraft 1.20.6 Forge 50.0.5
    • Help I turned on the xaeros minimap debug and the game crashed instantly and i cant seem to get into my server or even singleplayer as it crashes instantly, i tried to check from the minimap txt file and debug is set on false but still cant get in.  Heres the crash report: https://pastebin.com/HSWLC2tA Update: i can now get inside the world fine but when i try to open the minimap it crashes instantly. Heres the latest crash report as it seems different: https://pastebin.com/WqJnuEcR And i cant seem to figure out whats the problem
    • I Need help. I tried many things with a Developer from this server and we just dont know what to do. No one rn can find the error.  I Get kicked very often from a specific server with bc of this Exception. Does someone know the Reason? Pls help guys
    • Im currently trying to install forge to play some mods that are only avilable in 1.16.5, and since I would like it to work with OptiFine I downloaded the 36.1.0, installer, it didnt work, so I downloaded the recommended one, it still didint work, maybe the latest version? nop, will still not work, downloaded some more random versions that werent the ones I needed or recommended and it will still crash telling me "Something went wrong while installing: java.lang.NullPointerException" I keep trying and searching answers for this problem but they will just not work, I dont know what to do, and each answer is completely different, I dont understad why it doesnt work. I would really appreciate if somebody could give me an answer, if it works thanks, if it doesnt well at least you tried helping, thanks!   This is the installer.log in case you need it: JVM info: Oracle Corporation - 1.8.0_202 - 25.202-b08 java.net.preferIPv4Stack=true Current Time: 17/05/2024 07:44:51 Host: files.minecraftforge.net [172.67.161.211, 104.21.58.163] Host: maven.minecraftforge.net [104.21.58.163, 172.67.161.211] Host: libraries.minecraft.net [13.107.246.69, 13.107.213.69] Host: launchermeta.mojang.com [13.107.246.71, 13.107.213.71] Host: piston-meta.mojang.com [13.107.213.41, 13.107.246.41] Host: sessionserver.mojang.com [13.107.246.69, 13.107.213.69] Host: authserver.mojang.com [Unknown] java.lang.NullPointerException     at net.minecraftforge.installer.json.Util.readFully(Util.java:95)     at net.minecraftforge.installer.json.Util.loadInstallProfile(Util.java:30)     at net.minecraftforge.installer.SimpleInstaller.launchGui(SimpleInstaller.java:178)     at net.minecraftforge.installer.SimpleInstaller.main(SimpleInstaller.java:154)  
    • Hello, i have a problem with creating a modded server, i keep getting crashes and i don't understand what is the problem. I'm not an profesional at coding and i wanted to just play with few friends with some mods. I tried changing verions of forge server installer, like newest and the most recommended on forge server download page. i would be very thankfull if someone could help me.  I checked and whem im launching a game with the it works And im sorry for bad wording, enlgish isn't my first language.   This is the crash report.  
  • Topics

×
×
  • Create New...

Important Information

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