iiBlake
-
Posts
9 -
Joined
-
Last visited
Posts posted by iiBlake
-
-
Okay, i tried using the CraftingDeconstructor class, and I'm doing it like this:
List<String> d = new ArrayList<String>(); CraftingDeconstructor decon = new CraftingDeconstructor(); ItemStack[] ingredients = decon.getDeconstructResults(item); for (ItemStack i : ingredients) { d.add(i.getUnlocalizedName()); } return d;
But it is throwing a NPE in it:
[21:43:40] [Client thread/INFO] [sTDOUT]: [me.iiblake.testmod.CraftingDeconstructor:getDeconstructResults:24]: Looking for deconstructing a recipe for item.ballisticsGel
[21:43:40] [Client thread/INFO] [sTDOUT]: [me.iiblake.testmod.CraftingDeconstructor:getCraftingGrid:90]: getCraftingGrid for shapeless ore recipe with input array size = 1
[21:43:41] [server thread/INFO]: Stopping server
[21:43:41] [server thread/INFO]: Saving players
[21:43:41] [server thread/INFO]: Saving worlds
[21:43:41] [server thread/INFO]: Saving chunks for level 'New World'/Overworld
[21:43:41] [server thread/INFO]: Saving chunks for level 'New World'/Nether
[21:43:41] [server thread/INFO]: Saving chunks for level 'New World'/The End
[21:43:42] [server thread/INFO] [FML]: Unloading dimension 0
[21:43:42] [server thread/INFO] [FML]: Unloading dimension -1
[21:43:42] [server thread/INFO] [FML]: Unloading dimension 1
[21:43:42] [server thread/INFO] [FML]: Applying holder lookups
[21:43:42] [server thread/INFO] [FML]: Holder lookups applied
[21:43:42] [Client thread/FATAL]: Reported exception thrown!
net.minecraft.util.ReportedException: Rendering screen
at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1168) ~[EntityRenderer.class:?]
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1068) ~[Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:962) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_79]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_79]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_79]
at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_79]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?]
at GradleStart.main(Unknown Source) [start/:?]
Caused by: java.lang.NullPointerException
at me.iiblake.testmod.items.ItemBallisticsGel.getTooltipStrings(ItemBallisticsGel.java:30) ~[itemBallisticsGel.class:?]
at me.iiblake.testmod.items.ItemBase.addInformation(ItemBase.java:17) ~[itemBase.class:?]
at net.minecraft.item.ItemStack.getTooltip(ItemStack.java:641) ~[itemStack.class:?]
at net.minecraft.client.gui.GuiScreen.renderToolTip(GuiScreen.java:124) ~[GuiScreen.class:?]
at net.minecraft.client.gui.inventory.GuiContainerCreative.renderToolTip(GuiContainerCreative.java:769) ~[GuiContainerCreative.class:?]
at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:186) ~[GuiContainer.class:?]
at net.minecraft.client.renderer.InventoryEffectRenderer.drawScreen(InventoryEffectRenderer.java:44) ~[inventoryEffectRenderer.class:?]
at net.minecraft.client.gui.inventory.GuiContainerCreative.drawScreen(GuiContainerCreative.java:673) ~[GuiContainerCreative.class:?]
at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1137) ~[EntityRenderer.class:?]
... 11 more
[21:43:42] [Client thread/INFO] [sTDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:388]: ---- Minecraft Crash Report ----
// This doesn't make any sense!
Time: 3/09/16 9:43 PM
Description: Rendering screen
java.lang.NullPointerException: Rendering screen
at me.iiblake.testmod.items.ItemBallisticsGel.getTooltipStrings(ItemBallisticsGel.java:30)
at me.iiblake.testmod.items.ItemBase.addInformation(ItemBase.java:17)
at net.minecraft.item.ItemStack.getTooltip(ItemStack.java:641)
at net.minecraft.client.gui.GuiScreen.renderToolTip(GuiScreen.java:124)
at net.minecraft.client.gui.inventory.GuiContainerCreative.renderToolTip(GuiContainerCreative.java:769)
at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:186)
at net.minecraft.client.renderer.InventoryEffectRenderer.drawScreen(InventoryEffectRenderer.java:44)
at net.minecraft.client.gui.inventory.GuiContainerCreative.drawScreen(GuiContainerCreative.java:673)
at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1137)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1068)
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(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: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 me.iiblake.testmod.items.ItemBallisticsGel.getTooltipStrings(ItemBallisticsGel.java:30)
at me.iiblake.testmod.items.ItemBase.addInformation(ItemBase.java:17)
at net.minecraft.item.ItemStack.getTooltip(ItemStack.java:641)
at net.minecraft.client.gui.GuiScreen.renderToolTip(GuiScreen.java:124)
at net.minecraft.client.gui.inventory.GuiContainerCreative.renderToolTip(GuiContainerCreative.java:769)
at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:186)
at net.minecraft.client.renderer.InventoryEffectRenderer.drawScreen(InventoryEffectRenderer.java:44)
at net.minecraft.client.gui.inventory.GuiContainerCreative.drawScreen(GuiContainerCreative.java:673)
-- Screen render details --
Details:
Screen name: net.minecraft.client.gui.inventory.GuiContainerCreative
Mouse location: Scaled: (283, 138). Absolute: (567, 202)
Screen size: Scaled: (427, 240). Absolute: (854, 480). Scale factor of 2
-- Affected level --
Details:
Level name: MpServer
All players: 1 total; [EntityClientPlayerMP['Player406'/133, l='MpServer', x=1128.26, y=11.73, z=-82.05]]
Chunk stats: MultiplayerChunkCache: 81, 81
Level seed: 0
Level generator: ID 01 - flat, ver 0. Features enabled: false
Level generator options:
Level spawn location: World: (1140,4,280), Chunk: (at 4,0,8 in 71,17; contains blocks 1136,0,272 to 1151,255,287), Region: (2,0; contains chunks 64,0 to 95,31, blocks 1024,0,0 to 1535,255,511)
Level time: 131385 game time, 147096 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: 7 total; [EntityItem['item.item.arrow'/137, l='MpServer', x=1145.91, y=4.13, z=-113.56], EntityItem['item.item.rottenFlesh'/136, l='MpServer', x=1140.53, y=4.13, z=-78.91], EntitySpider['Spider'/139, l='MpServer', x=1167.41, y=4.00, z=-32.78], EntityItem['item.item.bone'/138, l='MpServer', x=1145.69, y=4.13, z=-112.91], EntityItem['item.item.rottenFlesh'/135, l='MpServer', x=1137.63, y=4.13, z=-105.00], EntityClientPlayerMP['Player406'/133, l='MpServer', x=1128.26, y=11.73, z=-82.05], EntityItem['item.item.rottenFlesh'/134, l='MpServer', x=1131.00, y=4.13, z=-107.81]]
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:2567)
at net.minecraft.client.Minecraft.run(Minecraft.java:983)
at net.minecraft.client.main.Main.main(Main.java:164)
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:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
at GradleStart.main(Unknown Source)
Sorry if this is a basic mistake, I'm not sure what is making the error
-
hello, I was recently playing a 1.6.4 modpack and saw ICBM has recipes in the lore when holding J (http://prntscr.com/cdkvwq). Is there any way I can do this in my mod? Getting the recipe for an itemStack, I already know how to do the lore based on keys held. I had a look in the CraftingManager class but found nothing that could help. Thanks for any help!
-
Thank you! That fixed my problem completely!
-
Hi, i have been having a problem with building my mod. when i run gradle build, it fails saying
error: multi-catch statement is not supported in -source 1.6 } catch (NumberFormatException | ArrayIndexOutOfBoundsException ex) { ^ (use -source 7 or higher to enable multi-catch statement)
Is there any way I can change gradle to build with java 1.7? I have looked it up a few times but nothing seemed to work... Thanks in advance.
-
Got this sorted out! Thanks for helping!
-
hello, I am trying to make a block that makes a hollow cube around it from one location to another. I know how to set blocks and all, but i have no idea how I could get a hollow cube. Any help is appreciated! Thanks in advance!
-
I got this fixed, thanks for all the help! Turns out it was because i was setting the tabs in preInit(or not?), but once i moved the tab setting into Init it worked fine. Thanks for the help again!
-
Hello, I'm relatively new to modding but not java, and i was trying to add new items and blocks. Everything is working so far, except the creativetab part. I can get my items with /give, but they are just not showing in my creative tab. I am creating the creativetab like so:
modTab = new ModTab("testmod", wrench);
, and my ModTabs constructor is:
public ModTab(String label, Item i) { super(label); tabIcon = i; }
.
I register my items with a method called 'register', and inside that it registers them to gameregistry and sets the creativetab:
private void register(Item item){ GameRegistry.registerItem(item, item.getUnlocalizedName()); item.setCreativeTab(modTab); }
. I also have one for blocks, the same but with registerBlock. Any help would be appreciated!
P.S. Sorry for formatting issues, new to forum
Show recipe items in a string when holding a certain button (item tooltip)
in Modder Support
Posted
Got it fixed, air returns as null in the array so calling item.getItemName() was crashing it.