Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

I am trying to send a message to the server to teleport the player. But when I add this code to the GUI it crashes.

 

BookMessageToServer bookMessageToServer = new BookMessageToServer();

CommonProxy.simpleNetworkWrapper.sendToServer(bookMessageToServer);

 

It looks like it's crashing inside the GUI. Is the client getting mixed up in server code? I am not sure what is going on here.

 

---- Minecraft Crash Report ----
// You're mean.

Time: 12/6/17 10:56 PM
Description: Updating screen events

java.lang.NullPointerException: Updating screen events
	at com.frostdragon7.mystrecrafted.client.gui.BookGUI.actionPerformed(BookGUI.java:212)
	at net.minecraft.client.gui.GuiScreen.mouseClicked(GuiScreen.java:494)
	at com.frostdragon7.mystrecrafted.client.gui.BookGUI.mouseClicked(BookGUI.java:244)
	at net.minecraft.client.gui.GuiScreen.handleMouseInput(GuiScreen.java:611)
	at net.minecraft.client.gui.GuiScreen.handleInput(GuiScreen.java:576)
	at net.minecraft.client.Minecraft.runTick(Minecraft.java:1884)
	at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1186)
	at net.minecraft.client.Minecraft.run(Minecraft.java:441)
	at net.minecraft.client.main.Main.main(Main.java:118)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
	at GradleStart.main(GradleStart.java:26)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Client thread
Stacktrace:
	at com.frostdragon7.mystrecrafted.client.gui.BookGUI.actionPerformed(BookGUI.java:212)
	at net.minecraft.client.gui.GuiScreen.mouseClicked(GuiScreen.java:494)
	at com.frostdragon7.mystrecrafted.client.gui.BookGUI.mouseClicked(BookGUI.java:244)
	at net.minecraft.client.gui.GuiScreen.handleMouseInput(GuiScreen.java:611)
	at net.minecraft.client.gui.GuiScreen.handleInput(GuiScreen.java:576)

-- Affected screen --
Details:
	Screen name: ~~ERROR~~ NullPointerException: null

