change window title

Started by matgaw123 on Thu, 09/29/2022 - 18:00

Topic category: Help with modding (Java Edition)

Last seen on 18:09, 29. Sep 2022
Joined Sep 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
change window title
Thu, 09/29/2022 - 18:00

i want to change window title 

and this is what is find https://forums.minecraftforge.net/topic/31932-change-window-title/  

this under is someone code who have this 

Display.setTitle("Hello World!");

https://stackoverflow.com/questions/62711969/why-does-my-code-not-regis…

and this is my code

i m new with coding 

can someone help

sorry for my english

 

 

 

Last seen on 18:09, 29. Sep 2022
Joined Sep 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
@Mod.EventBusSubscriber(bus …
Thu, 09/29/2022 - 18:03
@Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD)
public class Namechange {
    public Namechange() {
    }

    @SubscribeEvent
    public static void init(FMLCommonSetupEvent event) {
        new Namechange();
    }

    @Mod.EventBusSubscriber
    private static class ForgeBusEvents {
        // Example Forge bus event registration
        @SubscribeEvent
        public static void addFeatureToBiomes(BiomeLoadingEvent event) {
        }

        @SubscribeEvent
        public static void serverLoad(ServerStartingEvent event) {
        }

        @OnlyIn(Dist.CLIENT)
        @SubscribeEvent
        public static void clientLoad(FMLClientSetupEvent event) {
        }
    }
}
Last seen on 18:09, 29. Sep 2022
Joined Sep 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
i upload wrong code this is…
Thu, 09/29/2022 - 18:11

i upload wrong code this is it

@Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD)
public class Test {
    public Test() {
    }

    @SubscribeEvent
    public static void init(FMLCommonSetupEvent event) {
    Display.setTitle("mod pack by matgaw123");
    }

    @Mod.EventBusSubscriber
    private static class ForgeBusEvents {
        // Example Forge bus event registration
        @SubscribeEvent
        public static void addFeatureToBiomes(BiomeLoadingEvent event) {
        }

        @SubscribeEvent
        public static void serverLoad(ServerStartingEvent event) {
        }

        @OnlyIn(Dist.CLIENT)
        @SubscribeEvent
        public static void clientLoad(FMLClientSetupEvent event) {
        }
    }
}

why this don t work