Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[1.8] Crafting Recipe java.lang.NullPointerException?


TheImpure1
 Share

Recommended Posts

I'm making a big mod that adds armor, tools, weapons, and other stuff, but when i tried running Minecraft after adding alot of things, it just kept crashing! Can anyone find the error in my code?

 

Main Class:

 

 

package impure.explorer;

 

import impure.explorer.crafting.ExplorerCrafting;

import impure.explorer.init.ExplorerBlocks;

import impure.explorer.init.ExplorerGenerator;

import impure.explorer.init.ExplorerItems;

import impure.explorer.proxy.CommonProxy;

import impure.explorer.utils.MessageExtendedReachAttack;

import net.minecraftforge.common.MinecraftForge;

import net.minecraftforge.fml.common.Mod;

import net.minecraftforge.fml.common.Mod.EventHandler;

import net.minecraftforge.fml.common.SidedProxy;

import net.minecraftforge.fml.common.event.FMLInitializationEvent;

import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;

import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;

import net.minecraftforge.fml.common.network.NetworkRegistry;

import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper;

import net.minecraftforge.fml.common.registry.GameRegistry;

import net.minecraftforge.fml.relauncher.Side;

 

@Mod(modid = Reference.MOD_ID, name = Reference.MOD_NAME, version = Reference.VERSION)

public class ExplorerW {

 

public static final String NETWORK_CHANNEL_NAME = "ExplorerWorld";

public static SimpleNetworkWrapper network;

 

@SidedProxy(clientSide = Reference.CLIENT_PROXY_CLASS, serverSide = Reference.SERVER_PROXY_CLASS)

public static CommonProxy proxy;

 

public static final ExplorerTab tabExplorer = new ExplorerTab("tabExplorer");

 

@EventHandler

public void preInit(FMLPreInitializationEvent event) {

 

ExplorerBlocks.init();

ExplorerBlocks.register();

ExplorerItems.init();

ExplorerItems.register();

}

 

@EventHandler

public void init(FMLInitializationEvent event) {

 

ExplorerCrafting.init();

 

ExplorerW.network = NetworkRegistry.INSTANCE.newSimpleChannel(ExplorerW.NETWORK_CHANNEL_NAME);

 

int packetId = 0;

// register messages from client to server

ExplorerW.network.registerMessage(MessageExtendedReachAttack.Handler.class,

 

MessageExtendedReachAttack.class, packetId++, Side.SERVER);

 

MinecraftForge.EVENT_BUS.register(new ExplorerEventHandler());

 

GameRegistry.registerWorldGenerator(new ExplorerGenerator(), 0);

proxy.registerRenders();

}

 

@EventHandler

public void postInit(FMLPostInitializationEvent event) {

 

}

}

 

 

 

Item Class:

 

 

package impure.explorer.init;

 

import impure.explorer.ExplorerW;

import impure.explorer.Reference;

import impure.explorer.items.ArmorEnder;

import impure.explorer.items.ArmorFleet;

import impure.explorer.items.ItemEnderAxe;

import impure.explorer.items.ItemEnderHoe;

import impure.explorer.items.ItemEnderPickaxe;

import impure.explorer.items.ItemEnderShovel;

import impure.explorer.items.ItemEnderSword;

import impure.explorer.items.ItemFleetAxe;

import impure.explorer.items.ItemFleetHoe;

import impure.explorer.items.ItemFleetPickaxe;

import impure.explorer.items.ItemFleetShovel;

import impure.explorer.items.ItemFleetSword;

import net.minecraft.client.Minecraft;

import net.minecraft.client.resources.model.ModelResourceLocation;

import net.minecraft.item.Item;

import net.minecraft.item.Item.ToolMaterial;

import net.minecraft.item.ItemArmor.ArmorMaterial;

import net.minecraft.item.ItemPickaxe;

import net.minecraftforge.common.util.EnumHelper;

 

