Jump to content

Recommended Posts

Posted

Hey i added crafting and when i try crafting the item it crash here the report

 

---- Minecraft Crash Report ----

// Don't be sad. I'll do better next time, I promise!

 

Time: 10/27/14 9:22 PM

Description: Rendering item

 

java.lang.NullPointerException: Rendering item

at net.minecraft.item.ItemStack.getItemDamage(ItemStack.java:262)

at net.minecraft.client.renderer.entity.RenderItem.renderItemIntoGUI(RenderItem.java:415)

at net.minecraft.client.renderer.entity.RenderItem.renderItemAndEffectIntoGUI(RenderItem.java:560)

at net.minecraft.client.gui.inventory.GuiContainer.func_146977_a(GuiContainer.java:287)

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:1013)

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

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

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

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

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

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

 

 

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:262)

at net.minecraft.client.renderer.entity.RenderItem.renderItemIntoGUI(RenderItem.java:415)

 

-- 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:560)

at net.minecraft.client.gui.inventory.GuiContainer.func_146977_a(GuiContainer.java:287)

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: (186, 99). Absolute: (372, 281)

Screen size: Scaled: (427, 240). Absolute: (854, 480). Scale factor of 2

 

-- Affected level --

Details:

Level name: MpServer

All players: 1 total; [EntityClientPlayerMP['Player578'/317, l='MpServer', x=194.32, y=69.62, z=244.24]]

Chunk stats: MultiplayerChunkCache: 225, 225

Level seed: 0

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

Level generator options:

Level spawn location: World: (192,64,248), Chunk: (at 0,4,8 in 12,15; contains blocks 192,0,240 to 207,255,255), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)

