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.

[1.12.2 FORGE] Event Modification Not Functioning

Featured Replies

Posted

So I'm trying to create a mod to check a player's held pickaxe against a required pickaxe when mining a given block, canceling the BreakEvent if it doesn't match, and allowing it if it does. I'm new to coding and modding, but I've been able to set up the basis of my mod using tutorials and the forums as a resource (I had a tiny bit of prior coding experience).

My issue is that while the code in Eclipse has no errors, and the mod is recognized in the test game environment, the behaviour I'm trying to achieve just isn't occurring. Being very new to Java, my best guess is that the ClientProxy I set up following the tutorial is missing something I need, since the tutorial set it up including a "ModelLoader" function, which I assume was related to adding an item into the game, which the tutorial was working towards as a first lesson (which I completed successfully, but removed the resources and the code related to adding the item, besides what's in ClientProxy and CommonProxy since that's what I'm wondering about). It seems like it's just not initializing or something.

 

(Edit) Here's my github:

https://github.com/VulpixUsedEmber/ECMining/tree/master/ECMining

Everything besides the "CustomEvent" class and the related code in the Main class PreInit was set up as a basic mod framework from a tutorial, possibly with a few things (like ModelLoader) included for adding items which I'm not using.

Edited by VulpixUsedEmber

1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support. For more information on this check out the LTS on the top of the page.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Guest
This topic is now closed to further replies.

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.