public class ExplorerItems {

 

public static ToolMaterial fleet_tools = EnumHelper.addToolMaterial("fleet_tools", 3, 4000, 12.0F, 15, 3);

public static ToolMaterial aquatic_tools = EnumHelper.addToolMaterial("aquatic_tools", 3, 1000, 5, 14, 30);

public static ToolMaterial ender_tools = EnumHelper.addToolMaterial("ender_tools", 3, 5000, 10, 23, 13);

public static ToolMaterial pyromatic_tools = EnumHelper.addToolMaterial("pyromatic_tools", 3, 3000, 7, 13, 10);

public static ToolMaterial dark_tools = EnumHelper.addToolMaterial("dark_tools", 3, 170000, 10, 23, 70);

public static ToolMaterial light_tools = EnumHelper.addToolMaterial("light_tools", 3, 170000, 10, 23, 70);

 

public static ArmorMaterial fleet_armor = EnumHelper.addArmorMaterial("fleet_armor", "ew:fleet", 3000, new int[]{3, 4, 2, 1}, 3);

public static ArmorMaterial aquatic_armor = EnumHelper.addArmorMaterial("aquatic_armor", "ew:aquatic", 1000, new int[]{4, 7, 6, 3}, 15);

public static ArmorMaterial ender_armor = EnumHelper.addArmorMaterial("ender_armor", "ew:ender", 6000, new int[]{10, 14, 13, 4}, 14);

public static ArmorMaterial pyromatic_armor = EnumHelper.addArmorMaterial("pyromatic_armor", "ew:pyromatic", 4500, new int[]{9, 10, 9, 3}, 10);

public static ArmorMaterial dark_armor = EnumHelper.addArmorMaterial("dark_armor", "ew:dark", 6000, new int[]{20, 34, 30, 19}, 50);

public static ArmorMaterial light_armor = EnumHelper.addArmorMaterial("light_armor", "ew:light", 4500, new int[]{20, 34, 30, 19}, 50);

 

public static Item fleeting_essence;

public static Item aquatic_essence;

public static Item aquatic_ingot;

public static Item ender_essence;

public static Item stabilized_ender_pearl;

public static Item pyromatic_essence;

public static Item solidified_pyro;

public static Item dark_essence;//TODO

public static Item dark_infused_diamond;//TODO

public static Item light_essence;//TODO

public static Item contained_light;//TODO

 

public static Item fleet_armor_helm;

public static Item fleet_armor_chest;

public static Item fleet_armor_legs;

public static Item fleet_armor_boots;

 

public static Item aquatic_armor_helm;//TODO

public static Item aquatic_armor_chest;//TODO

public static Item aquatic_armor_legs;//TODO

public static Item aquatic_armor_boots;//TODO

 

public static Item ender_armor_helm;

public static Item ender_armor_chest;

public static Item ender_armor_legs;

public static Item ender_armor_boots;

 

public static Item pyromatic_armor_helm;//TODO

public static Item pyromatic_armor_chest;//TODO

public static Item pyromatic_armor_legs;//TODO

public static Item pyromatic_armor_boots;//TODO

 

public static Item dark_armor_helm;//TODO

public static Item dark_armor_chest;//TODO

public static Item dark_armor_legs;//TODO

public static Item dark_armor_boots;//TODO

 

public static Item light_armor_helm;//TODO

public static Item light_armor_chest;//TODO

public static Item light_armor_legs;//TODO

public static Item light_armor_boots;//TODO

 

public static Item fleet_tool_sword;

public static Item fleet_tool_pickaxe;

public static Item fleet_tool_axe;

public static Item fleet_tool_shovel;

public static Item fleet_tool_hoe;

 

public static Item aquatic_tool_sword;//TODO

public static Item aquatic_tool_pickaxe;//TODO

public static Item aquatic_tool_axe;//TODO

public static Item aquatic_tool_shovel;//TODO

public static Item aquatic_tool_hoe;//TODO

 

public static Item ender_tool_sword;

public static Item ender_tool_pickaxe;

public static Item ender_tool_axe;

public static Item ender_tool_shovel;

public static Item ender_tool_hoe;

 

public static Item pyromatic_tool_sword;//TODO

public static Item pyromatic_tool_pickaxe;//TODO

public static Item pyromatic_tool_axe;//TODO

public static Item pyromatic_tool_shovel;//TODO

public static Item pyromatic_tool_hoe;//TODO

 

public static Item dark_tool_sword;//TODO

public static Item dark_tool_pickaxe;//TODO

public static Item dark_tool_axe;//TODO

public static Item dark_tool_shovel;//TODO

public static Item dark_tool_hoe;//TODO

 

public static Item light_tool_sword;//TODO

public static Item light_tool_pickaxe;//TODO

public static Item light_tool_axe;//TODO

public static Item light_tool_shovel;//TODO

public static Item light_tool_hoe;//TODO

 

public static void init() {

 

fleeting_essence = new Item().setUnlocalizedName("fleeting_essence").setCreativeTab(ExplorerW.tabExplorer);

aquatic_essence = new Item().setUnlocalizedName("aquatic_essence").setCreativeTab(ExplorerW.tabExplorer);

aquatic_ingot = new Item().setUnlocalizedName("aquatic_ingot").setCreativeTab(ExplorerW.tabExplorer);

ender_essence = new Item().setUnlocalizedName("ender_essence").setCreativeTab(ExplorerW.tabExplorer);

stabilized_ender_pearl = new Item().setUnlocalizedName("stabilized_ender_pearl").setCreativeTab(ExplorerW.tabExplorer);

pyromatic_essence = new Item().setUnlocalizedName("pyromatic_essence").setCreativeTab(ExplorerW.tabExplorer);

solidified_pyro = new Item().setUnlocalizedName("solidified_pyro").setCreativeTab(ExplorerW.tabExplorer);

 

ender_armor_helm = new ArmorEnder(ender_armor, 1, 0).setUnlocalizedName("ender_armor_helm");

ender_armor_chest = new ArmorEnder(ender_armor, 1, 1).setUnlocalizedName("ender_armor_chest");

ender_armor_legs = new ArmorEnder(ender_armor, 2, 2).setUnlocalizedName("ender_armor_legs");

ender_armor_boots = new ArmorEnder(ender_armor, 1, 3).setUnlocalizedName("ender_armor_boots");

 

ender_tool_sword = new ItemEnderSword(ender_tools).setUnlocalizedName("ender_tool_sword").setCreativeTab(ExplorerW.tabExplorer);

ender_tool_pickaxe = new ItemEnderPickaxe(ender_tools).setUnlocalizedName("ender_tool_pickaxe").setCreativeTab(ExplorerW.tabExplorer);

ender_tool_axe = new ItemEnderAxe(ender_tools).setUnlocalizedName("ender_tool_axe").setCreativeTab(ExplorerW.tabExplorer);

ender_tool_shovel = new ItemEnderShovel(ender_tools).setUnlocalizedName("ender_tool_shovel").setCreativeTab(ExplorerW.tabExplorer);

ender_tool_hoe = new ItemEnderHoe(ender_tools).setUnlocalizedName("ender_tool_hoe").setCreativeTab(ExplorerW.tabExplorer);

 

fleet_armor_helm = new ArmorFleet(fleet_armor, 1, 0).setUnlocalizedName("fleet_armor_helm");

fleet_armor_chest = new ArmorFleet(fleet_armor, 1, 1).setUnlocalizedName("fleet_armor_chest");

fleet_armor_legs = new ArmorFleet(fleet_armor, 2, 2).setUnlocalizedName("fleet_armor_legs");

fleet_armor_boots = new ArmorFleet(fleet_armor, 1, 3).setUnlocalizedName("fleet_armor_boots");

 

fleet_tool_sword = new ItemFleetSword(fleet_tools).setUnlocalizedName("fleet_tool_sword").setCreativeTab(ExplorerW.tabExplorer);

fleet_tool_pickaxe = new ItemFleetPickaxe(fleet_tools).setUnlocalizedName("fleet_tool_pickaxe").setCreativeTab(ExplorerW.tabExplorer);

fleet_tool_axe = new ItemFleetAxe(fleet_tools).setUnlocalizedName("fleet_tool_axe").setCreativeTab(ExplorerW.tabExplorer);

fleet_tool_shovel = new ItemFleetShovel(fleet_tools).setUnlocalizedName("fleet_tool_shovel").setCreativeTab(ExplorerW.tabExplorer);

fleet_tool_hoe = new ItemFleetHoe(fleet_tools).setUnlocalizedName("fleet_tool_hoe").setCreativeTab(ExplorerW.tabExplorer);

}

 

public static void register() {

 

Reference.registerItem(fleeting_essence);

Reference.registerItem(aquatic_essence);

Reference.registerItem(aquatic_ingot);

Reference.registerItem(ender_essence);

Reference.registerItem(stabilized_ender_pearl);

Reference.registerItem(pyromatic_essence);

Reference.registerItem(solidified_pyro);

 

Reference.registerItem(ender_armor_helm);

Reference.registerItem(ender_armor_chest);

Reference.registerItem(ender_armor_legs);

Reference.registerItem(ender_armor_boots);

 

Reference.registerItem(ender_tool_sword);

Reference.registerItem(ender_tool_pickaxe);

Reference.registerItem(ender_tool_axe);

Reference.registerItem(ender_tool_shovel);

Reference.registerItem(ender_tool_hoe);

 

Reference.registerItem(fleet_armor_helm);

Reference.registerItem(fleet_armor_chest);

Reference.registerItem(fleet_armor_legs);

Reference.registerItem(fleet_armor_boots);

 

Reference.registerItem(fleet_tool_sword);

Reference.registerItem(fleet_tool_pickaxe);

Reference.registerItem(fleet_tool_axe);

Reference.registerItem(fleet_tool_shovel);

Reference.registerItem(fleet_tool_hoe);

}

 

public static void registerRenders() {

 

registerRender(fleeting_essence);

registerRender(aquatic_essence);

registerRender(aquatic_ingot);

registerRender(ender_essence);

registerRender(stabilized_ender_pearl);

registerRender(pyromatic_essence);

registerRender(solidified_pyro);

 

registerRender(ender_armor_helm);

registerRender(ender_armor_chest);

registerRender(ender_armor_legs);

registerRender(ender_armor_boots);

 

registerRender(ender_tool_sword);

registerRender(ender_tool_pickaxe);

registerRender(ender_tool_axe);

registerRender(ender_tool_shovel);

registerRender(ender_tool_hoe);

 

registerRender(fleet_armor_helm);

registerRender(fleet_armor_chest);

registerRender(fleet_armor_legs);

registerRender(fleet_armor_boots);

 

registerRender(fleet_tool_sword);

registerRender(fleet_tool_pickaxe);

registerRender(fleet_tool_axe);

registerRender(fleet_tool_shovel);

registerRender(fleet_tool_hoe);

}

 

public static void registerRender(Item item) {

 

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

}

}

 

 

 

