Jump to content
  • Home
  • Files
  • Docs
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • I added a new fluid, but the game crashes whenever I place it
Currently Supported: 1.16.X (Latest) and 1.15.X (LTS)
Sign in to follow this  
Followers 1
Press X For

I added a new fluid, but the game crashes whenever I place it

By Press X For, March 26, 2020 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

Press X For    0

Press X For

Press X For    0

  • Tree Puncher
  • Press X For
  • Members
  • 0
  • 6 posts
Posted March 26, 2020

After hours of figuring out how to make a fluid, I'm finally able to get it in the game.

But whenever I place it, my game crashes

 

Time: 3/26/20 5:28 AM
Description: Unexpected error

java.lang.IllegalArgumentException: Cannot set property IntegerProperty{name=level, clazz=class java.lang.Integer, values=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]} as it does not exist in Block{porkchopmod:grease_block}
	at net.minecraft.state.StateHolder.with(StateHolder.java:103) ~[forge-1.15.2-31.1.26_mapped_snapshot_20200225-1.15.1-recomp.jar:?] {re:classloading}
	at com.press_x_for.porkchopmod.objects.fluids.FluidGrease.getBlockState(FluidGrease.java:77) ~[main/:?] {re:classloading}
	at net.minecraft.fluid.IFluidState.getBlockState(IFluidState.java:89) ~[forge-1.15.2-31.1.26_mapped_snapshot_20200225-1.15.1-recomp.jar:?] {re:classloading}
	at net.minecraft.item.BucketItem.tryPlaceContainedLiquid(BucketItem.java:161) ~[forge-1.15.2-31.1.26_mapped_snapshot_20200225-1.15.1-recomp.jar:?] {re:classloading,xf:fml:forge:bucketitem}
	at net.minecraft.item.BucketItem.onItemRightClick(BucketItem.java:92) ~[forge-1.15.2-31.1.26_mapped_snapshot_20200225-1.15.1-recomp.jar:?] {re:classloading,xf:fml:forge:bucketitem}
	at net.minecraft.item.ItemStack.useItemRightClick(ItemStack.java:206) ~[forge-1.15.2-31.1.26_mapped_snapshot_20200225-1.15.1-recomp.jar:?] {re:classloading}
	at net.minecraft.client.multiplayer.PlayerController.processRightClick(PlayerController.java:346) ~[forge-1.15.2-31.1.26_mapped_snapshot_20200225-1.15.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.rightClickMouse(Minecraft.java:1357) ~[forge-1.15.2-31.1.26_mapped_snapshot_20200225-1.15.1-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.processKeyBinds(Minecraft.java:1601) ~[forge-1.15.2-31.1.26_mapped_snapshot_20200225-1.15.1-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.runTick(Minecraft.java:1434) ~[forge-1.15.2-31.1.26_mapped_snapshot_20200225-1.15.1-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:942) ~[forge-1.15.2-31.1.26_mapped_snapshot_20200225-1.15.1-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.run(Minecraft.java:559) ~[forge-1.15.2-31.1.26_mapped_snapshot_20200225-1.15.1-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.main.Main.main(Main.java:177) ~[forge-1.15.2-31.1.26_mapped_snapshot_20200225-1.15.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_241] {}
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_241] {}
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_241] {}
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_241] {}
	at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55) ~[forge-1.15.2-31.1.26_mapped_snapshot_20200225-1.15.1-recomp.jar:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-5.0.0-milestone.4.jar:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-5.0.0-milestone.4.jar:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-5.0.0-milestone.4.jar:?] {}
	at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) [modlauncher-5.0.0-milestone.4.jar:?] {}
	at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) [modlauncher-5.0.0-milestone.4.jar:?] {}
	at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:102) [forge-1.15.2-31.1.26_mapped_snapshot_20200225-1.15.1-recomp.jar:?] {}

Tell me if you need more code

 

  • Quote

Share this post


Link to post
Share on other sites

Ugdhar    232

Ugdhar

Ugdhar    232

  • World Shaper
  • Ugdhar
  • Members
  • 232
  • 2215 posts
Posted March 26, 2020 (edited)

You should always post a link to a github repo containing your mod code.

It tells you what's wrong:

Quote

java.lang.IllegalArgumentException: Cannot set property IntegerProperty{name=level, clazz=class java.lang.Integer, values=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]} as it does not exist in Block{porkchopmod:grease_block}

 

Edited March 26, 2020 by Ugdhar
  • Quote

Share this post


Link to post
Share on other sites

Press X For    0

Press X For

Press X For    0

  • Tree Puncher
  • Press X For
  • Members
  • 0
  • 6 posts