Level time: 1124 game time, 1124 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: 108 total; [EntityBat['Bat'/31, l='MpServer', x=123.44, y=36.51, z=281.34], EntityZombie['Zombie'/39, l='MpServer', x=115.59, y=37.00, z=191.72], EntitySheep['Sheep'/42, l='MpServer', x=115.31, y=76.00, z=229.47], EntityZombie['Zombie'/40, l='MpServer', x=115.50, y=37.00, z=194.50], EntityChicken['Chicken'/47, l='MpServer', x=116.50, y=75.00, z=225.50], EntityClientPlayerMP['Player578'/317, l='MpServer', x=194.32, y=69.62, z=244.24], EntitySheep['Sheep'/50, l='MpServer', x=124.50, y=75.00, z=237.50], EntitySheep['Sheep'/49, l='MpServer', x=124.50, y=75.00, z=237.50], EntityChicken['Chicken'/48, l='MpServer', x=116.50, y=76.00, z=226.50], EntityBat['Bat'/55, l='MpServer', x=123.25, y=25.10, z=285.75], EntityBat['Bat'/54, l='MpServer', x=122.94, y=23.04, z=279.44], EntitySheep['Sheep'/53, l='MpServer', x=123.50, y=70.00, z=242.50], EntitySheep['Sheep'/52, l='MpServer', x=125.50, y=72.00, z=240.50], EntityCreeper['Creeper'/57, l='MpServer', x=119.03, y=33.00, z=273.59], EntityBat['Bat'/56, l='MpServer', x=127.91, y=22.67, z=285.31], EntityEnderman['Enderman'/71, l='MpServer', x=127.50, y=22.00, z=324.50], EntitySheep['Sheep'/77, l='MpServer', x=137.59, y=63.00, z=254.22], EntitySheep['Sheep'/78, l='MpServer', x=133.88, y=64.00, z=248.16], EntitySheep['Sheep'/79, l='MpServer', x=138.31, y=63.00, z=255.44], EntityZombie['Zombie'/72, l='MpServer', x=127.50, y=23.00, z=320.50], EntityBat['Bat'/85, l='MpServer', x=132.75, y=24.10, z=296.50], EntityBat['Bat'/84, l='MpServer', x=132.75, y=25.10, z=295.75], EntityBat['Bat'/81, l='MpServer', x=135.44, y=24.05, z=263.44], EntityBat['Bat'/80, l='MpServer', x=124.66, y=21.98, z=284.59], EntityBat['Bat'/83, l='MpServer', x=130.47, y=22.33, z=293.34], EntitySheep['Sheep'/82, l='MpServer', x=139.19, y=63.00, z=256.69], EntityChicken['Chicken'/93, l='MpServer', x=157.50, y=63.00, z=177.50], EntitySheep['Sheep'/95, l='MpServer', x=152.53, y=67.00, z=183.53], EntityChicken['Chicken'/94, l='MpServer', x=153.50, y=63.00, z=177.50], EntityChicken['Chicken'/100, l='MpServer', x=155.59, y=65.00, z=186.66], EntitySheep['Sheep'/101, l='MpServer', x=172.94, y=63.00, z=256.94], EntitySheep['Sheep'/98, l='MpServer', x=155.31, y=65.00, z=182.53], EntityChicken['Chicken'/99, l='MpServer', x=157.50, y=64.00, z=179.50], EntitySheep['Sheep'/96, l='MpServer', x=150.34, y=70.00, z=184.44], EntitySheep['Sheep'/97, l='MpServer', x=150.16, y=69.00, z=183.06], EntitySheep['Sheep'/119, l='MpServer', x=161.94, y=64.00, z=245.03], EntitySheep['Sheep'/118, l='MpServer', x=162.53, y=63.00, z=255.22], EntitySheep['Sheep'/117, l='MpServer', x=165.50, y=63.00, z=182.50], EntitySheep['Sheep'/120, l='MpServer', x=153.81, y=63.00, z=261.88], EntitySheep['Sheep'/137, l='MpServer', x=187.75, y=74.00, z=311.13], EntitySheep['Sheep'/136, l='MpServer', x=181.22, y=77.00, z=312.72], EntitySheep['Sheep'/135, l='MpServer', x=180.31, y=77.00, z=311.50], EntitySheep['Sheep'/134, l='MpServer', x=185.47, y=75.00, z=309.47], EntitySkeleton['Skeleton'/159, l='MpServer', x=198.50, y=22.00, z=191.50], EntityZombie['Zombie'/171, l='MpServer', x=195.94, y=24.00, z=319.31], EntityZombie['Zombie'/170, l='MpServer', x=196.50, y=29.00, z=314.50], EntityCreeper['Creeper'/169, l='MpServer', x=200.50, y=60.00, z=295.50], EntityCreeper['Creeper'/168, l='MpServer', x=192.00, y=60.00, z=300.44], EntitySkeleton['Skeleton'/163, l='MpServer', x=198.66, y=26.00, z=232.31], EntitySpider['Spider'/162, l='MpServer', x=207.50, y=26.00, z=230.78], EntityZombie['Zombie'/161, l='MpServer', x=200.50, y=26.00, z=233.50], EntitySquid['Squid'/160, l='MpServer', x=200.84, y=53.34, z=182.84], EntityCreeper['Creeper'/167, l='MpServer', x=199.50, y=60.00, z=295.50], EntityCreeper['Creeper'/166, l='MpServer', x=199.50, y=60.00, z=296.50], EntitySheep['Sheep'/165, l='MpServer', x=204.63, y=69.00, z=264.47], EntitySheep['Sheep'/164, l='MpServer', x=195.31, y=68.00, z=250.25], EntitySpider['Spider'/186, l='MpServer', x=210.38, y=27.00, z=224.81], EntityCreeper['Creeper'/187, l='MpServer', x=216.50, y=21.00, z=234.06], EntitySkeleton['Skeleton'/184, l='MpServer', x=220.63, y=38.00, z=195.31], EntityZombie['Zombie'/185, l='MpServer', x=211.94, y=25.00, z=208.31], EntitySheep['Sheep'/190, l='MpServer', x=215.78, y=68.00, z=254.72], EntitySheep['Sheep'/191, l='MpServer', x=215.91, y=67.00, z=253.50], EntitySpider['Spider'/188, l='MpServer', x=215.44, y=20.00, z=236.22], EntitySheep['Sheep'/189, l='MpServer', x=201.52, y=69.00, z=242.60], EntityZombie['Zombie'/178, l='MpServer', x=216.00, y=25.00, z=212.44], EntityZombie['Zombie'/179, l='MpServer', x=211.09, y=23.00, z=201.44], EntityZombie['Zombie'/177, l='MpServer', x=212.31, y=24.00, z=206.69], EntitySkeleton['Skeleton'/182, l='MpServer', x=221.28, y=38.00, z=196.31], EntitySkeleton['Skeleton'/183, l='MpServer', x=217.56, y=38.00, z=193.94], EntityCreeper['Creeper'/180, l='MpServer', x=213.47, y=24.00, z=206.69], EntitySkeleton['Skeleton'/181, l='MpServer', x=222.50, y=39.00, z=197.00], EntityBat['Bat'/207, l='MpServer', x=251.53, y=37.19, z=221.75], EntityZombie['Zombie'/197, l='MpServer', x=205.53, y=21.00, z=323.01], EntitySheep['Sheep'/196, l='MpServer', x=222.94, y=68.00, z=261.06], EntitySpider['Spider'/193, l='MpServer', x=222.75, y=52.00, z=269.09], EntitySheep['Sheep'/192, l='MpServer', x=213.81, y=68.00, z=239.13], EntityZombie['Zombie'/195, l='MpServer', x=216.84, y=52.00, z=263.72], EntityZombie['Zombie'/194, l='MpServer', x=220.63, y=52.00, z=267.16], EntityWitch['Witch'/220, l='MpServer', x=243.94, y=32.00, z=257.47], EntityBat['Bat'/221, l='MpServer', x=246.97, y=41.05, z=242.31], EntitySheep['Sheep'/222, l='MpServer', x=245.50, y=67.00, z=248.50], EntitySheep['Sheep'/223, l='MpServer', x=246.50, y=64.00, z=250.50], EntitySheep['Sheep'/216, l='MpServer', x=241.61, y=64.00, z=278.78], EntitySpider['Spider'/219, l='MpServer', x=242.72, y=35.00, z=238.78], EntitySkeleton['Skeleton'/212, l='MpServer', x=238.44, y=13.00, z=272.09], EntitySheep['Sheep'/213, l='MpServer', x=237.44, y=66.00, z=282.47], EntitySheep['Sheep'/214, l='MpServer', x=237.50, y=74.00, z=276.50], EntitySheep['Sheep'/215, l='MpServer', x=235.50, y=73.00, z=279.50], EntityItem['item.item.seeds'/208, l='MpServer', x=224.19, y=67.13, z=214.09], EntitySheep['Sheep'/209, l='MpServer', x=225.91, y=68.00, z=244.91], EntitySheep['Sheep'/210, l='MpServer', x=235.97, y=69.00, z=243.97], EntitySkeleton['Skeleton'/211, l='MpServer', x=236.50, y=15.00, z=263.50], EntitySheep['Sheep'/239, l='MpServer', x=266.50, y=65.00, z=288.47], EntitySheep['Sheep'/238, l='MpServer', x=256.31, y=64.00, z=301.19], EntitySheep['Sheep'/237, l='MpServer', x=264.50, y=65.00, z=287.50], EntityZombie['Zombie'/236, l='MpServer', x=268.44, y=25.00, z=284.56], EntityZombie['Zombie'/235, l='MpServer', x=256.88, y=17.00, z=202.34], EntityCreeper['Creeper'/230, l='MpServer', x=255.00, y=52.00, z=309.59], EntitySheep['Sheep'/229, l='MpServer', x=254.50, y=63.00, z=308.50], EntitySheep['Sheep'/228, l='MpServer', x=253.50, y=64.00, z=303.50], EntityCreeper['Creeper'/227, l='MpServer', x=246.22, y=18.00, z=280.06], EntityBat['Bat'/226, l='MpServer', x=244.53, y=32.05, z=258.72], EntityBat['Bat'/225, l='MpServer', x=246.50, y=28.39, z=277.91], EntitySheep['Sheep'/224, l='MpServer', x=245.50, y=67.00, z=248.50], EntityCreeper['Creeper'/246, l='MpServer', x=273.50, y=33.00, z=184.50], EntitySheep['Sheep'/242, l='MpServer', x=253.84, y=64.00, z=293.50], EntitySheep['Sheep'/240, l='MpServer', x=266.50, y=65.00, z=289.53], EntitySheep['Sheep'/241, l='MpServer', x=266.50, y=65.00, z=290.53]]