Crafting Class:

 

 

package impure.explorer.crafting;

 

import impure.explorer.init.ExplorerBlocks;

import impure.explorer.init.ExplorerItems;

import net.minecraft.block.Block;

import net.minecraft.init.Blocks;

import net.minecraft.init.Items;

import net.minecraft.item.Item;

import net.minecraft.item.ItemStack;

import net.minecraftforge.fml.common.registry.GameRegistry;

 

public class ExplorerCrafting {

 

public static void init() {

 

GameRegistry.addShapedRecipe(new ItemStack(ExplorerItems.fleet_armor_helm),

"%%%",

"%#%",

'%', ExplorerItems.fleeting_essence,

'#', Items.diamond_helmet);

 

GameRegistry.addShapedRecipe(new ItemStack(ExplorerItems.fleet_armor_chest),

"%%%",

"%#%",

'%', ExplorerItems.fleeting_essence,

'#', Items.diamond_chestplate);

 

GameRegistry.addShapedRecipe(new ItemStack(ExplorerItems.fleet_armor_legs),

"%%%",

"%#%",

'%', ExplorerItems.fleeting_essence,

'#', Items.diamond_leggings);

 

GameRegistry.addShapedRecipe(new ItemStack(ExplorerItems.fleet_armor_boots),

"%%%",

"%#%",

'%', ExplorerItems.fleeting_essence,

'#', Items.diamond_boots);

 

GameRegistry.addShapedRecipe(new ItemStack(ExplorerItems.fleet_tool_sword),

"%%%",

"%#%",

"%%%",

'%', ExplorerItems.fleeting_essence,

'#', Items.diamond_sword);

 

GameRegistry.addShapedRecipe(new ItemStack(ExplorerItems.fleet_tool_pickaxe),

"%%%",

"%#%",

"%%%",

'%', ExplorerItems.fleeting_essence,

'#', Items.diamond_pickaxe);

 

GameRegistry.addShapedRecipe(new ItemStack(ExplorerItems.fleet_tool_axe),

"%%%",

"%#%",

"%%%",

'%', ExplorerItems.fleeting_essence,

'#', Items.diamond_axe);

 

GameRegistry.addShapedRecipe(new ItemStack(ExplorerItems.fleet_tool_shovel),

"%%%",

"%#%",

"%%%",

'%', ExplorerItems.fleeting_essence,

'#', Items.diamond_shovel);

 

GameRegistry.addShapedRecipe(new ItemStack(ExplorerItems.fleet_tool_hoe),

"%%%",

"%#%",

"%%%",

'%', ExplorerItems.fleeting_essence,

'#', Items.diamond_hoe);

 

GameRegistry.addShapedRecipe(new ItemStack(ExplorerItems.aquatic_ingot, 4), new Object[] {

"XYX",

"YXY",

"XYX",

'X', ExplorerItems.aquatic_essence,

'Y', Items.iron_ingot

});

 

GameRegistry.addShapedRecipe(new ItemStack(ExplorerItems.stabilized_ender_pearl, 1), new Object[] {

"XXX",

"XXX",

"XXX",

'X', ExplorerItems.ender_essence

});

 

GameRegistry.addShapedRecipe(new ItemStack(ExplorerItems.solidified_pyro, 1), new Object[] {

"XXX",

"XXX",

"XXX",

'X', ExplorerItems.pyromatic_essence

});

 

GameRegistry.addShapedRecipe(new ItemStack(Item.getItemFromBlock(ExplorerBlocks.ender_block), 1), new Object[] {

"XXX",

"XXX",

"XXX",

'X', ExplorerItems.stabilized_ender_pearl

});

 

GameRegistry.addShapedRecipe(new ItemStack(Item.getItemFromBlock(ExplorerBlocks.pyromatic_block), 1), new Object[] {

"XXX",

"XXX",

"XXX",

'X', ExplorerItems.solidified_pyro

});

 

GameRegistry.addShapelessRecipe(new ItemStack(ExplorerItems.stabilized_ender_pearl, 9), new Object[] {

new ItemStack(ExplorerBlocks.ender_block, 1)

});

 

GameRegistry.addShapelessRecipe(new ItemStack(ExplorerItems.stabilized_ender_pearl, 9), new Object[] {

new ItemStack(ExplorerBlocks.pyromatic_block, 1)

});

 

GameRegistry.addShapedRecipe(new ItemStack(ExplorerItems.ender_tool_sword), new Object[] {

" X ",

" X ",

" Y ",

'X', ExplorerItems.stabilized_ender_pearl,

'Y', Items.stick

});

 

GameRegistry.addShapedRecipe(new ItemStack(ExplorerItems.ender_armor_helm),

"%%%",

"% %",

'%', ExplorerItems.stabilized_ender_pearl

);

 

GameRegistry.addShapedRecipe(new ItemStack(ExplorerItems.ender_armor_chest),

"% %",

"%%%",

"%%%",

'%', ExplorerItems.stabilized_ender_pearl

);

 

GameRegistry.addShapedRecipe(new ItemStack(ExplorerItems.ender_armor_legs),

"%%%",

"% %",

"% %",

'%', ExplorerItems.stabilized_ender_pearl

);

 

GameRegistry.addShapedRecipe(new ItemStack(ExplorerItems.ender_armor_boots),

"% %",

"% %",

'%', ExplorerItems.stabilized_ender_pearl

);

 

GameRegistry.addShapedRecipe(new ItemStack(Item.getItemFromBlock(ExplorerBlocks.fleeting_block), 1), new Object[] {

"XXX",

"XXX",

"XXX",

'X', ExplorerItems.fleeting_essence

});

 

GameRegistry.addShapedRecipe(new ItemStack(Item.getItemFromBlock(ExplorerBlocks.aquatic_block), 1), new Object[] {

"XXX",

"XXX",

"XXX",

'X', ExplorerItems.aquatic_essence

});

 

GameRegistry.addShapelessRecipe(new ItemStack(ExplorerItems.aquatic_essence, 9), new Object[] {

new ItemStack(ExplorerBlocks.aquatic_block, 1)

});

 

GameRegistry.addShapelessRecipe(new ItemStack(ExplorerItems.fleeting_essence, 9), new Object[] {

new ItemStack(ExplorerBlocks.fleeting_block, 1)

});

 

GameRegistry.addShapelessRecipe(new ItemStack(Item.getItemFromBlock(ExplorerBlocks.light_block), 1), new Object[] {

new ItemStack(ExplorerItems.contained_light, 9)

});

 

GameRegistry.addShapelessRecipe(new ItemStack(ExplorerItems.contained_light, 9), new Object[] {

new ItemStack(ExplorerBlocks.light_block, 1)

});

 

GameRegistry.addShapelessRecipe(new ItemStack(Item.getItemFromBlock(ExplorerBlocks.dark_block), 1), new Object[] {

new ItemStack(ExplorerItems.dark_infused_diamond, 9)

});

 

GameRegistry.addShapelessRecipe(new ItemStack(ExplorerItems.dark_infused_diamond, 9), new Object[] {

new ItemStack(ExplorerBlocks.dark_block, 1)

});

 

GameRegistry.addShapelessRecipe(new ItemStack(ExplorerItems.contained_light), new Object[] {

new ItemStack(ExplorerItems.light_essence, 9)

});

 

GameRegistry.addRecipe(new ItemStack(ExplorerItems.dark_infused_diamond, 1), new Object[] { "XXX", "XYX", "XXX", 'X', ExplorerItems.dark_essence, 'Y', Items.diamond });

 

GameRegistry.addRecipe(new ItemStack(ExplorerItems.ender_tool_pickaxe, 1), new Object[] { "%%%", " Y ", " Y ",'%', ExplorerItems.stabilized_ender_pearl, 'Y', Items.stick });

 

GameRegistry.addRecipe(new ItemStack(ExplorerItems.ender_tool_axe, 1), new Object[] { " %%", " Y%", " Y ", '%', ExplorerItems.stabilized_ender_pearl, 'Y', Items.stick });

 

GameRegistry.addRecipe(new ItemStack(ExplorerItems.ender_tool_shovel, 1), new Object[] { " % ", " Y ", " Y ", '%', ExplorerItems.stabilized_ender_pearl, 'Y', Items.stick });

 

GameRegistry.addRecipe(new ItemStack(ExplorerItems.ender_tool_hoe, 1), new Object[] { " %%", " Y ", " Y ", '%', ExplorerItems.stabilized_ender_pearl, 'Y', Items.stick });

}

}

 

 

 

