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.

RekTek249

Members
  • Joined

  • Last visited

  1. Yep, that did it... I rarely get to use annotations, other than @Deprecated, @Nullable and such vanilla ones. Thanks for your help.
  2. Don't take this too seriously, but I'd go for the following method: @SubscribeEvent public void regiterItems(ProjectileImpactEvent event) { if (event.getRayTraceResult().typeOfHit == RayTraceResult.Type.BLOCK){ //Destroy block here } } This would be the best event to go for, in my opinion. EDIT: For the block destruction, I'd try event.getEntity().getEntityWorld().setBlockToAir(event.getRayTraceResult().getBlockPos()); But I haven't tested it. I'm not even sure if event.getEntity() returns the player that shot the arrow....
  3. For example, my common proxy: Would there be a problem in there ? It still won't work with your method.
  4. Actually, I managed to add it to the game using the following code in my previous function: Is it correct to use this ? It seems to be working, but there might be a reason for you to use the @SubscribeEvent instead.
  5. Alright, so I'm still not quite sure about how theses SubscribeEvent annotations... Your source code is quite long and seems to contain elements I do not need to use. I tried adding the following to my code: CommonProxy.java ClientProxy.java However, it would seem theses two are not even fired up. I'm sure there's something I should know but I don't know here...
  6. Hi, so I just started out forge modding, with no prior knowledge of it. I have a good knowledge of java and have coded some plugins before, but this is my first time when it comes to modding. So, I'm trying to follow the official forge documentation. I kind of tried to register the item into the game, however it doesn't appear in the creative tab I set it to or using /give. Here is the code I have thus far: (Proxies are displayed in the same class, but they're not. Proxies: Main RegisterItems.java SimpleItem.java So, am I missing something out there ? I tried to follow the documentation's recommendation as to proxies, server/client side stuff. Apparently I should have used an Interface for CommonProxy but I thought an abstract class would be a better choice. If you find any other issues in the code, don't hesitate to let me know.

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.