Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

TripleCF

Members
  • Joined

  • Last visited

Everything posted by TripleCF

  1. Im not english so I don't know the name. I think the official term for it is access modifier or so. Doesn't change anything about java knowledge
  2. Ok I get your points. Thing was I tried having my tick method static but IntelliJ showed me an error on my boolean toggled: Non static field cannot be referenced from a static context. I probably have a bit of misunderstanding of the static constructor. I changed the boolean toggled to static as well as the method which lead to it working. I think I also understand the sides a bit better. Thanks for the help!
  3. Ok so thanks alot for the fast reply. Thing is following: My method can't be static as far as I know because I use some variables out of the class. Then it should be running in Singleplayer but It should control the world so I thought world event tick would fit best. I registered the event now by doing MinecraftForge.EVENT_BUS.register(new Test()) which somehow works. But from a good qualitiy coding aspect should I instead use a non static method and change the tick event to client?
  4. @Mod.EventBusSubscriber(modid = challengemod.MOD_ID, bus = Mod.EventBusSubscriber.Bus.FORGE, value = Dist.DEDICATED_SERVER) public class Test { private boolean toggled = true; @SubscribeEvent public void onTick(TickEvent.WorldTickEvent event) { System.out.println("tickerticker"); if(toggled){ if (Minecraft.getInstance().player != null) { System.out.println("tick"); } } Hi I watched some tutorials but somehow it just doesn't register. Nothing happens. Any idea? From what I heard you don't need to register them in the main class but the way I do it here just outputs nothing. Oh btw when I had the same thing in my main class it worked fine.
  5. Sry I'm dumb. I could solve my question by looking at the WorldBorder command.
  6. Hi, I made a small project for me and my friends and setted the world border. This works alright but I have a few questions how it is possible to change a few border settings. Is there a way making mobs be able to spawn outside of the border? I say a create settings method but tbh didn't have a clue on how to use it.

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.