Log:

 

 

---- Minecraft Crash Report ----

// You're mean.

 

Time: 6/20/15 12:43 AM

Description: Initializing game

 

java.lang.NullPointerException: Initializing game

at net.minecraft.item.crafting.CraftingManager.addRecipe(CraftingManager.java:270)

at net.minecraftforge.fml.common.registry.GameRegistry.addShapedRecipe(GameRegistry.java:242)

at net.minecraftforge.fml.common.registry.GameRegistry.addRecipe(GameRegistry.java:237)

at impure.explorer.crafting.ExplorerCrafting.init(ExplorerCrafting.java:195)

at impure.explorer.ExplorerW.init(ExplorerW.java:44)

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.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:537)

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 com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)

at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)

at com.google.common.eventbus.EventBus.post(EventBus.java:275)

at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)

at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:190)

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 com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)

at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)

at com.google.common.eventbus.EventBus.post(EventBus.java:275)

at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:119)

at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:710)

at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:315)

at net.minecraft.client.Minecraft.startGame(Minecraft.java:528)

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

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.crafting.CraftingManager.addRecipe(CraftingManager.java:270)

at net.minecraftforge.fml.common.registry.GameRegistry.addShapedRecipe(GameRegistry.java:242)

at net.minecraftforge.fml.common.registry.GameRegistry.addRecipe(GameRegistry.java:237)

