Jump to content

[1.8]Crafting table GUI help


frenchtoaster10

Recommended Posts

im trying to create a custom block with the default gui for crafting but every time i open it it flashes closed. is there any way i can open the GUI or fix my problem.

 

 

this is the code i used:

 

parPlayer.displayGui(new BlockWorkbench.InterfaceCraftingTable(parPlayer.worldObj, new BlockPos((int)parPlayer.posX, (int)parPlayer.posY, (int)parPlayer.posZ)));

Link to comment
Share on other sites

That's the instance of your main mod class (the class with the

@Mod

) annotation. If you have a static field in the mod class of the same type, you can add the

@Instance

annotation to it and FML will fill it with your mod's instance.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

Post your main mod class, your

IGuiHandler

class and the class where you call

player.openGUI

on Gist (use the .java file extension so syntax highlighting works) and link them here.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

now i just get this error:

 

 

---- Minecraft Crash Report ----

// You're mean.

 

Time: 8/27/15 10:02 PM

Description: Unexpected error

 

java.lang.NullPointerException: Unexpected error

at net.minecraftforge.fml.common.network.NetworkRegistry.getLocalGuiContainer(NetworkRegistry.java:266)

at net.minecraftforge.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:97)

at net.minecraft.entity.player.EntityPlayer.openGui(EntityPlayer.java:2577)

at frenchtoaster.test.blocks.foodcraftingtable1.onBlockActivated(foodcraftingtable1.java:37)

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

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

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

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.minecraftforge.fml.common.network.NetworkRegistry.getLocalGuiContainer(NetworkRegistry.java:266)

at net.minecraftforge.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:97)

at net.minecraft.entity.player.EntityPlayer.openGui(EntityPlayer.java:2577)

at frenchtoaster.test.blocks.foodcraftingtable1.onBlockActivated(foodcraftingtable1.java:37)

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

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

 

-- Affected level --

Details:

Level name: MpServer

All players: 1 total; [EntityPlayerSP['Player406'/33, l='MpServer', x=-1449.43, y=77.00, z=-626.31]]

Chunk stats: MultiplayerChunkCache: 260, 260

Level seed: 0

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

Level generator options:

Level spawn location: -272.00,64.00,47.00 - World: (-272,64,47), Chunk: (at 0,4,15 in -17,2; contains blocks -272,0,32 to -257,255,47), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)