Posted March 26, 2020
4 minutes ago, Ugdhar said:

You should always post a link to a github repo containing your mod code

 

sorry, let me just make one

 

  • Quote

Share this post


Link to post
Share on other sites

Ugdhar    232

Ugdhar

Ugdhar    232

  • World Shaper
  • Ugdhar
  • Members
  • 232
  • 2215 posts
Posted March 26, 2020
2 minutes ago, Press X For said:

sorry, let me just make one

 

No worries, github is just probably the easiest way to share code, for both ends! :) Then it's just a simple link, only need to post it once in a topic (since even if code changes the github repo is in the same place), code is easy to read on github, and if someone wants to build the mod to help debug it, it's easy to clone/download. Just a useful tip to make getting help easier!

  • Quote

Share this post


Link to post
Share on other sites

Cerandior    26

Cerandior

Cerandior    26

  • Diamond Finder
  • Cerandior
  • Members
  • 26
  • 384 posts
Posted March 26, 2020

Before you give us a look to your code, I am guessing that you might have forgotten to add the IProperty to the state container of the block via fillStateContainer

  • Quote

Share this post


Link to post
Share on other sites

Press X For    0

Press X For

Press X For    0

  • Tree Puncher
  • Press X For
  • Members
  • 0
  • 6 posts
Posted March 26, 2020 (edited)
51 minutes ago, Ugdhar said:

No worries, github is just probably the easiest way to share code, for both ends! :) Then it's just a simple link, only need to post it once in a topic (since even if code changes the github repo is in the same place), code is easy to read on github, and if someone wants to build the mod to help debug it, it's easy to clone/download. Just a useful tip to make getting help easier!

 

40 minutes ago, Cerandior said:

Before you give us a look to your code, I am guessing that you might have forgotten to add the IProperty to the state container of the block via fillStateContainer

https://github.com/PressXFor/Porkchop-Mod/tree/master/porkchopmod/src/main/java/com/press_x_for/porkchopmod then go to events/RegistryEvents.java, init/FluidInit.java, init/BlockInit.java, and objects/fluids/FluidGrease.java 

Edited March 26, 2020 by Press X For
  • Quote

Share this post


Link to post
Share on other sites

Ugdhar    232

Ugdhar

Ugdhar    232

  • World Shaper
  • Ugdhar
  • Members
  • 232
  • 2215 posts
Posted March 26, 2020

I believe the issue may be in your getBlockState method, in there you're getting a default state with FlowingFluid.LEVEL, but it appears you are trying to make use of FlowingFluid.LEVEL_1_8

  • Quote

Share this post


Link to post
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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

    • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 1
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • Sad Whale
      Game crashes whenever I try to increase the RAM

      By Sad Whale · Posted 5 minutes ago

      Would you mind explaining where I can find the debug.log
    • diesieben07
      Game crashes whenever I try to increase the RAM

      By diesieben07 · Posted 16 minutes ago

      That's not the debug.log.
    • Sad Whale
      Game crashes whenever I try to increase the RAM

      By Sad Whale · Posted 40 minutes ago

      Hopefully this works, if not let me know. hs_err_pid4708.log
    • diesieben07
      Game crashes whenever I try to increase the RAM

      By diesieben07 · Posted 51 minutes ago

      Post the debug.log.
    • Sad Whale
      Game crashes whenever I try to increase the RAM

      By Sad Whale · Posted 57 minutes ago

      Whenever I try to increase the amount of RAM allocated to Minecraft it crashes with exit code 1. I have the latest Java 64-bit update, I've uninstalled and reinstalled both Minecraft and Java and have tried multiple 1.16.5 Forge versions and none of them will allow me to allocate more than the 2 gigs that it already has allocated.
  • Topics

    • Sad Whale
      4
      Game crashes whenever I try to increase the RAM

      By Sad Whale
      Started 57 minutes ago

    • fluiX
      1
      server wont start

      By fluiX
      Started 1 hour ago

    • Luis_ST
      6
      [1.16.5] Help with custom Event

      By Luis_ST
      Started 5 hours ago

    • hammy3502
      1
      [1.16.4] Fluid Flowing Very Oddly

      By hammy3502
      Started 21 hours ago

    • <Gl33p_0r4nge>
      0
      [1.16.4] Screen Render

      By <Gl33p_0r4nge>
      Started 5 hours ago

  • Who's Online (See full list)

    • therogueegamer
    • lupicus
    • Sad Whale
    • Dismisery
    • Woosh
    • Unusualty
    • diesieben07
    • Loganator711
    • Microcellule
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • I added a new fluid, but the game crashes whenever I place it
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community