at impure.explorer.crafting.ExplorerCrafting.init(ExplorerCrafting.java:195)

at impure.explorer.ExplorerW.init(ExplorerW.java:44)

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.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:537)

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 com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)

at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)

at com.google.common.eventbus.EventBus.post(EventBus.java:275)

at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)

at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:190)

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 com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)

at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)

at com.google.common.eventbus.EventBus.post(EventBus.java:275)

at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:119)

at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:710)

at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:315)

at net.minecraft.client.Minecraft.startGame(Minecraft.java:528)

 

-- Initialization --

Details:

Stacktrace:

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

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)

 

-- System Details --

Details:

Minecraft Version: 1.8

Operating System: Windows 8.1 (amd64) version 6.3

Java Version: 1.8.0_45, Oracle Corporation

Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation

Memory: 703577976 bytes (670 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)

JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M

IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0

FML: MCP v9.10 FML v8.0.99.99 Minecraft Forge 11.14.3.1446 4 mods loaded, 4 mods active

mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized

FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.8-11.14.3.1446.jar) Unloaded->Constructed->Pre-initialized->Initialized

Forge{11.14.3.1446} [Minecraft Forge] (forgeSrc-1.8-11.14.3.1446.jar) Unloaded->Constructed->Pre-initialized->Initialized