Level time: 115868 game time, 115868 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: 69 total; [EntitySheep['Sheep'/129, l='MpServer', x=-1472.41, y=74.00, z=-565.44], EntitySheep['Sheep'/130, l='MpServer', x=-1473.59, y=74.00, z=-572.88], EntityChicken['Chicken'/131, l='MpServer', x=-1480.31, y=75.00, z=-572.41], EntitySquid['Squid'/138, l='MpServer', x=-1392.59, y=56.72, z=-565.68], EntityPig['Pig'/143, l='MpServer', x=-1464.47, y=75.00, z=-694.19], EntityBat['Bat'/145, l='MpServer', x=-1376.52, y=30.15, z=-697.49], EntityBat['Bat'/146, l='MpServer', x=-1384.18, y=32.06, z=-695.31], EntitySheep['Sheep'/149, l='MpServer', x=-1415.96, y=77.03, z=-688.53], EntitySheep['Sheep'/150, l='MpServer', x=-1406.37, y=74.00, z=-693.91], EntityBat['Bat'/154, l='MpServer', x=-1510.25, y=26.10, z=-582.25], EntityChicken['Chicken'/155, l='MpServer', x=-1508.44, y=81.00, z=-591.53], EntitySheep['Sheep'/156, l='MpServer', x=-1498.50, y=81.00, z=-683.19], EntityBat['Bat'/34, l='MpServer', x=-1412.91, y=20.10, z=-629.56], EntityBat['Bat'/35, l='MpServer', x=-1409.59, y=19.03, z=-631.88], EntityChicken['Chicken'/36, l='MpServer', x=-1444.31, y=76.00, z=-593.44], EntityChicken['Chicken'/37, l='MpServer', x=-1474.66, y=81.00, z=-618.06], EntityPig['Pig'/38, l='MpServer', x=-1431.59, y=78.00, z=-669.41], EntitySheep['Sheep'/39, l='MpServer', x=-1424.53, y=77.00, z=-665.41], EntityItem['item.tile.sapling.oak'/40, l='MpServer', x=-1415.12, y=69.00, z=-612.12], EntitySheep['Sheep'/41, l='MpServer', x=-1411.53, y=69.00, z=-623.50], EntitySheep['Sheep'/169, l='MpServer', x=-1384.97, y=75.00, z=-645.75], EntitySheep['Sheep'/42, l='MpServer', x=-1426.00, y=64.00, z=-598.88], EntitySheep['Sheep'/170, l='MpServer', x=-1389.47, y=77.57, z=-647.65], EntityChicken['Chicken'/43, l='MpServer', x=-1472.53, y=77.00, z=-600.31], EntityItem['item.item.egg'/44, l='MpServer', x=-1474.53, y=76.00, z=-596.88], EntityChicken['Chicken'/45, l='MpServer', x=-1474.44, y=76.00, z=-594.06], EntityChicken['Chicken'/46, l='MpServer', x=-1402.31, y=71.00, z=-624.41], EntityChicken['Chicken'/47, l='MpServer', x=-1460.44, y=74.00, z=-581.69], EntitySheep['Sheep'/48, l='MpServer', x=-1465.47, y=75.00, z=-592.94], EntityChicken['Chicken'/176, l='MpServer', x=-1504.06, y=81.00, z=-642.78], EntityItem['item.item.egg'/49, l='MpServer', x=-1460.66, y=74.00, z=-582.38], EntityItem['item.item.egg'/177, l='MpServer', x=-1505.72, y=81.12, z=-644.22], EntityItem['item.item.egg'/50, l='MpServer', x=-1502.06, y=81.00, z=-620.44], EntitySheep['Sheep'/178, l='MpServer', x=-1407.59, y=84.00, z=-676.47], EntityChicken['Chicken'/51, l='MpServer', x=-1489.66, y=82.00, z=-611.56], EntityChicken['Chicken'/52, l='MpServer', x=-1497.38, y=82.00, z=-617.53], EntityBat['Bat'/53, l='MpServer', x=-1458.41, y=33.10, z=-684.25], EntityPig['Pig'/54, l='MpServer', x=-1458.16, y=74.00, z=-686.63], EntityItem['item.item.egg'/55, l='MpServer', x=-1393.88, y=78.00, z=-643.65], EntityBat['Bat'/183, l='MpServer', x=-1503.65, y=23.82, z=-577.48], EntitySheep['Sheep'/56, l='MpServer', x=-1435.50, y=75.00, z=-590.56], EntitySheep['Sheep'/184, l='MpServer', x=-1489.34, y=77.00, z=-587.16], EntitySheep['Sheep'/57, l='MpServer', x=-1473.78, y=76.00, z=-589.50], EntitySheep['Sheep'/58, l='MpServer', x=-1486.25, y=76.00, z=-592.00], EntityItem['item.item.egg'/59, l='MpServer', x=-1478.72, y=75.00, z=-584.97], EntitySheep['Sheep'/60, l='MpServer', x=-1481.06, y=76.00, z=-588.09], EntityChicken['Chicken'/61, l='MpServer', x=-1496.22, y=79.00, z=-592.47], EntityItem['item.item.egg'/829, l='MpServer', x=-1495.59, y=78.00, z=-591.25], EntitySheep['Sheep'/62, l='MpServer', x=-1472.03, y=77.00, z=-674.91], EntityPig['Pig'/63, l='MpServer', x=-1484.97, y=79.00, z=-683.97], EntityBat['Bat'/64, l='MpServer', x=-1408.38, y=46.10, z=-679.50], EntityChicken['Chicken'/65, l='MpServer', x=-1394.69, y=62.69, z=-593.03], EntitySheep['Sheep'/66, l='MpServer', x=-1451.31, y=73.00, z=-697.22], EntityItem['item.item.egg'/67, l='MpServer', x=-1388.63, y=75.00, z=-635.41], EntityChicken['Chicken'/68, l='MpServer', x=-1382.81, y=76.00, z=-633.28], EntitySheep['Sheep'/196, l='MpServer', x=-1372.84, y=74.00, z=-618.28], EntityChicken['Chicken'/69, l='MpServer', x=-1468.19, y=75.00, z=-562.40], EntityItem['item.item.egg'/70, l='MpServer', x=-1470.47, y=74.00, z=-575.72], EntitySheep['Sheep'/198, l='MpServer', x=-1427.41, y=85.00, z=-694.06], EntityChicken['Chicken'/71, l='MpServer', x=-1470.16, y=75.00, z=-564.31], EntityChicken['Chicken'/72, l='MpServer', x=-1516.75, y=84.00, z=-615.50], EntityChicken['Chicken'/76, l='MpServer', x=-1507.66, y=76.00, z=-553.53], EntitySheep['Sheep'/77, l='MpServer', x=-1494.63, y=80.00, z=-705.47], EntitySquid['Squid'/99, l='MpServer', x=-1393.51, y=59.00, z=-573.52], EntityPlayerSP['Player406'/33, l='MpServer', x=-1449.43, y=77.00, z=-626.31], EntityChicken['Chicken'/105, l='MpServer', x=-1374.59, y=85.00, z=-661.22], EntityItem['item.item.egg'/115, l='MpServer', x=-1507.00, y=80.11, z=-594.25], EntityChicken['Chicken'/121, l='MpServer', x=-1370.56, y=73.00, z=-606.34], EntitySquid['Squid'/125, l='MpServer', x=-1388.36, y=58.57, z=-589.67]]

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

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)

 

