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.

Trying to make mod with intellij, game saves and then crashes every time I try to open inventory

Featured Replies

Posted

So I've been following KaupenJoe's tutorial, specifically the one trying to add a block. Followed it exactly as far as I can tell, but it simply will not work. Client loads up fine, no issues, then i try to open my inventory and it just loses its mind. Game freezes, says saving game, then crashes. I just cannot find out what I did wrong. Says something is wrong with the build, but I didn't think I did anything with that at all. It worked perfectly yesterday when it was just 2 items. All I did is add the stuff for 1 block. 

https://pastebin.com/gjwuGL7R

Forge 1.20.1, JDK 17 Repository on GitHub: https://github.com/Snosib/Forge-Pigmano-1.20.X

Edited by Snosib
add github repository

Here's your problem: line 24 in `src/main/java/net/citroncactus/pigmano/item/ModCreativeModeTabs.java`

pOutput.accept(ModBlocks.reinforced_concrete.get());


You're feeding this consumer a Block, not an Item. Creative Mode tabs only can register items. To fix this, make a BlockItem from your Block and plug the result of that here instead.

Something like this in ModItems.java:

public static final RegistryObject<Item> reinforced_concrete = ITEMS.register("reinforced_concrete",
            () -> new BlockItem(ModBlocks.reinforced_concrete.get(), new Item.Properties())) ;

Edited by dee12452
Code blocks instead of ticks

Also, if you're planning on committing to mod development, might be a good idea to start being able to read your own crash reports. It'll save you a lot of time, and you don't have to come back here and wait for someone to respond lol. What I find to help is start by finding your own package name and look up and down from there. This is the place that helped me identify your problem. Good luck!

 detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
 
-- Head --
Thread: Render thread
Suspected Mod: 
	Pigmano (pigmano), Version: 0.1-1.20.1
		at TRANSFORMER/[email protected]/net.citroncactus.pigmano.item.ModCreativeModeTabs.lambda$static$1(ModCreativeModeTabs.java:24)
Stacktrace:
	at net.minecraftforge.common.ForgeHooks.lambda$onCreativeModeTabBuildContents$17(ForgeHooks.java:1631) ~[forge-1.20.1-47.2.20_mapped_parchment_2023.06.26-1.20.1-recomp.jar%23190%23197!/:?] {re:classloading}
	at net.minecraft.world.item.CreativeModeTab$Output.accept(CreativeModeTab.java:414) ~[forge-1.20.1-47.2.20_mapped_parchment_2023.06.26-1.20.1-recomp.jar%23191!/:?] {re:classloading,pl:accesstransformer:B}
	at net.citroncactus.pigmano.item.ModCreativeModeTabs.lambda$static$1(ModCreativeModeTabs.java:24) ~[%23196!/:?] {re:classloading}
	at net.minecraftforge.common.ForgeHooks.onCreativeModeTabBuildContents(ForgeHooks.java:1629) ~[forge-1.20.1-47.2.20_mapped_parchment_2023.06.26-1.20.1-recomp.jar%23190%23197!/:?] {re:classloading}

 

  • Author
On 3/14/2024 at 5:32 AM, dee12452 said:

Also, if you're planning on committing to mod development, might be a good idea to start being able to read your own crash reports. It'll save you a lot of time, and you don't have to come back here and wait for someone to respond lol. What I find to help is start by finding your own package name and look up and down from there. This is the place that helped me identify your problem. Good luck!

 detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
 
-- Head --
Thread: Render thread
Suspected Mod: 
	Pigmano (pigmano), Version: 0.1-1.20.1
		at TRANSFORMER/[email protected]/net.citroncactus.pigmano.item.ModCreativeModeTabs.lambda$static$1(ModCreativeModeTabs.java:24)
Stacktrace:
	at net.minecraftforge.common.ForgeHooks.lambda$onCreativeModeTabBuildContents$17(ForgeHooks.java:1631) ~[forge-1.20.1-47.2.20_mapped_parchment_2023.06.26-1.20.1-recomp.jar%23190%23197!/:?] {re:classloading}
	at net.minecraft.world.item.CreativeModeTab$Output.accept(CreativeModeTab.java:414) ~[forge-1.20.1-47.2.20_mapped_parchment_2023.06.26-1.20.1-recomp.jar%23191!/:?] {re:classloading,pl:accesstransformer:B}
	at net.citroncactus.pigmano.item.ModCreativeModeTabs.lambda$static$1(ModCreativeModeTabs.java:24) ~[%23196!/:?] {re:classloading}
	at net.minecraftforge.common.ForgeHooks.onCreativeModeTabBuildContents(ForgeHooks.java:1629) ~[forge-1.20.1-47.2.20_mapped_parchment_2023.06.26-1.20.1-recomp.jar%23190%23197!/:?] {re:classloading}

 

Really appreciate it!

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

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.