ew{1.0} [Explorer World] (bin) Unloaded->Constructed->Pre-initialized->Errored

Loaded coremods (and transformers):

GL info: ' Vendor: 'Intel' Version: '4.2.0 - Build 10.18.10.3412' Renderer: 'Intel® HD Graphics 4400'

Launched Version: 1.8

LWJGL: 2.9.1

OpenGL: Intel® HD Graphics 4400 GL version 4.2.0 - Build 10.18.10.3412, Intel

GL Caps: Using GL 1.3 multitexturing.

Using GL 1.3 texture combiners.

Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.

Shaders are available because OpenGL 2.1 is supported.

VBOs are available because OpenGL 1.5 is supported.

 

Using VBOs: No

Is Modded: Definitely; Client brand changed to 'fml,forge'

Type: Client (map_client.txt)

Resource Packs: []

Current Language: English (US)

Profiler Position: N/A (disabled)

 

Link to comment
Share on other sites

Hi

 

One of the objects on this line in your code hasn't been initialised properly (is still null)

  at impure.explorer.crafting.ExplorerCrafting.init(ExplorerCrafting.java:195)

 

Some background info on debugging Null Pointer Exceptions...

http://webcache.googleusercontent.com/search?q=cache:http://www.terryanderson.ca/debugging/run.html&gws_rd=cr&ei=JAaFVZGwJ6fHmAXbzK7ICQ