-- System Details --

Details:

Minecraft Version: 1.8

Operating System: Windows 8 (amd64) version 6.2

Java Version: 1.8.0_25, Oracle Corporation

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

Memory: 769397632 bytes (733 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)

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

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

FML: MCP v9.10 FML v8.0.99.99 Minecraft Forge 11.14.3.1450 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{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.8-11.14.3.1450.jar)

UCHIJAAAA Forge{11.14.3.1450} [Minecraft Forge] (forgeSrc-1.8-11.14.3.1450.jar)

UCHIJAAAA tm{1.0} [NinjaToastCraft] (bin)

Loaded coremods (and transformers):

GL info: ' Vendor: 'Intel' Version: '4.0.0 - Build 9.17.10.2828' Renderer: 'Intel® HD Graphics 4000'

Launched Version: 1.8

LWJGL: 2.9.1

OpenGL: Intel® HD Graphics 4000 GL version 4.0.0 - Build 9.17.10.2828, 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)

 

 

 

 

 

heres the code:

 

 

@Instance

public static Object tutmod;

 

 

Sorry if I'm doing something stupid.

Link to comment
Share on other sites

java.lang.NullPointerException: Unexpected error

  at net.minecraftforge.fml.common.network.NetworkRegistry.getLocalGuiContainer(NetworkRegistry.java:266)

 

Ah, you need to register your

IGuiHandler

in the init phase with

NetworkRegistry#registerGuiHandler

