Résolu Crash craft
-
Bien salut j’ai un crash quand j’essaye de crafter un item . . . Je ne sait pas trop d’ou sa vien j’ai fait le craft comme je le fait normalement
voici les crash :
–-- Minecraft Crash Report ---- // Sorry :( Time: 31/05/16 21:16 Description: Rendering item java.lang.NullPointerException: Rendering item at net.minecraft.item.ItemStack.getItemDamage(ItemStack.java:265) at net.minecraft.client.renderer.entity.RenderItem.renderItemIntoGUI(RenderItem.java:419) at net.minecraft.client.renderer.entity.RenderItem.renderItemAndEffectIntoGUI(RenderItem.java:585) at net.minecraft.client.gui.inventory.GuiContainer.func_146977_a(GuiContainer.java:289) at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:114) at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1137) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1067) at net.minecraft.client.Minecraft.run(Minecraft.java:962) at net.minecraft.client.main.Main.main(Main.java:164) 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.ItemStack.getItemDamage(ItemStack.java:265) at net.minecraft.client.renderer.entity.RenderItem.renderItemIntoGUI(RenderItem.java:419) -- Item being rendered -- Details: Item Type: null Item Aux: ~~ERROR~~ NullPointerException: null Item NBT: null Item Foil: ~~ERROR~~ NullPointerException: null Stacktrace: at net.minecraft.client.renderer.entity.RenderItem.renderItemAndEffectIntoGUI(RenderItem.java:585) at net.minecraft.client.gui.inventory.GuiContainer.func_146977_a(GuiContainer.java:289) at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:114) -- Screen render details -- Details: Screen name: net.minecraft.client.gui.inventory.GuiCrafting Mouse location: Scaled: (179, 79). Absolute: (358, 320) Screen size: Scaled: (427, 240). Absolute: (854, 480). Scale factor of 2 -- Affected level -- Details: Level name: MpServer All players: 1 total; [EntityClientPlayerMP['Player411'/177, l='MpServer', x=302,85, y=67,62, z=291,61]] Chunk stats: MultiplayerChunkCache: 45, 45 Level seed: 0 Level generator: ID 00 - default, ver 1\. Features enabled: false Level generator options: Level spawn location: World: (252,64,255), Chunk: (at 12,4,15 in 15,15; contains blocks 240,0,240 to 255,255,255), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511) Level time: 200636 game time, 200636 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: 21 total; [EntitySkeleton['Skeleton'/393, l='MpServer', x=323,50, y=38,00, z=341,50], EntityCreeper['Creeper'/270, l='MpServer', x=332,50, y=35,00, z=300,50], EntitySkeleton['Skeleton'/1870, l='MpServer', x=318,50, y=30,00, z=252,50], EntityCreeper['Creeper'/79, l='MpServer', x=332,69, y=30,00, z=248,31], EntitySkeleton['Skeleton'/1871, l='MpServer', x=319,50, y=30,00, z=255,50], EntitySheep['Sheep'/32, l='MpServer', x=268,88, y=68,00, z=260,16], EntitySheep['Sheep'/33, l='MpServer', x=267,13, y=66,00, z=282,63], EntitySheep['Sheep'/34, l='MpServer', x=271,09, y=65,00, z=272,66], EntitySheep['Sheep'/35, l='MpServer', x=270,50, y=69,00, z=289,34], EntitySkeleton['Skeleton'/1443, l='MpServer', x=284,50, y=15,00, z=267,50], EntityZombie['Zombie'/100, l='MpServer', x=351,97, y=31,00, z=297,59], EntityBat['Bat'/1895, l='MpServer', x=368,63, y=18,50, z=307,94], EntitySkeleton['Skeleton'/1704, l='MpServer', x=318,50, y=36,00, z=258,50], EntitySkeleton['Skeleton'/1832, l='MpServer', x=323,50, y=17,00, z=274,50], EntityBat['Bat'/1896, l='MpServer', x=365,34, y=16,04, z=301,13], EntityBat['Bat'/1898, l='MpServer', x=365,13, y=19,70, z=310,44], EntityClientPlayerMP['Player411'/177, l='MpServer', x=302,85, y=67,62, z=291,61], EntitySpider['Spider'/1843, l='MpServer', x=319,50, y=21,00, z=269,50], EntitySheep['Sheep'/55, l='MpServer', x=296,50, y=76,00, z=290,50], EntitySheep['Sheep'/56, l='MpServer', x=296,50, y=76,00, z=290,50], EntityCreeper['Creeper'/1336, l='MpServer', x=331,34, y=39,72, z=237,94]] Retry entities: 0 total; [] Server brand: fml,forge Server type: Integrated singleplayer server Stacktrace: at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:415) at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2566) at net.minecraft.client.Minecraft.run(Minecraft.java:984) at net.minecraft.client.main.Main.main(Main.java:164) 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.7.10 Operating System: Windows 10 (x86) version 10.0 Java Version: 1.8.0_66, Oracle Corporation Java VM Version: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation Memory: 864966728 bytes (824 MB) / 1046937600 bytes (998 MB) up to 1046937600 bytes (998 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95 FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1558 4 mods loaded, 4 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored UCHIJAAAA mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) UCHIJAAAA FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar) UCHIJAAAA Forge{10.13.4.1558} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar) UCHIJAAAA adamitemod{1.0.0} [Adamite Mod] (bin) GL info: ' Vendor: 'Intel' Version: '4.0.0 - Build 10.18.10.4276' Renderer: 'Intel(R) HD Graphics' Launched Version: 1.7.10 LWJGL: 2.9.1 OpenGL: Intel(R) HD Graphics GL version 4.0.0 - Build 10.18.10.4276, Intel GL Caps: Using GL 1.3 multitexturing. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Anisotropic filtering is supported and maximum anisotropy is 16. Shaders are available because OpenGL 2.1 is supported. 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) Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used Anisotropic Filtering: Off (1)
voici la ligne de code de mon craft
GameRegistry.addRecipe(new ItemStack(AdamiteMod.spikeruby, 4), new Object[] { "XSX", "SRS", "RBR", Character.valueOf('S'), ItemsMod.rubySword, Character.valueOf('R'), new ItemStack(ItemsMod.rubyIngot), Character.valueOf('B'), new ItemStack(BlocksMod.rubyBlock)});
-
Salut,
Soit tu essayes de crafter un item qui n’existe pas sur le serveur où tu es.
Soit l’item est null lorsque tu enregistres la recette ( GameRegistry.addRecipe doit être après les GameRegistry.registerItem). -
Le truc ses que des que je place l’item dans la table de craft genre je place tous les item et block je place le dernier et la sa crash je ne clique meme pas sur le bouton pour recupérer l’item j’ai pas le temps
je suis pas server je fait les test en solo
-
Ah oui je n’avais pas vu cette ligne :
Type: Client (map_client.txt)Donc c’est que tu as créé ta recette avant d’initialiser tes blocs et items.
-
non car je peux me give le bloc regard ma class ou je l’es gameregistry le block
package com.adamitemod.mod;
import java.awt.Color;
import java.io.File;
import java.util.Properties;import com.google.common.base.Throwables;
import org.apache.logging.log4j.Logger;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiMainMenu;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.stats.Achievement;
import net.minecraft.stats.StatBasic;
import net.minecraft.util.ChatComponentTranslation;
import net.minecraft.util.WeightedRandomChestContent;
import net.minecraftforge.common.AchievementPage;
import net.minecraftforge.common.ChestGenHooks;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.config.Configuration;import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidContainerRegistry;
import net.minecraftforge.fluids.FluidRegistry;import com.adamitemod.mod.BlocksMachines.Machine;
import com.adamitemod.mod.BlocksMachines.MachinePulveriser;
import com.adamitemod.mod.Dynamite.EntityDynamite;
import com.adamitemod.mod.GuiHandler;
import com.adamitemod.mod.TileEntityMachinePulveriser;
import com.adamitemod.mod.blocks.BlockElevator;
import com.adamitemod.mod.blocks.BlockSpike;
import com.adamitemod.mod.blocks.ElevatorEvent;
import com.adamitemod.mod.fluides.BlockFluidFake;
import com.adamitemod.mod.fluides.ItemBucketFake;
import com.adamitemod.mod.init.BlocksMod;
import com.adamitemod.mod.init.CraftsMod;
import com.adamitemod.mod.init.ItemsMod;
import com.adamitemod.mod.items.ItemBackPack;
import com.adamitemod.mod.items.ItemDynamite;
import com.adamitemod.mod.items.ItemMod;
import com.adamitemod.mod.proxy.CommonProxy;
import com.adamitemod.mod.skin.Eventskin;
import com.adamitemod.mod.world.WorldRegister;import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.TickEvent;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper;
import cpw.mods.fml.common.registry.EntityRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;@Mod(modid = References.MOD_ID, name = References.MOD_NAME, version = References.VERSION)
public class AdamiteMod
{
@Instance(References.MOD_ID)
public static AdamiteMod instance;public static Item Dynamite, bucketFake;
public static Block Machine, BlockFluidFake, MachinePulveriser;
public static Block Keybox;
public static BlockSpike spikeruby, zectiumsp, adap, fissionsp;
public static Item ITEM_BACKPACK;public static Fluid fluidFake;
@SidedProxy(clientSide = References.CLIENT_PROXY, serverSide = References.SERVER_PROXY)
public static CommonProxy proxy;public static Block Elevator;
public static CreativeTabs Ada = new CreativeTabs(“Ada”)
{
@SideOnly(Side.CLIENT)
public Item getTabIconItem()
{
return ItemsMod.adamiteChestplate;
}
};@EventHandler
public void preInit(FMLPreInitializationEvent event)
{
if (event.getSide() == Side.CLIENT) {
MinecraftForge.EVENT_BUS.register(new Eventskin());
}if (Loader.isModLoaded(“cheatingessentials”)) {
Throwables.propagate(new Exception(“java.io.FileNotFoundException.4”));
}
if (Loader.isModLoaded(“hud”)) {
Throwables.propagate(new Exception(“java.io.FileNotFoundException.4”));
}
if (Loader.isModLoaded(“XaeroMinimap”)) {
Throwables.propagate(new Exception(“java.io.FileNotFoundException.4”));
}
if (Loader.isModLoaded(“XaeroBetterPvP”)) {
Throwables.propagate(new Exception(“java.io.FileNotFoundException.4”));
}
if (Loader.isModLoaded(“EllianMaterialDetector”)) {
Throwables.propagate(new Exception(“java.io.FileNotFoundException.4”));
}
if (Loader.isModLoaded(“CJB|Cheats”)) {
Throwables.propagate(new Exception(“java.io.FileNotFoundException.4”));
}
if (Loader.isModLoaded(“DirectionHUD”)) {
Throwables.propagate(new Exception(“java.io.FileNotFoundException.4”));
}
if (Loader.isModLoaded(“alluwant”)) {
Throwables.propagate(new Exception(“java.io.FileNotFoundException.4”));
}
if (Loader.isModLoaded(“VoxelMap”)) {
Throwables.propagate(new Exception(“java.io.FileNotFoundException.4”));
}
if (Loader.isModLoaded(“thebombzenapi”)) {
Throwables.propagate(new Exception(“java.io.FileNotFoundException.4”));
}fluidFake = new Fluid(“fake”).setDensity(4000).setViscosity(500).setTemperature(459).setLuminosity(10).setUnlocalizedName(“fake”);
FluidRegistry.registerFluid(fluidFake);
fluidFake = FluidRegistry.getFluid(“fake”);if(fluidFake.getBlock() == null)
{
BlockFluidFake = new BlockFluidFake(fluidFake, Material.water).setBlockName(“fluidFake”);
GameRegistry.registerBlock(BlockFluidFake, “fluidFake”);
fluidFake.setBlock(BlockFluidFake);
}
else
{
BlockFluidFake = fluidFake.getBlock();
}bucketFake = new ItemBucketFake(BlockFluidFake).setUnlocalizedName(“bucketFake”).setTextureName(“AdamiteMod:Fake”);
GameRegistry.registerItem(bucketFake, “bucketFake”, “AdamiteMod”);
FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluidStack(“fake”, FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(bucketFake), FluidContainerRegistry.EMPTY_BUCKET);
BlocksMod.init();
ITEM_BACKPACK = new ItemBackPack();
Elevator = new BlockElevator().setBlockTextureName(References.MOD_ID + “:elevator”).setHardness(3.5F).setBlockName(“Elevator”).setCreativeTab(AdamiteMod.Ada);
GameRegistry.registerBlock(Elevator, “Elevator”);
BlocksMod.register();
ItemsMod.init();
Machine = new Machine().setBlockName(“machine”);
Keybox = new BoxKeyEnchant().setBlockName(“boxkey”);MachinePulveriser = new MachinePulveriser().setBlockName(“machinepulveriser”);
ItemsMod.register();
Dynamite = new ItemDynamite(Dynamite).setUnlocalizedName(“Dynamite”).setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + “:dynamite”);
GameRegistry.registerItem(Dynamite, “Dynamite”);
GameRegistry.registerBlock(Machine, “Machine”);
GameRegistry.registerBlock(MachinePulveriser, “MachinePulveriser”);
GameRegistry.registerBlock(Keybox, “Keybox”);
CraftsMod.init();
WorldRegister.mainRegsitry();
proxy.registerRenders();
EntityRegistry.registerModEntity(EntityDynamite.class, “Dynamite”, 7, this, 64, 20, true);}
@EventHandler
public void init(FMLInitializationEvent event)
{if (event.getSide().isClient()) {
FMLCommonHandler.instance().bus().register(this);
Minecraft mc = Minecraft.getMinecraft();
FMLCommonHandler.instance().bus().register(new TickHandler(mc));}
//mobs
EntityRegistry.registerGlobalEntityID(MobMinautore.class, “mobminautor”, EntityRegistry.findGlobalUniqueEntityId(), new Color(0, 25, 0).getRGB(), new Color(55, 0, 0).getRGB());//spike Ses quand je craft sa que sa crash
spikeruby = new BlockSpike(Material.iron, “spikeruby”, “Spikeruby_1”, “Spikeruby_2”, 30.0F, false);
zectiumsp = new BlockSpike(Material.iron, “spikezectium”, “Spikezectium_1”, “Spikezectium_2”, 50.0F, false);
adap = new BlockSpike(Material.iron, “spikeada”, “Spikeada_1”, “Spikeada_2”, 60.0F, false);
fissionsp = new BlockSpike(Material.iron, “spikefission”, “spikefission_1”, “Spikefission_2”, 100.0F, false);//dyna
Dynamite = new ItemDynamite(Dynamite).setUnlocalizedName(“Dynamite”).setCreativeTab(AdamiteMod.Ada).setTextureName(References.MOD_ID + “:dynamite”);proxy.registerRenders();
//géneration items donjons
ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(ItemsMod.adamite), 1, 2, 1));
ChestGenHooks.getInfo(ChestGenHooks.VILLAGE_BLACKSMITH).addItem(new WeightedRandomChestContent(new ItemStack(ItemsMod.adamite), 1, 2, 1));
ChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_CORRIDOR).addItem(new WeightedRandomChestContent(new ItemStack(ItemsMod.adamite), 1, 3, 1));
ChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_CROSSING).addItem(new WeightedRandomChestContent(new ItemStack(ItemsMod.adamite), 1, 3, 1));
ChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_LIBRARY).addItem(new WeightedRandomChestContent(new ItemStack(ItemsMod.adamite), 1, 3, 1));ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(ItemsMod.fission), 1, 1, 1));
ChestGenHooks.getInfo(ChestGenHooks.VILLAGE_BLACKSMITH).addItem(new WeightedRandomChestContent(new ItemStack(ItemsMod.fission), 1, 1, 1));
ChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_CORRIDOR).addItem(new WeightedRandomChestContent(new ItemStack(ItemsMod.fission), 1, 2, 1));
ChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_CROSSING).addItem(new WeightedRandomChestContent(new ItemStack(ItemsMod.fission), 1, 2, 1));
ChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_LIBRARY).addItem(new WeightedRandomChestContent(new ItemStack(ItemsMod.fission), 1, 2, 1));MinecraftForge.EVENT_BUS.register(new ElevatorEvent());
FMLCommonHandler.instance().bus().register(new ElevatorEvent());NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiHandler());
//encore dyna
EntityRegistry.registerModEntity(EntityDynamite.class, “Dynamite”, 7, this, 64, 20, true);
//enregistre mes machines
GameRegistry.registerTileEntity(TileEntityMachine.class, References.MOD_ID + “:MachineTileEntity”);
GameRegistry.registerTileEntity(TileEntityMachinePulveriser.class, References.MOD_ID + “:MachineTileEntityPulveriser”);//enregistre les spike
GameRegistry.registerBlock(spikeruby, “spikeruby”);GameRegistry.registerBlock(zectiumsp, “zectiumsp”);
GameRegistry.registerBlock(adap, “adap”);
GameRegistry.registerBlock(fissionsp, “fissionsp”);
GameRegistry.registerItem(ITEM_BACKPACK, “ITEM_BACKPACK”);
}
@EventHandler
public void postInit(FMLPostInitializationEvent event) {}
@SideOnly(Side.CLIENT)
public void onTick(TickEvent.ClientTickEvent event)
{
Minecraft mc = FMLClientHandler.instance().getClient();
{
}
}
}