Jump to content

Recommended Posts

Posted

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

 

Posted (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 by Ugdhar
Posted
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!

Posted (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 by Press X For
Posted

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

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.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • that happens every time I enter a new dimension.
    • This is the last line before the crash: [ebwizardry]: Synchronising spell emitters for PixelTraveler But I have no idea what this means
    • What in particular? I barely used that mod this time around, and it's never been a problem in the past.
    • Im trying to build my mod using shade since i use the luaj library however i keep getting this error Reason: Task ':reobfJar' uses this output of task ':shadowJar' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. So i try adding reobfJar.dependsOn shadowJar  Could not get unknown property 'reobfJar' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler. my gradle file plugins { id 'eclipse' id 'idea' id 'maven-publish' id 'net.minecraftforge.gradle' version '[6.0,6.2)' id 'com.github.johnrengelman.shadow' version '7.1.2' id 'org.spongepowered.mixin' version '0.7.+' } apply plugin: 'net.minecraftforge.gradle' apply plugin: 'org.spongepowered.mixin' apply plugin: 'com.github.johnrengelman.shadow' version = mod_version group = mod_group_id base { archivesName = mod_id } // Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17. java.toolchain.languageVersion = JavaLanguageVersion.of(17) //jarJar.enable() println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}" minecraft { mappings channel: mapping_channel, version: mapping_version copyIdeResources = true runs { configureEach { workingDirectory project.file('run') property 'forge.logging.markers', 'REGISTRIES' property 'forge.logging.console.level', 'debug' arg "-mixin.config=derp.mixin.json" mods { "${mod_id}" { source sourceSets.main } } } client { // Comma-separated list of namespaces to load gametests from. Empty = all namespaces. property 'forge.enabledGameTestNamespaces', mod_id } server { property 'forge.enabledGameTestNamespaces', mod_id args '--nogui' } gameTestServer { property 'forge.enabledGameTestNamespaces', mod_id } data { workingDirectory project.file('run-data') args '--mod', mod_id, '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/') } } } sourceSets.main.resources { srcDir 'src/generated/resources' } repositories { flatDir { dirs './libs' } maven { url = "https://jitpack.io" } } configurations { shade implementation.extendsFrom shade } dependencies { minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}" implementation 'org.luaj:luaj-jse-3.0.2' implementation fg.deobf("com.github.Virtuoel:Pehkui:${pehkui_version}") annotationProcessor 'org.spongepowered:mixin:0.8.5:processor' minecraftLibrary 'luaj:luaj-jse:3.0.2' shade 'luaj:luaj-jse:3.0.2' } // Example for how to get properties into the manifest for reading at runtime. tasks.named('jar', Jar).configure { manifest { attributes([ 'Specification-Title' : mod_id, 'Specification-Vendor' : mod_authors, 'Specification-Version' : '1', // We are version 1 of ourselves 'Implementation-Title' : project.name, 'Implementation-Version' : project.jar.archiveVersion, 'Implementation-Vendor' : mod_authors, 'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"), "TweakClass" : "org.spongepowered.asm.launch.MixinTweaker", "TweakOrder" : 0, "MixinConfigs" : "derp.mixin.json" ]) } rename 'mixin.refmap.json', 'derp.mixin-refmap.json' } shadowJar { archiveClassifier = '' configurations = [project.configurations.shade] finalizedBy 'reobfShadowJar' } assemble.dependsOn shadowJar reobf { re shadowJar {} } publishing { publications { mavenJava(MavenPublication) { artifact jar } } repositories { maven { url "file://${project.projectDir}/mcmodsrepo" } } } my entire project:https://github.com/kevin051606/DERP-Mod/tree/Derp-1.0-1.20
  • Topics

×
×
  • Create New...

Important Information

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