.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

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

    • Hello, Hi and I am making a forge 1.12.2 mod and also trying to get a custom model helmet item (I made a joker mask) and exported it to .json format and put it in the ~/namespace/models/item folder. Though, I'm struggling to get the item to render what I want it to be rendered like as I've positioned it in the 'head' window view in blockbench. How did you render out your model? I checked your code and it looks like no references to the actual model are being made. I'm new to this forge modding stuff (was a fabric modder) and I desperately need some help. Is there a way to standardly render out armor models made using blockbench? any methods that one can use? My model in JSON: ```json { "credit": "Made with Blockbench", "texture_size": [160, 160], "textures": { "0": "ydyrn:items/joker_mask_texture", "particle": "ydyrn:items/joker_mask_texture" }, "elements": [ { "from": [0, 0, 0], "to": [16, 16, 1], "faces": { "north": {"uv": [0, 1.7, 16, 14.2], "texture": "#0"}, "east": {"uv": [0, 4, 0.9, 5.6], "texture": "#0"}, "south": {"uv": [0, 5.8, 1.6, 7.4], "texture": "#0"}, "west": {"uv": [0, 1.9, 1.3, 3.5], "texture": "#0"}, "up": {"uv": [0, 3.4, 1.6, 4.2], "texture": "#0"}, "down": {"uv": [0, 9, 1.6, 9.7], "texture": "#0"} } }, { "from": [15.8, 11, 0.5], "to": [16.2, 13, 15], "faces": { "north": {"uv": [7.9, 7.9, 7.94, 8.1], "texture": "#0"}, "east": {"uv": [7.9, 7.9, 9.35, 8.1], "texture": "#0"}, "south": {"uv": [7.9, 7.9, 7.94, 8.1], "texture": "#0"}, "west": {"uv": [7.9, 7.9, 9.35, 8.1], "texture": "#0"}, "up": {"uv": [7.9, 7.9, 7.94, 9.35], "texture": "#0"}, "down": {"uv": [7.9, 7.9, 7.94, 9.35], "texture": "#0"} } }, { "from": [0.2, 11, 14.6], "to": [15.8, 13, 15], "faces": { "north": {"uv": [7.9, 7.9, 9.46, 8.1], "texture": "#0"}, "east": {"uv": [7.9, 7.9, 7.94, 8.1], "texture": "#0"}, "south": {"uv": [7.9, 7.9, 9.46, 8.1], "texture": "#0"}, "west": {"uv": [7.9, 7.9, 7.94, 8.1], "texture": "#0"}, "up": {"uv": [7.9, 7.9, 9.46, 7.94], "texture": "#0"}, "down": {"uv": [7.9, 7.9, 9.46, 7.94], "texture": "#0"} } }, { "from": [-0.2, 11, 0.5], "to": [0.2, 13, 15], "faces": { "north": {"uv": [7.9, 7.9, 7.94, 8.1], "texture": "#0"}, "east": {"uv": [7.9, 7.9, 9.35, 8.1], "texture": "#0"}, "south": {"uv": [7.9, 7.9, 7.94, 8.1], "texture": "#0"}, "west": {"uv": [7.9, 7.9, 9.35, 8.1], "texture": "#0"}, "up": {"uv": [7.9, 7.9, 7.94, 9.35], "texture": "#0"}, "down": {"uv": [7.9, 7.9, 7.94, 9.35], "texture": "#0"} } } ], "display": { "thirdperson_righthand": { "translation": [-0.25, -2.75, 0], "scale": [0.3, 0.3, 0.3] }, "thirdperson_lefthand": { "translation": [-0.25, -2.75, 0], "scale": [0.3, 0.3, 0.3] }, "firstperson_righthand": { "rotation": [-9, 115, 15], "translation": [0, 1.25, -1.75], "scale": [0.5, 0.5, 0.5] }, "firstperson_lefthand": { "rotation": [-9, 115, 15], "translation": [0, 1.25, -1.75], "scale": [0.5, 0.5, 0.5] }, "ground": { "rotation": [40, 0, 0], "translation": [0, -2.5, 0], "scale": [0.5, 0.5, 0.5] }, "gui": { "rotation": [0, 180, 0] }, "head": { "translation": [0, 0, 0.25], "scale": [0.82773, 0.73594, 0.9] }, "fixed": { "translation": [0, 0, 8.75] } }, "groups": [ 0, { "name": "straps", "origin": [0, 0, 0], "color": 0, "children": [1, 2, 3] } ] } ```
    • Add the crash-report or latest.log (logs-folder) with sites like https://paste.ee/ and paste the link to it here  
    • In your config folder, delete the sophisticatedcore-common.toml file and test it again
    • Add the crash-report or latest.log (logs-folder) with sites like https://paste.ee/ and paste the link to it here  
    • I am getting an error message that my mods and my server are not on the same minecraft version when they clearly are. My server and my mods are on 1.20.1 and the error says that the server is 1.20 even though it's on forge 47.2.30.  
  • Topics

×
×
  • Create New...

Important Information

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