-- Affected level --
Details:
	Level name: MpServer
	All players: 1 total; [EntityPlayerSP['Player754'/281, l='MpServer', x=-16.59, y=72.00, z=228.01]]
	Chunk stats: MultiplayerChunkCache: 601, 601
	Level seed: 0
	Level generator: ID 00 - default, ver 1. Features enabled: false
	Level generator options: 
	Level spawn location: World: (-64,64,256), Chunk: (at 0,4,0 in -4,16; contains blocks -64,0,256 to -49,255,271), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
	Level time: 84618 game time, 10407 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: 103 total; [EntityPlayerSP['Player754'/281, l='MpServer', x=-16.59, y=72.00, z=228.01], EntityRabbit['Rabbit'/73, l='MpServer', x=-90.72, y=68.00, z=200.90], EntityRabbit['Rabbit'/74, l='MpServer', x=-87.53, y=67.00, z=194.33], EntityCreeper['Creeper'/75, l='MpServer', x=-80.50, y=28.00, z=255.50], EntityCow['Cow'/76, l='MpServer', x=-93.48, y=68.00, z=270.73], EntityCreeper['Creeper'/80, l='MpServer', x=-65.22, y=15.00, z=183.58], EntityCow['Cow'/81, l='MpServer', x=-68.80, y=71.00, z=245.52], EntitySkeleton['Skeleton'/82, l='MpServer', x=-75.50, y=27.00, z=268.50], EntityCow['Cow'/83, l='MpServer', x=-58.85, y=71.00, z=250.66], EntityCow['Cow'/84, l='MpServer', x=-62.78, y=68.00, z=277.50], EntitySheep['Sheep'/85, l='MpServer', x=-76.73, y=69.00, z=278.49], EntityCow['Cow'/86, l='MpServer', x=-77.17, y=69.00, z=294.19], EntityRabbit['Rabbit'/90, l='MpServer', x=-53.53, y=68.00, z=155.69], EntityZombie['Zombie'/91, l='MpServer', x=-52.23, y=42.00, z=181.41], EntityCreeper['Creeper'/92, l='MpServer', x=-50.48, y=27.00, z=206.22], EntityCreeper['Creeper'/93, l='MpServer', x=-53.30, y=16.00, z=198.49], EntityCow['Cow'/94, l='MpServer', x=-51.47, y=66.00, z=267.81], EntityZombie['Zombie'/95, l='MpServer', x=-62.20, y=24.00, z=291.49], EntityBat['Bat'/106, l='MpServer', x=-52.31, y=26.99, z=182.34], EntityBat['Bat'/107, l='MpServer', x=-32.45, y=17.06, z=161.28], EntityCreeper['Creeper'/108, l='MpServer', x=-50.16, y=18.00, z=198.50], EntityCow['Cow'/109, l='MpServer', x=-35.22, y=69.00, z=199.49], EntityPig['Pig'/110, l='MpServer', x=-34.64, y=71.00, z=222.29], EntitySkeleton['Skeleton'/111, l='MpServer', x=-39.04, y=13.00, z=252.63], EntityBat['Bat'/112, l='MpServer', x=-34.25, y=15.10, z=250.39], EntitySkeleton['Skeleton'/113, l='MpServer', x=-46.27, y=26.00, z=241.50], EntitySkeleton['Skeleton'/114, l='MpServer', x=-36.66, y=19.00, z=254.11], EntityPig['Pig'/115, l='MpServer', x=-33.51, y=68.00, z=244.67], EntityZombie['Zombie'/116, l='MpServer', x=-36.97, y=13.00, z=258.05], EntityZombie['Zombie'/117, l='MpServer', x=-36.55, y=13.00, z=256.60], EntityBat['Bat'/118, l='MpServer', x=-35.25, y=16.10, z=256.72], EntityBat['Bat'/119, l='MpServer', x=-35.25, y=16.10, z=256.36], EntitySkeleton['Skeleton'/120, l='MpServer', x=-32.50, y=19.00, z=263.24], EntityCow['Cow'/121, l='MpServer', x=-35.58, y=68.00, z=281.79], EntityCow['Cow'/122, l='MpServer', x=-24.53, y=66.00, z=274.85], EntityRabbit['Rabbit'/127, l='MpServer', x=-30.33, y=64.00, z=184.49], EntityPig['Pig'/128, l='MpServer', x=-21.40, y=71.00, z=212.24], EntityZombie['Zombie'/129, l='MpServer', x=-17.31, y=24.00, z=208.93], EntityCreeper['Creeper'/130, l='MpServer', x=-29.50, y=18.00, z=225.17], EntitySkeleton['Skeleton'/131, l='MpServer', x=-18.50, y=27.00, z=229.27], EntitySpider['Spider'/132, l='MpServer', x=-28.30, y=19.00, z=226.98], EntitySkeleton['Skeleton'/133, l='MpServer', x=-25.50, y=19.00, z=225.50], EntitySkeleton['Skeleton'/134, l='MpServer', x=-29.50, y=19.00, z=226.27], EntityCow['Cow'/135, l='MpServer', x=-18.55, y=71.00, z=236.43], EntitySkeleton['Skeleton'/136, l='MpServer', x=-28.50, y=26.00, z=241.74], EntitySkeleton['Skeleton'/137, l='MpServer', x=-31.55, y=27.00, z=242.73], EntityCow['Cow'/138, l='MpServer', x=-24.50, y=68.00, z=263.80], EntityCow['Cow'/139, l='MpServer', x=-26.45, y=69.00, z=259.08], EntityCow['Cow'/140, l='MpServer', x=-21.15, y=65.00, z=291.51], EntityRabbit['Rabbit'/143, l='MpServer', x=-5.14, y=65.00, z=171.64], EntitySkeleton['Skeleton'/144, l='MpServer', x=-13.30, y=36.00, z=195.49], EntityCow['Cow'/145, l='MpServer', x=1.23, y=72.00, z=204.46], EntityRabbit['Rabbit'/146, l='MpServer', x=1.54, y=71.00, z=227.50], EntityZombie['Zombie'/147, l='MpServer', x=-4.26, y=29.00, z=271.53], EntityCreeper['Creeper'/148, l='MpServer', x=-8.50, y=33.00, z=266.50], EntityZombie['Zombie'/149, l='MpServer', x=-1.46, y=33.00, z=271.75], EntityCow['Cow'/150, l='MpServer', x=-20.19, y=66.00, z=263.47], EntityCow['Cow'/151, l='MpServer', x=-10.54, y=64.00, z=262.17], EntitySheep['Sheep'/153, l='MpServer', x=-6.28, y=64.00, z=305.45], EntityCreeper['Creeper'/156, l='MpServer', x=2.83, y=47.00, z=159.50], EntityCreeper['Creeper'/157, l='MpServer', x=12.46, y=25.00, z=164.83], EntityCreeper['Creeper'/158, l='MpServer', x=8.50, y=32.00, z=172.50], EntityCreeper['Creeper'/159, l='MpServer', x=14.19, y=32.00, z=165.50], EntityCreeper['Creeper'/160, l='MpServer', x=9.50, y=32.00, z=175.50], EntityCreeper['Creeper'/161, l='MpServer', x=15.48, y=23.00, z=184.20], EntitySkeleton['Skeleton'/162, l='MpServer', x=15.50, y=47.00, z=191.33], EntityCreeper['Creeper'/163, l='MpServer', x=10.51, y=47.00, z=188.77], EntityZombie['Zombie'/164, l='MpServer', x=10.45, y=47.00, z=187.22], EntityZombieVillager['Zombie Villager'/165, l='MpServer', x=8.78, y=32.00, z=182.17], EntitySkeleton['Skeleton'/166, l='MpServer', x=9.50, y=32.00, z=191.29], EntitySkeleton['Skeleton'/167, l='MpServer', x=9.50, y=32.00, z=184.50], EntityZombie['Zombie'/168, l='MpServer', x=9.65, y=19.00, z=200.22], EntityZombie['Zombie'/169, l='MpServer', x=4.83, y=20.00, z=197.70], EntityCreeper['Creeper'/170, l='MpServer', x=4.52, y=20.00, z=194.83], EntityCow['Cow'/171, l='MpServer', x=2.17, y=68.00, z=197.43], EntityPig['Pig'/172, l='MpServer', x=10.50, y=71.00, z=208.75], EntityPig['Pig'/173, l='MpServer', x=5.65, y=64.00, z=240.26], EntitySkeleton['Skeleton'/174, l='MpServer', x=4.47, y=30.00, z=280.27], EntityZombie['Zombie'/175, l='MpServer', x=2.50, y=33.00, z=275.50], EntityRabbit['Rabbit'/176, l='MpServer', x=7.15, y=66.00, z=281.22], EntityCow['Cow'/177, l='MpServer', x=12.78, y=64.00, z=290.43], EntityCreeper['Creeper'/189, l='MpServer', x=16.16, y=32.00, z=180.41], EntitySkeleton['Skeleton'/190, l='MpServer', x=16.50, y=23.00, z=196.50], EntityBat['Bat'/191, l='MpServer', x=21.25, y=39.10, z=205.75], EntityCreeper['Creeper'/192, l='MpServer', x=33.42, y=55.00, z=211.78], EntitySkeleton['Skeleton'/193, l='MpServer', x=29.50, y=52.00, z=215.71], EntityRabbit['Rabbit'/194, l='MpServer', x=17.14, y=70.00, z=210.08], EntityCreeper['Creeper'/195, l='MpServer', x=27.85, y=44.00, z=232.40], EntitySkeleton['Skeleton'/196, l='MpServer', x=22.49, y=46.00, z=250.72], EntityPig['Pig'/197, l='MpServer', x=26.22, y=68.00, z=261.50], EntityPig['Pig'/198, l='MpServer', x=25.42, y=67.00, z=270.22], EntityRabbit['Rabbit'/212, l='MpServer', x=40.47, y=70.00, z=149.89], EntityRabbit['Rabbit'/213, l='MpServer', x=40.54, y=67.00, z=164.82], EntityRabbit['Rabbit'/214, l='MpServer', x=38.93, y=70.00, z=221.10], EntityRabbit['Rabbit'/215, l='MpServer', x=36.77, y=67.00, z=243.50], EntityRabbit['Rabbit'/216, l='MpServer', x=42.18, y=66.00, z=287.13], EntitySheep['Sheep'/217, l='MpServer', x=34.35, y=67.00, z=299.23], EntityRabbit['Rabbit'/227, l='MpServer', x=56.48, y=71.00, z=192.50], EntityRabbit['Rabbit'/229, l='MpServer', x=55.70, y=72.00, z=208.53], EntityRabbit['Rabbit'/230, l='MpServer', x=53.99, y=71.00, z=222.96], EntityRabbit['Rabbit'/231, l='MpServer', x=55.65, y=72.00, z=215.06], EntityRabbit['Rabbit'/232, l='MpServer', x=60.48, y=71.00, z=215.34], EntityPig['Pig'/233, l='MpServer', x=44.67, y=65.00, z=296.48]]
	Retry entities: 0 total; []
	Server brand: fml,forge
	Server type: Integrated singleplayer server
