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

    • Nyko
      [1.16.5] overwriting the maximum build height

      By Nyko · Posted just now

      thanks for the info, since the whole thing sounds pretty complicated, I will probably not change it
    • ChocoCookies33
      Description: Exception in server tick loop

      By ChocoCookies33 · Posted 14 minutes ago

      local server set up not working, help is appreciated.  crash-2021-03-07_00.55.37-server.txt
    • LessyDoggy
      Forge 1.12.2 Installing Bug

      By LessyDoggy · Posted 1 hour ago

      So I used forge 1.16.5 but now I cant change it too 1.12.2 no mather what. I have tried Installing client, Installing server and extract but nothing works. I even removed forge 1.16.5 from my computer but I still have that verison on and idk how to change it.
    • Yourskillx2
      !!Keeps crashing during launch!!

      By Yourskillx2 · Posted 1 hour ago

      I have a decent sized mod pack with around 90 mods and every time I go to launch the game, it loads some stuff then crashes with exit code 0, I cannot figure out if its a mod in the pack doing it, like maybe not a release version or if it just doesn't work with Mc like its supposed to.
    • IMaironI
      server error

      By IMaironI · Posted 8 hours ago

      2021-03-06-8.log
  • Topics

    • Nyko
      4
      [1.16.5] overwriting the maximum build height

      By Nyko
      Started 14 hours ago

    • ChocoCookies33
      0
      Description: Exception in server tick loop

      By ChocoCookies33
      Started 14 minutes ago

    • LessyDoggy
      0
      Forge 1.12.2 Installing Bug

      By LessyDoggy
      Started 1 hour ago

    • Yourskillx2
      0
      !!Keeps crashing during launch!!

      By Yourskillx2
      Started 1 hour ago

    • IMaironI
      13
      server error

      By IMaironI
      Started 12 hours ago

  • Who's Online (See full list)

    • Nyko
    • loordgek
    • zlappedx3
    • Kreepydude
    • Helios885
    • ChocoCookies33
    • vemerion
  • 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