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.

Featured Replies

Posted

I don't know what I am doing wrong here. The block is registered with the proper registry name. The name is provided correctly (I think) in the lang file. Don't know why it would display as "Air" too. That's oddly specific considering I have no mentions of Air anywhere.

Any help would be appreciated.

Here are the related classes/files:

Main Class: 
https://github.com/Cerandior/VanillaExtended/blob/master/src/main/java/teabx/vanillaextended/main/VanillaExtended.java

BlockList Class: 
https://github.com/Cerandior/VanillaExtended/blob/master/src/main/java/teabx/vanillaextended/blocks/BlockList.java
 

ItemList Class:
https://github.com/Cerandior/VanillaExtended/blob/master/src/main/java/teabx/vanillaextended/items/ItemList.java
 

lang File: 
https://github.com/Cerandior/VanillaExtended/blob/master/src/main/resources/assets/vanillaextended/lang/en_us.json

Edited by Cerandior

  • Author
15 minutes ago, diesieben07 said:

You never register your block.

 

Additional remarks:

  • registerDispenseBehavior must be called through DeferredWorkQueue, it is not threadsafe.
  • Same for your entity spawn registration.

Oops, sorry about that, I thought I had set-up everything at the beginning, didn't think of checking what the heck I was actually doing in the event.

Also, thank you for the additional information about the two other things, however DeferredWorkQueue is deprecated for me on forge 1.14.4-28.1.96. 

Quote

This is being deprecated in favour of a new interface on loading events, to remove confusion about how it operates. #TODO

Is there any alternative?

 

Additional Question: Do all blocks take the air registry name by default if you don't specify one?

Edited by Cerandior

  • Author

Another thing which is unrelated to this topic, however I don't want to make another post about it since it's mostly a programming-practice related question more than problems with the mod.

I have read a couple of things about static initializers, and apparently they are not good for Forge. Anyone would care to explain why? Is the correct approach to declare objects as static but initialize them inside the registry events?

I am asking because my Entities are currently being initialized inside a static block. Or perhaps to be more specific I should say that I am declaring and initializing a static object at the same time. Is this bad?

Edited by Cerandior

  • 1 year later...

diesieben. just gotta say, I've seen you on basically every forum post I've been to and in every single one you've been stupid condescending.

  • Guest locked this topic
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.