Jump to content

Puffy73

Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by Puffy73

  1.  

    Okay i fixed my issue for the item, it was crashing because I didnt put models, however now I have an issue where when i try to place the item it crashes due to getBlockStateFromPlacement getting a nullpointer

    Plant

    
    public class GreasePlant extends CropsBlock {
    
        public GreasePlant() {
            super(Block.Properties.create(Material.PLANTS)
                    .tickRandomly()
                    .hardnessAndResistance(0.0f)
                    .doesNotBlockMovement()
                    .sound(SoundType.CROP));
            setRegistryName("greaseplant");
        }
    
    }

     

    Seeds

    
    public class GreaseSeeds extends BlockNamedItem {
    
        public GreaseSeeds() {
            super(ModBlocks.GREASE_PLANT, (new Item.Properties().maxStackSize(64)));
            setRegistryName("grease_seeds");
        }
    }

     

     

    CrashReport

    Spoiler

    -- Head --
    Thread: Client thread
    Stacktrace:
        at net.minecraft.item.BlockItem.getStateForPlacement(BlockItem.java:99)
        at net.minecraft.item.BlockItem.tryPlace(BlockItem.java:54)
        at net.minecraft.item.BlockItem.onItemUse(BlockItem.java:42)
        at net.minecraft.item.ItemStack.lambda$onItemUse$0(ItemStack.java:169)
        at net.minecraft.item.ItemStack.onItemUse(ItemStack.java:184)
        at net.minecraft.item.ItemStack.onItemUse(ItemStack.java:169)
        at net.minecraft.client.multiplayer.PlayerController.func_217292_a(PlayerController.java:307)
        at net.minecraft.client.Minecraft.rightClickMouse(Minecraft.java:1283)
        at net.minecraft.client.Minecraft.processKeyBinds(Minecraft.java:1541)

     

  2. Hi!

    First-time poster, not 100% sure if this goes here but here goes.

    I've been trying to install forge all morning. When I run "gradlew setupDecompWorkspace" I get this:

    Spoiler

    C:\Users\Tommy\Desktop\Mod Environment>gradlew setupDecompWorkspace
    To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/2.14/userguide/gradle_daemon.html.
    This mapping 'snapshot_20161220' was designed for MC 1.11! Use at your own peril.
    #################################################
             ForgeGradle 2.2-SNAPSHOT-7a557d2
      https://github.com/MinecraftForge/ForgeGradle
    #################################################
                   Powered by MCP unknown
                http://modcoderpack.com
             by: Searge, ProfMobius, Fesh0r,
             R4wk, ZeuX, IngisKahn, bspkrs
    #################################################
    :deobfCompileDummyTask
    :deobfProvidedDummyTask
    :getVersionJson
    :extractUserdev UP-TO-DATE
    :extractDependencyATs SKIPPED
    :extractMcpData SKIPPED
    :extractMcpMappings SKIPPED
    :genSrgs SKIPPED
    :downloadClient SKIPPED
    :downloadServer SKIPPED
    :splitServerJar SKIPPED
    :mergeJars SKIPPED
    :deobfMcSRG SKIPPED
    :decompileMc SKIPPED
    :fixMcSources
    :applySourcePatches SKIPPED
    :remapMcSources SKIPPED
    :recompileMc FAILED

    FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':recompileMc'.
    > Unable to find a javac compiler;
    com.sun.tools.javac.Main is not on the classpath.
    Perhaps JAVA_HOME does not point to the JDK.
    It is currently set to "C:\Program Files\Java\jre1.8.0_131"

    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

    BUILD FAILED

    Total time: 55.221 secs

     

    So naturally, I tried to amend the issue by declaring JAVA_HOME in my environment variables. I set it to "C:\Program Files (x86)\Java\jdk1.8.0_131". However when I run "gradlew setupDecomWorkspace" with JAVA_HOME declared I get this error

    Spoiler

    C:\Users\Tommy\Desktop\Mod Environment>gradlew setupDecompWorkspace
    To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/2.14/userguide/gradle_daemon.html.

    FAILURE: Build failed with an exception.

    * What went wrong:
    Unable to start the daemon process.
    This problem might be caused by incorrect configuration of the daemon.
    For example, an unrecognized JVM option is used.
    Please refer to the user guide chapter on the daemon at https://docs.gradle.org/2.14/userguide/gradle_daemon.html
    Please read the following process output to find out more:
    -----------------------
    Error occurred during initialization of VM
    Could not reserve enough space for 3145728KB object heap


    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

    C:\Users\Tommy\Desktop\Mod Environment>

     

    How do I remedy this? Or am I doing something totally stupid?

×
×
  • Create New...

Important Information

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