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

    • ThisIsNotOriginal
      Error at load_registries event phase

      By ThisIsNotOriginal · Posted 34 minutes ago

      The pastebin for the log and Registry Event is posted below this text.   https://pastebin.com/KEzJvRgG https://pastebin.com/VUrXR94k
    • PlasmaPig13
      The game crashed whilst rendering overlay Error: java.lang.NullPointerException: Rendering overlay Exit Code: -1

      By PlasmaPig13 · Posted 39 minutes ago

      Here's the crash report and the loglatest.log crash-2021-03-02_19.33.58-client.txt
    • PlasmaPig13
      The game crashed whilst rendering overlay Error: java.lang.NullPointerException: Rendering overlay Exit Code: -1

      By PlasmaPig13 · Posted 44 minutes ago

      I'm using 1.14.4 forge version 28.2.23 and the game crashes with the title's error message. Also, I'm new here; how do I paste the log? 
    • LexManos
      The vanilla tag system isnt suitable for ore dictionary

      By LexManos · Posted 44 minutes ago

      You can also use conditionals, However empty tags are probably the best way to go. Data gens make any argument of being hard to use moot. So there is nothing we need to do in this reguard.
    • Ilikecheese
      forge 1.16.5 wont show up

      By Ilikecheese · Posted 1 hour ago

      I downloaded forge 1.16.5 but it doesn't show up in my installations, the modded box is checked of and its not there if I try to create it idk what to do
  • Topics

    • ThisIsNotOriginal
      0
      Error at load_registries event phase

      By ThisIsNotOriginal
      Started 34 minutes ago

    • PlasmaPig13
      1
      The game crashed whilst rendering overlay Error: java.lang.NullPointerException: Rendering overlay Exit Code: -1

      By PlasmaPig13
      Started 44 minutes ago

    • EnderiumSmith
      3
      The vanilla tag system isnt suitable for ore dictionary

      By EnderiumSmith
      Started 14 hours ago

    • Ilikecheese
      0
      forge 1.16.5 wont show up

      By Ilikecheese
      Started 1 hour ago

    • GhostGamesFSM
      0
      1.16 Ore generation.

      By GhostGamesFSM
      Started 1 hour ago

  • Who's Online (See full list)

    • A1ixir
    • WaromiV
    • Tavi007
    • fluiX
    • Paperbagwastaken
    • fallOut015
    • duracell00122@gmail.com
    • Ilikecheese
    • louvenoir
    • That_Tallone
    • Katie328
    • bananaman2xx
    • PlasmaPig13
    • IkiOreo
    • KnightMiner
  • 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