Jump to content

Recommended Posts

Posted

So I am trying to update my mod to 1.8 and I am stuck on getting my crop to work. Every time I try to right click on farmland/any other block with my custom seeds, it crashes my game.

 

This is the crash report:

 

 

[16:21:16] [server thread/FATAL] [FML]: Exception caught executing FutureTask: java.util.concurrent.ExecutionException: java.lang.NullPointerException

java.util.concurrent.ExecutionException: java.lang.NullPointerException

  at java.util.concurrent.FutureTask.report(Unknown Source) ~[?:1.7.0_72]

  at java.util.concurrent.FutureTask.get(Unknown Source) ~[?:1.7.0_72]

  at net.minecraftforge.fml.common.FMLCommonHandler.callFuture(FMLCommonHandler.java:715) [FMLCommonHandler.class:?]

  at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726) [MinecraftServer.class:?]

  at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:669) [MinecraftServer.class:?]

  at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:171) [integratedServer.class:?]

  at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:540) [MinecraftServer.class:?]

  at java.lang.Thread.run(Unknown Source) [?:1.7.0_72]

Caused by: java.lang.NullPointerException

  at net.minecraft.item.ItemSeeds.getPlant(ItemSeeds.java:61) ~[itemSeeds.class:?]

  at net.minecraft.block.Block.canSustainPlant(Block.java:1905) ~[block.class:?]

  at net.minecraft.item.ItemSeeds.onItemUse(ItemSeeds.java:40) ~[itemSeeds.class:?]

  at net.minecraftforge.common.ForgeHooks.onPlaceItemIntoWorld(ForgeHooks.java:570) ~[ForgeHooks.class:?]

  at net.minecraft.item.ItemStack.onItemUse(ItemStack.java:146) ~[itemStack.class:?]

  at net.minecraft.server.management.ItemInWorldManager.activateBlockOrUseItem(ItemInWorldManager.java:488) ~[itemInWorldManager.class:?]

  at net.minecraft.network.NetHandlerPlayServer.processPlayerBlockPlacement(NetHandlerPlayServer.java:624) ~[NetHandlerPlayServer.class:?]

  at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:67) ~[C08PacketPlayerBlockPlacement.class:?]

  at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:114) ~[C08PacketPlayerBlockPlacement.class:?]

  at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:24) ~[PacketThreadUtil$1.class:?]

  at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:1.7.0_72]

  at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:1.7.0_72]

  at net.minecraftforge.fml.common.FMLCommonHandler.callFuture(FMLCommonHandler.java:714) ~[FMLCommonHandler.class:?]

  ... 5 more

[16:21:17] [server thread/INFO]: Stopping server

[16:21:17] [server thread/INFO]: Saving players

[16:21:17] [server thread/INFO]: Saving worlds

[16:21:17] [server thread/INFO]: Saving chunks for level '1.8 Forge'/Overworld

[16:21:17] [server thread/INFO]: Saving chunks for level '1.8 Forge'/Nether

[16:21:17] [server thread/INFO]: Saving chunks for level '1.8 Forge'/The End

[16:21:18] [server thread/INFO] [FML]: Unloading dimension 0

[16:21:18] [server thread/INFO] [FML]: Unloading dimension -1

[16:21:18] [server thread/INFO] [FML]: Unloading dimension 1

[16:21:18] [server thread/INFO] [FML]: Applying holder lookups

[16:21:18] [server thread/INFO] [FML]: Holder lookups applied

[16:21:19] [Client thread/FATAL]: Unreported exception thrown!

java.lang.NullPointerException

  at net.minecraft.item.ItemSeeds.getPlant(ItemSeeds.java:61) ~[itemSeeds.class:?]

  at net.minecraft.block.Block.canSustainPlant(Block.java:1905) ~[block.class:?]

  at net.minecraft.item.ItemSeeds.onItemUse(ItemSeeds.java:40) ~[itemSeeds.class:?]

  at net.minecraft.item.ItemStack.onItemUse(ItemStack.java:147) ~[itemStack.class:?]

  at net.minecraft.client.multiplayer.PlayerControllerMP.func_178890_a(PlayerControllerMP.java:442) ~[PlayerControllerMP.class:?]

  at net.minecraft.client.Minecraft.rightClickMouse(Minecraft.java:1571) ~[Minecraft.class:?]

  at net.minecraft.client.Minecraft.runTick(Minecraft.java:2130) ~[Minecraft.class:?]

  at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1087) ~[Minecraft.class:?]

  at net.minecraft.client.Minecraft.run(Minecraft.java:376) [Minecraft.class:?]

  at net.minecraft.client.main.Main.main(Main.java:117) [Main.class:?]

  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_72]

  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_72]

  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_72]

  at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_72]

  at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?]

  at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?]

  at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?]

  at GradleStart.main(Unknown Source) [start/:?]