Be quick before it disappears... :)

 

-TGG

Link to comment
Share on other sites

Hi

 

One of the objects on this line in your code hasn't been initialised properly (is still null)

  at impure.explorer.crafting.ExplorerCrafting.init(ExplorerCrafting.java:195)

 

Some background info on debugging Null Pointer Exceptions...

http://webcache.googleusercontent.com/search?q=cache:http://www.terryanderson.ca/debugging/run.html&gws_rd=cr&ei=JAaFVZGwJ6fHmAXbzK7ICQ

Be quick before it disappears... :)

 

-TGG

 

Thanks! I think it may be because that I haven't registered or initialized the item yet

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
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.

 Share



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • It may be an issue with Caves and Cliffs. But hard to tell from the log.
    • Currently, I'm trying to figure out how to read in data from a custom datapack.  The intention is to have the Item have a reference to this pack (IE "modname:material/materialname") as an NBT tag, and i would overwrite some use functions based off of that.  How should I go about reading in the data from the datapack?
    • Game version is 1.16.5, no mods were installed, using Java8 while it happened. And I have multiple different versions of Java including Java8, 11, 12, 13, 14, 15, 16, 18 were installed in my system, but there is only Java8's path inside the environment variable. Could them be one of the reasons? I'm new here so I almost don't know anythings about forge server. Please tell me if you need other files or logs. Following is the output inside CMD after I open the "start.bat": ECHO 处于打开状态。 C:\Users\30121\Desktop\N0u3_OL_server>"C:\Program Files\Java\jre1.8.0_321\bin\java.exe" -Xms2G -Xmx2G -jar forge-1.16.5-36.2.35.jar nogui 2022-05-25 12:42:52,637 main ERROR Error processing element Queue ([Appenders: null]): CLASS_NOT_FOUND 2022-05-25 12:42:52,670 main WARN Advanced terminal features are not available in this environment 2022-05-25 12:42:52,709 main ERROR Unable to locate appender "ServerGuiConsole" for logger config "root" [12:42:52] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher running: args [--gameDir, ., --launchTarget, fmlserver, --fml.forgeVersion, 36.2.35, --fml.mcpVersion, 20210115.111550, --fml.mcVersion, 1.16.5, --fml.forgeGroup, net.minecraftforge, nogui] [12:42:52] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher 8.1.3+8.1.3+main-8.1.x.c94d18ec starting: java version 1.8.0_321 by Oracle Corporation [12:42:53] [main/INFO] [ne.mi.fm.lo.FixSSL/CORE]: Added Lets Encrypt root certificates as additional trust Exception in thread "main" [12:42:53] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]: java.lang.NoClassDefFoundError: com/google/common/base/Preconditions [12:42:53] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at org.spongepowered.asm.service.modlauncher.MixinTransformationHandler.offer(MixinTransformationHandler.java:67) [12:42:53] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at org.spongepowered.asm.service.modlauncher.MixinServiceModLauncher.offer(MixinServiceModLauncher.java:162) [12:42:53] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at org.spongepowered.asm.launch.MixinBootstrap.offerInternals(MixinBootstrap.java:227) [12:42:53] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at org.spongepowered.asm.launch.MixinBootstrap.start(MixinBootstrap.java:148) [12:42:53] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at org.spongepowered.asm.launch.MixinTransformationServiceAbstract.initialize(MixinTransformationServiceAbstract.java:88) [12:42:53] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at cpw.mods.modlauncher.TransformationServiceDecorator.onInitialize(TransformationServiceDecorator.java:68) [12:42:53] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at cpw.mods.modlauncher.TransformationServicesHandler.lambda$initialiseTransformationServices$7(TransformationServicesHandler.java:107) [12:42:53] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at java.util.HashMap$Values.forEach(Unknown Source) [12:42:53] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at cpw.mods.modlauncher.TransformationServicesHandler.initialiseTransformationServices(TransformationServicesHandler.java:107) [12:42:53] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at cpw.mods.modlauncher.TransformationServicesHandler.initializeTransformationServices(TransformationServicesHandler.java:59) [12:42:53] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at cpw.mods.modlauncher.Launcher.run(Launcher.java:76) [12:42:53] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [12:42:53] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at net.minecraftforge.server.ServerMain$Runner.runLauncher(ServerMain.java:49) [12:42:53] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at net.minecraftforge.server.ServerMain$Runner.access$100(ServerMain.java:46) [12:42:53] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at net.minecraftforge.server.ServerMain.main(ServerMain.java:43) [12:42:53] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]: Caused by: java.lang.ClassNotFoundException: com.google.common.base.Preconditions [12:42:53] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at java.net.URLClassLoader.findClass(Unknown Source) [12:42:53] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at java.lang.ClassLoader.loadClass(Unknown Source) [12:42:53] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) [12:42:53] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at java.lang.ClassLoader.loadClass(Unknown Source) [12:42:53] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         ... 15 more C:\Users\30121\Desktop\N0u3_OL_server>pause 请按任意键继续. . .
    • Although I am not exactly sure how a try-finally block would help (i.e. what code I should run even if a runtime exception is thrown), I have made some progress. The custom mob renders, but it does not rotate--even when I apply rotations to it before calling render(). private static boolean renderingCustomEntity = false; private static CustomEntity customEntity; private static void initializeCustomEntityIfNull(LocalPlayer localPlayer) { if (customEntity == null) { customEntity = ModEntities.CUSTOM_ENTITY.get().create(localPlayer.clientLevel); } } @SubscribeEvent public static void replaceMobModel(RenderLivingEvent.Pre<LivingEntity, EntityModel<LivingEntity>> event) { LocalPlayer localPlayer = Minecraft.getInstance().player; if (localPlayer != null && event.getEntity() instanceof Mob mob) { try { if (!renderingCustomEntity) { renderingCustomEntity = true; event.setCanceled(true); initializeCustomEntityIfNull(localPlayer); // I try to apply rotations to the custom entity before it rendered, but it still does not rotate at all. customEntity.setYRot(mob.getYRot()); customEntity.setYHeadRot(mob.getYHeadRot()); customEntity.setPose(mob.getPose()); // For some reason, the custom mob did not render when I called EntityRenderDispatcher#render. // So I called render() from EntityRenderDispatcher#getRenderer instead. Minecraft.getInstance().getEntityRenderDispatcher().getRenderer(customEntity).render( customEntity, customEntity.getYRot(), event.getPartialTick(), event.getPoseStack(), event.getMultiBufferSource(), event.getPackedLight() ); } } finally { renderingCustomEntity = false; } } } What would I be missing? Thank you for the help.
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.