Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

1.16.1 Deferred Register


Eractnod
 Share

Recommended Posts

In 1.15.2 I used DeferredRegister to register all my blocks and items.  In 1.16.1, DeferredRegister is private.  Is this an error and if no, then what is the preferred method to register blocks and items in 1.16.1?

public static final DeferredRegister<Block> BLOCKS = new DeferredRegister<>(ForgeRegistries.BLOCKS, MODID);
Link to comment
Share on other sites

Looked at the code, and the example in the Java Docs was not updated to reflect how to use 'create', went back to earlier version 1.15.2 for further work. Waiting on an example.

Didn't see any documentation on the change from public to private of this Constructor. 

Perhaps you can provide an example of how to use this 'create'

Link to comment
Share on other sites

5 minutes ago, ygoodybad said:

Looked at the code, and the example in the Java Docs was not updated to reflect how to use 'create', went back to earlier version 1.15.2 for further work. Waiting on an example.

Didn't see any documentation on the change from public to private of this Constructor. 

Perhaps you can provide an example of how to use this 'create'

It takes the same parameters as the way it worked before, except instead of creating a new instance of the class via new, you use the static create method.

  • Like 1
Link to comment
Share on other sites

9 hours ago, Cinderous said:

public static final Item CINDERBANE_DEV_ITEM = new CinderbaneDevItem(new Item.Properties().group(Cinderbane.CINDERBANE_TAB));

This is 1000% wrong. Don't create your items statically like this, this is why DeferredRegister exists, because you people won't stop doing this.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

I do use deferred registries now, im not a you people though. I simply provided a working solution and stated it was NOT the best way to do so. I apologize for not editing my post out sooner when an example was provided. 

Edited by Cinderous
Link to comment
Share on other sites

11 hours ago, Cinderous said:

I do use deferred registries now, im not a you people though. I simply provided a working solution and stated it was NOT the best way to do so. I apologize for not editing my post out sooner when an example was provided. 

It is not a working solution and it is not "not the best way", it is wrong.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • It wasn't supposed to, just a hint if he scans for leaves: Edit: Sorry if I expressed it wrong 
    • Looks like you changed the java executable path to javaw or something else. Do not do this. If you change it, you must point it at the java executable.
    • 18:28:57.216 launcher main Preparing to launch minecraft client for 1.18.1-forge-39.0.59 18:28:57.568 launcher main Couldn't fetch SHA1 checksum for http://s3.amazonaws.com/Minecraft.Download/indexes/legacy.json 18:28:57.570 launcher main Have local file C:\Users\Edvinas\AppData\Roaming\.minecraft\assets\indexes\legacy.json but don't know what size or hash it should be. Have to assume it's good. 18:28:58.661 launcher main Couldn't fetch SHA1 checksum for https://s3.amazonaws.com/Minecraft.Download/versions/1.18.1-forge-39.0.59/1.18.1-forge-39.0.59.jar 18:28:58.664 launcher main Have local file C:\Users\Edvinas\AppData\Roaming\.minecraft\versions\1.18.1-forge-39.0.59\1.18.1-forge-39.0.59.jar but don't know what size or hash it should be. Have to assume it's good. 18:28:58.665 launcher main Minecraft client 1.18.1-forge-39.0.59 is ready to start. 18:28:58.665 launcher main Starting! 18:28:58.851 launcher main Version does not support log configuration, will assume one plaintext entry per line 18:29:04.042 game Usage: javaw [-options] class [args...] 18:29:04.042 game (to execute a class) 18:29:04.042 game or javaw [-options] -jar jarfile [args...] 18:29:04.042 game (to execute a jar file) 18:29:04.042 game where options include: 18:29:04.042 game -d32 use a 32-bit data model if available 18:29:04.042 game -d64 use a 64-bit data model if available 18:29:04.042 game -server to select the "server" VM 18:29:04.042 game The default VM is server. 18:29:04.042 game 18:29:04.042 game -cp <class search path of directories and zip/jar files> 18:29:04.042 game -classpath <class search path of directories and zip/jar files> 18:29:04.042 game A ; separated list of directories, JAR archives, 18:29:04.042 game and ZIP archives to search for class files.  
    • Seems to be a bug with infinitylib. Make sure it is up to date. If already is, report this bug to the mod author.
    • I play Minecraft using MultiMC, and am currently playing 1.16.5. I don't use modpacks; Instead, I install all my mods one by one. After a certain number of mods downloaded this way, problems obviously begin to happen (usually after around 110 mods. 100 mods has been fine but idk if its mod conflicts or the number of mods causing a problem). Here is the crash report: https://pastebin.com/pidPDt5g Just realized after submitting topic that the debug.log contains the crash report in it. Didn't think to remove this before posting. Here is the debug.log report: https://gist.github.com/trevorreynen/b4156112bfa4542de1319bcc294fa97b NOTE: The debug.log is extremely large, my crash is at the bottom. Time should say 10:41 Extra info that may be helpful: I get 60-100 fps with all the mods listed in the pastebin crash report. Most noticeable problem, either a freeze or an fps drop (which doesn't show dropping so probably a freeze) after roaming while moving faster than walking. This is most likely the problem and the reason I crashed. However, I have a different instance of Minecraft with ~30 mods less. That instance also has this problem but not nearly as much or as bad of a freeze. I have not tried loading this pack without Optifine. I am willing to try without it but I am assuming the only reason I am getting good fps is because of Optifine so I'm skeptical in removing it. My personal modded resource pack combining many mod textures from PureBDCraft also includes textures for mods I don't have installed. Not sure if that could cause major problems or if it's just skipped over and doesn't matter. Idk if it's my computer and I need more resource dedication, mod conflicts, or something else I am not thinking of. If you manage to find why I crashed, how? What should I be looking at for common crash problems?
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.