[16:21:19] [Client thread/INFO] [sTDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:660]: ---- Minecraft Crash Report ----

// Uh... Did I do that?

 

Time: 11/06/15 4:21 PM

Description: Unexpected error

 

java.lang.NullPointerException: Unexpected error

  at net.minecraft.item.ItemSeeds.getPlant(ItemSeeds.java:61)

  at net.minecraft.block.Block.canSustainPlant(Block.java:1905)

  at net.minecraft.item.ItemSeeds.onItemUse(ItemSeeds.java:40)

  at net.minecraft.item.ItemStack.onItemUse(ItemStack.java:147)

  at net.minecraft.client.multiplayer.PlayerControllerMP.func_178890_a(PlayerControllerMP.java:442)

  at net.minecraft.client.Minecraft.rightClickMouse(Minecraft.java:1571)

  at net.minecraft.client.Minecraft.runTick(Minecraft.java:2130)

  at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1087)

  at net.minecraft.client.Minecraft.run(Minecraft.java:376)

  at net.minecraft.client.main.Main.main(Main.java:117)

  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

  at java.lang.reflect.Method.invoke(Unknown Source)

  at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)

  at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

  at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)

  at GradleStart.main(Unknown Source)

 

 

A detailed walkthrough of the error, its code path and all known details is as follows:

---------------------------------------------------------------------------------------

 

-- Head --

Stacktrace:

  at net.minecraft.item.ItemSeeds.getPlant(ItemSeeds.java:61)

  at net.minecraft.block.Block.canSustainPlant(Block.java:1905)

  at net.minecraft.item.ItemSeeds.onItemUse(ItemSeeds.java:40)

  at net.minecraft.item.ItemStack.onItemUse(ItemStack.java:147)

  at net.minecraft.client.multiplayer.PlayerControllerMP.func_178890_a(PlayerControllerMP.java:442)

  at net.minecraft.client.Minecraft.rightClickMouse(Minecraft.java:1571)

 

-- Affected level --

Details:

  Level name: MpServer

  All players: 1 total; [EntityPlayerSP['jedispencer21'/142, l='MpServer', x=177.93, y=69.29, z=264.21]]

  Chunk stats: MultiplayerChunkCache: 289, 289

  Level seed: 0

  Level generator: ID 00 - default, ver 1. Features enabled: false

  Level generator options:

  Level spawn location: 186.00,64.00,266.00 - World: (186,64,266), Chunk: (at 10,4,10 in 11,16; contains blocks 176,0,256 to 191,255,271), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)

  Level time: 254813 game time, 6000 day time

  Level dimension: 0

  Level storage version: 0x00000 - Unknown?

  Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)

  Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false

  Forced entities: 85 total; --- CUTOUT --- Retry entities: 0 total; []

  Server brand: fml,forge

  Server type: Integrated singleplayer server

Stacktrace:

  at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:392)

  at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2613)

  at net.minecraft.client.Minecraft.run(Minecraft.java:405)

  at net.minecraft.client.main.Main.main(Main.java:117)

  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

  at java.lang.reflect.Method.invoke(Unknown Source)

  at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)

  at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

  at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)

  at GradleStart.main(Unknown Source)

 

 

 

This is my items:

 

 

public static void initItems()

{

tomato_seeds = RegistryHandler.registerItems(new ItemSeeds(tomato_plant, Blocks.farmland).setUnlocalizedName("tomato_seeds").setCreativeTab(tabGarmoraMaterials));

 

tomato = RegistryHandler.registerItems(new ItemFood(4, 0.1F, false).setUnlocalizedName("tomato").setCreativeTab(CreativeTabs.tabFood));

}

 

public static void initBlocks()

{

tomato_plant = RegistryHandler.registerBlocks(new BlockTomato().setUnlocalizedName("tomato_plant"));

}

 

public static void registerRenders()

{

RenderHelper.registerItemRender(tomato_seeds);

 

RenderHelper.registerItemRender(tomato);

 

RenderHelper.registerBlockRender(tomato_plant);

}

 

 

 

BlockTomato class:

 

 

public class BlockTomato extends BlockCrops

{

protected Item getSeed()

{

return Blocks_and_Items.tomato_seeds;

}

 

protected Item getCrop()

{

return Blocks_and_Items.tomato;

}

}

 

 

 

Render and Register class:

 

 

public class RenderHelper

