Jump to content

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


Press X For

Recommended Posts

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

 

Link to comment
Share on other sites

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 by Ugdhar
Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.