Retry entities: 0 total; []

Server brand: fml,forge

Server type: Integrated singleplayer server

Stacktrace:

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

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

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

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

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

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

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

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

 

-- System Details --

Details:

Minecraft Version: 1.7.2

Operating System: Windows 8 (amd64) version 6.2

Java Version: 1.7.0_71, Oracle Corporation

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

Memory: 689370624 bytes (657 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB)

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

AABB Pool Size: 9206 (515536 bytes; 0 MB) allocated, 1472 (82432 bytes; 0 MB) used

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

FML: MCP v9.03 FML v7.2.211.1121 Minecraft Forge 10.12.2.1121 4 mods loaded, 4 mods active

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

FML{7.2.211.1121} [Forge Mod Loader] (forgeSrc-1.7.2-10.12.2.1121.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

Forge{10.12.2.1121} [Minecraft Forge] (forgeSrc-1.7.2-10.12.2.1121.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

Ruby Mod{1.7.2} [Ruby Mod] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

Launched Version: 1.6

LWJGL: 2.9.0

OpenGL: GeForce GTX 780/PCIe/SSE2 GL version 4.3.0, NVIDIA Corporation

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

Type: Client (map_client.txt)

Resource Packs: []

Current Language: ~~ERROR~~ NullPointerException: null

Profiler Position: N/A (disabled)

Vec3 Pool Size: 1850 (103600 bytes; 0 MB) allocated, 869 (48664 bytes; 0 MB) used

Anisotropic Filtering: Off (1)

NEWB! in java im sorry :/

Posted

package com.Ruby.RubyMod;

 

import net.minecraft.init.Blocks;

import net.minecraft.init.Items;

import net.minecraft.item.ItemStack;

import cpw.mods.fml.common.registry.GameRegistry;

 

public class Recipes {

 

public static void MainClass() {

addCraftingRecipes();

//addSmeltingRecipes();

}

 

private static void addCraftingRecipes() {

 

GameRegistry.addRecipe(new ItemStack(RubyMod.RubyPickaxe), "iii", " s ", " s ", 'i', RubyMod.RubyIngot, 's', Items.stick);

 

 

GameRegistry.addRecipe(new ItemStack(RubyMod.RubySword), " i ", " i ", " s ", 'i', RubyMod.RubyIngot, 's', Items.stick);

 

 

GameRegistry.addRecipe(new ItemStack(Blocks.grass, 9),

new Object[] { "XXX", "XXX", "XXX", 'X', Blocks.dirt });

}

 

 

}

 

 

 

NEWB! in java im sorry :/

Posted

See your init method?  Make another one called preInit:

@EventHandler
    public void init(FMLPreInitializationEvent event)

This is where you should register items, not in init.

You Only Live Once, So Win At Golf.

Sorry for my English, I'm American.

Guest
This topic is now closed to further replies.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Ah, it appears I spoke too soon, I still need a little help here. I now have the forceloading working reliably.  However, I've realized it's not always the first tick that loads the entity.  I've seen it take anywhere from 2-20ish to actually go through, in which time my debugging has revealed that the chunk is loaded, but during which time calling  serverLevelIn.getEntity(uuidIn) returns a null result.  I suspect this has to do with queuing and how entities are loaded into the game.  While not optimal, it's acceptable, and I don't think there's a whole ton I can do to avoid it. However, my concern is that occasionally teleporting an entity in this manner causes a lag spike.  It's not every time and gives the appearance of being correlated with when other chunks are loading in.  It's also not typically a long spike, but can last a second or two, which is less than ideal.  The gist of how I'm summoning is here (although I've omitted some parts that weren't relevant.  The lag occurs before the actual summon so I'm pretty confident it's the loading, and not the actual summon call). ChunkPos chunkPos = new ChunkPos(entityPosIn); if (serverLevelIn.areEntitiesLoaded(chunkPos.toLong())) { boolean isSummoned = // The method I'm using for actual summoning is called here. Apart from a few checks, the bulk of it is shown later on. if (isSummoned) { // Code that runs here just notifies the player of the summon, clears it from the queue, and removes the forceload } } else { // I continue forcing the chunk until the summon succeeds, to make sure it isn't inadvertently cleared ForgeChunkManager.forceChunk(serverLevelIn, MODID, summonPosIn, chunkPos.x, chunkPos.z, true, true); } The summon code itself uses serverLevelIn.getEntity(uuidIn) to retrieve the entity, and moves it as such.  It is then moved thusly: if (entity.isAlive()) { entity.moveTo(posIn.getX(), posIn.getY(), posIn.getZ()); serverLevelIn.playSound(null, entity, SoundEvents.ENDERMAN_TELEPORT, SoundSource.NEUTRAL, 1.0F, 1.0F); return true; } I originally was calling .getEntity() more frequently and didn't have the check for whether or not entities were loaded in place to prevent unnecessary code calls, but even with those safety measures in place, the lag still persists.  Could this just be an issue with 1.18's lack of optimization in certain areas?  Is there anything I can do to mitigate it?  Is there a performance boosting mod I could recommend alongside my own to reduce the chunk loading lag? At the end of the day, it does work, and I'm putting measures in place to prevent players from abusing the system to cause lag (i.e. each player can only have one queued summon at a time-- trying to summon another replaces the first call).  It's also not an unacceptable level of lag, IMO, given the infrequency of such calls, and the fact that I'm providing the option to toggle off the feature if server admins don't want it used.  However, no amount of lag is ideal, so if possible I'd love to find a more elegant solution-- or at least a mod recommendation to help improve it. Thanks!
    • When i start my forge server its on but when i try to join its come a error Internal Exception: java.lang.OutOfMemoryError: Requested array size exceeds VM limit Server infos: Linux Minecraft version 1.20.1 -Xmx11G -Xms8G
    • Also add the latest.log from your logs-folder
    • Add the mods in groups
  • Topics

×
×
  • Create New...

Important Information

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