Stacktrace:
	at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:461)
	at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2897)
	at net.minecraft.client.Minecraft.run(Minecraft.java:462)
	at net.minecraft.client.main.Main.main(Main.java:118)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
	at GradleStart.main(GradleStart.java:26)

-- System Details --
Details:
	Minecraft Version: 1.12.2
	Operating System: Mac OS X (x86_64) version 10.13.1
	Java Version: 1.8.0_151, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 644363672 bytes (614 MB) / 1056309248 bytes (1007 MB) up to 1056309248 bytes (1007 MB)
	JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
	IntCache: cache: 0, tcache: 0, allocated: 12, tallocated: 94
	FML: MCP 9.42 Powered by Forge 14.23.1.2559 5 mods loaded, 5 mods active
	States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored

	| State     | ID            | Version      | Source                           | Signature |
	|:--------- |:------------- |:------------ |:-------------------------------- |:--------- |
	| UCHIJAAAA | minecraft     | 1.12.2       | minecraft.jar                    | None      |
	| UCHIJAAAA | mcp           | 9.42         | minecraft.jar                    | None      |
	| UCHIJAAAA | FML           | 8.0.99.99    | forgeSrc-1.12.2-14.23.1.2559.jar | None      |
	| UCHIJAAAA | forge         | 14.23.1.2559 | forgeSrc-1.12.2-14.23.1.2559.jar | None      |
	| UCHIJAAAA | mystrecrafted | 0.0.1        | bin                              | None      |

 

Yeah it looks like you're attempting to use gui/client stuff on the server.

You should post your code to a github repo and link it here for people to take a look. Posting snippets or individual classes usually doesn't provide enough information to pinpoint the issue.

  • Author

Looks like I got it to work, at least in single player, not sure how it’ll do with a dedicated server. Dimensional travel is still broken, I will have to do more research on that.

Edited by Frost Dragon Empire
Grammar

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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.