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.

Animefan8888

Forge Modder
  • Joined

  • Last visited

Everything posted by Animefan8888

  1. Several ways. Why not take a look at the net.minecraftforge.event package and sub-packages? There is definitely an event for what you want.
  2. I'm sorry what? Its Nonnull and part of a NonNullSupplier but you're returning null... Also did you make sure to register your Capability.
  3. Post your code. I'm not gonna watch a YouTube video to see what potentially is your code.
  4. Considering that the register event is running on that bus you will need two event handlers.
  5. No you cannot. The server doesn't have capabilities. Because there is only one server in question. It's not that complicated... Use events such as ServerStartingEvent to create a file if it doesnt exist(muted.json). Then whenever you run your mute command save the data to the file using Gson. If you dont want it to save when you run the command use the ServerStoppingEvent to save the data you have.
  6. This is not true as there are two different event buses. The mod event bus is incorrect for this event. Either dont specify one or change it to Bus.FORGE(the default one).
  7. @SubscribeEvent public static void onCommonSetup(FMLCommonSetupEvent event) { CapabilityManager.INSTANCE.register(IMoreHealth.class, new MoreHealthStorage(), MoreHealth::new); } This won't run I don't think. You should register it in your constructor like so. FMLJavaModLoadingContext.get().getModEventBus().addListener(this::onCommonSetup);
  8. I think it is your Capability instance that is null. Show where you register it.
  9. Think basic Java file creation. Look up some tutorials on Gson if you need it. Use the ServerStartingEvent or ServerStartedEvent. Then everytime the command is run update the file.
  10. Make it public static final and set it equal to null. I think.
  11. Don't register your Capability in the @Mod files constructor instead do it in the FMLCommonSetupEvent.
  12. Learn java. Do you know the difference between a static method and a non static method?
  13. The problem is that the BlockCrops is expecting your Block to have it's AGE property on it when it doesn't. So you'll have to not extend that class or use its AGE property.
  14. LazyOptional is the type that you need to return yes. But is IMana a LazyOptional instance? No therefore you can't cast it into a LazyOptional. You need to have a LazyOptional instance in your ICapabilityProvider.
  15. Yes it would be. Technically. The ICapabilityProvider is attached to the entity and it stores the "instance" field. Yes every time an entity is created it attaches a new ICapabilityProvider to that entity.
  16. Your IMana instance in your provider can't be static if you are gonna use MANA.getDefaultInstance(). You can't do this either don't know if I'm looking at outdated code or not.
  17. It matters because there are final fields in the Block class that aren't set unless you call the super. Add them to the list in their constructor? Also I think he was also pointing out that having two lists is pointless. Post your updated code.
  18. You might not understand how a LazyOptional works take a look at this thread.
  19. You dont. ops.json is for oped players you wouldn't use it for this. Create a file in the server directory called muted.json and save that file when the world saves? You would use the Gson library minecraft uses for its json interactions. I dont think the vanilla ban command let's you ban people that aren't online unless it's with IPs.

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.