{

/**

* Registers item model to JSON file.

*/

@SideOnly(Side.CLIENT)

public static void registerItemRender(Item item)

{

Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Strings.MOD_ID + ":" + item.getUnlocalizedName().substring(5), "inventory"));

}

 

/**

* Registers block models to JSON file.

*/

@SideOnly(Side.CLIENT)

public static void registerBlockRender(Block block)

{

Item item = Item.getItemFromBlock(block);

Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Strings.MOD_ID + ":" + item.getUnlocalizedName().substring(5), "inventory"));

}

 

/**

* Registers block models with metadata to JSON file.

*/

@SideOnly(Side.CLIENT)

public static void registerBlockMultiTextures(Block block, int meta, String location)

{

Item item = Item.getItemFromBlock(block);

Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, meta, new ModelResourceLocation(Strings.MOD_ID + location, "inventory"));

}

}

 

public class RegistryHandler

{

private RegistryHandler() {}

 

/**

* A more convenient way of registering Items.

*/

public static Item registerItems(Item item)

{

GameRegistry.registerItem(item, item.getUnlocalizedName().substring(5));

return item;

}

 

/**

* A more convenient way of registering Blocks.

*/

public static Block registerBlocks(Block block)

{

GameRegistry.registerBlock(block, block.getUnlocalizedName().substring(5));

return block;

}

}

 

 

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

    • I also just tried with iron's spellbooks removed, since that seemed related, but i am still having the same problem, even in newly created worlds. https://mclo.gs/AtrAfaj 
    • My Gradle Project for my Minecraft mod isn't building. Terminal: * Where: Settings file 'C:\Users\csonn\OneDrive\Desktop\fusionlucky\settings.gradle' line: 2 * What went wrong: Could not compile settings file 'C:\Users\csonn\OneDrive\Desktop\fusionlucky\settings.gradle'. > startup failed:   settings file 'C:\Users\csonn\OneDrive\Desktop\fusionlucky\settings.gradle': 2: The pluginManagement {} block must appear before any other statements in the script.   For more information on the pluginManagement {} block, please refer to https://docs.gradle.org/9.0.0/userguide/plugins.html#sec:plugin_management in the Gradle documentation.    @ line 2, column 1.      pluginManagement {      ^   1 error * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to generate a Build Scan (Powered by Develocity). > Get more help at https://help.gradle.org.   Setting.Gradle File:   rootProject.name = 'fusion-lucky-block' pluginManagement {     repositories {         gradlePluginPortal()         maven { url "https://maven.minecraftforge.net/" }         mavenCentral()     } }
    • no change still. here's a new log  https://mclo.gs/RXwiZmn 
    • Whenever I go to build my it says "Build failed in " how many seconds   Here is what is said in my terminal * Where: Build file 'C:\Users\csonn\OneDrive\Desktop\fusionlucky\build.gradle' line: 3 * What went wrong: Plugin [id: 'net.minecraftforge.gradle', version: '6.1.51'] was not found in any of the following sources: - Gradle Core Plugins (plugin is not in 'org.gradle' namespace) - Included Builds (No included builds contain this plugin) - Plugin Repositories (could not resolve plugin artifact 'net.minecraftforge.gradle:net.minecraftforge.gradle.gradle.plugin:6.1.51')   Searched in the following repositories:     Gradle Central Plugin Repository     MinecraftForge(https://maven.minecraftforge.net/) * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Get more help at https://help.gradle.org.   Here is what is in my build.gradle file plugins {     id 'java'     id 'net.minecraftforge.gradle' version '6.1+' }   group = 'io.github.csonnic03.fusionlucky' version = '1.0.0' archivesBaseName = 'fusionlucky'   java {     toolchain {         languageVersion = JavaLanguageVersion.of(17)     } }   repositories {     mavenCentral()     maven {         name "forgeMaven"         url "https://maven.minecraftforge.net/<repository>" } }   dependencies {     minecraft 'net.minecraftforge:forge:1.20.1-47.1.0' }   minecraft {     mappings channel: 'official', version: '1.20.1'     runs {         client {             workingDirectory project.file('run')         }         server {             workingDirectory project.file('run')         }     } }   tasks.withType(JavaCompile) {     options.encoding = 'UTF-8' }   jar {     manifest {         attributes(             "Specification-Title": "Fusion Lucky Block",             "Specification-Vendor": "example",             "Implementation-Title": project.name,             "Implementation-Version": project.version,             "Implementation-Vendor": "example",             "ModLauncher-TargetFMLVersion": "[47,)"         )     } }  
  • Topics

×
×
  • Create New...

Important Information

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