Jump to content
  • Home
  • Files
  • Docs
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • Container in Item
Currently Supported: 1.16.X (Latest) and 1.15.X (LTS)
Sign in to follow this  
Followers 1
frankiecav

Container in Item

By frankiecav, August 5, 2020 in Modder Support

  • Reply to this topic
  • Start new topic
  • Prev
  • 1
  • 2
  • 3
  • Next
  • Page 2 of 3  

Recommended Posts

frankiecav    3

frankiecav

frankiecav    3

  • Tree Puncher
  • frankiecav
  • Members
  • 3
  • 36 posts
Posted August 6, 2020

Crash report when I try to get the item out of the creative inventory:

 

---- Minecraft Crash Report ----
// Shall we play a game?

Time: 8/6/20 11:51 AM
Description: mouseClicked event handler

java.lang.IllegalArgumentException: Invalid null NBT value with key Parent
	at net.minecraft.nbt.CompoundNBT.put(CompoundNBT.java:107) ~[forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading}
	at net.minecraftforge.common.capabilities.CapabilityDispatcher.serializeNBT(CapabilityDispatcher.java:127) ~[forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading}
	at net.minecraftforge.common.capabilities.CapabilityProvider.serializeCaps(CapabilityProvider.java:86) ~[forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading}
	at net.minecraft.item.ItemStack.copy(ItemStack.java:375) ~[forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading}
	at net.minecraft.client.gui.screen.inventory.CreativeScreen.handleMouseClick(CreativeScreen.java:191) ~[forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.gui.screen.inventory.ContainerScreen.mouseClicked(ContainerScreen.java:341) ~[forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.gui.screen.inventory.CreativeScreen.mouseClicked(CreativeScreen.java:443) ~[forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.MouseHelper.lambda$mouseButtonCallback$0(MouseHelper.java:87) ~[forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.gui.screen.Screen.wrapScreenError(Screen.java:446) ~[forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.MouseHelper.mouseButtonCallback(MouseHelper.java:85) ~[forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.MouseHelper.lambda$null$4(MouseHelper.java:173) ~[forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.util.concurrent.ThreadTaskExecutor.execute(ThreadTaskExecutor.java:86) ~[forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.client.MouseHelper.lambda$registerCallbacks$5(MouseHelper.java:172) ~[forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at org.lwjgl.glfw.GLFWMouseButtonCallbackI.callback(GLFWMouseButtonCallbackI.java:36) ~[lwjgl-glfw-3.2.2.jar:build 10] {}
	at org.lwjgl.system.JNI.invokeV(Native Method) ~[lwjgl-3.2.2.jar:build 10] {}
	at org.lwjgl.glfw.GLFW.glfwPollEvents(GLFW.java:3101) ~[lwjgl-glfw-3.2.2.jar:build 10] {}
	at com.mojang.blaze3d.systems.RenderSystem.flipFrame(RenderSystem.java:85) ~[forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.MainWindow.flipFrame(MainWindow.java:296) ~[forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:983) ~[forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.run(Minecraft.java:558) ~[forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.main.Main.main(Main.java:177) ~[forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_231] {}
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_231] {}
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_231] {}
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_231] {}
	at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55) ~[forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-5.1.0.jar:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-5.1.0.jar:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-5.1.0.jar:?] {}
	at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) [modlauncher-5.1.0.jar:?] {}
	at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) [modlauncher-5.1.0.jar:?] {}
	at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:102) [forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {}


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

-- Head --
Thread: Render thread
Stacktrace:
	at net.minecraft.nbt.CompoundNBT.put(CompoundNBT.java:107)
	at net.minecraftforge.common.capabilities.CapabilityDispatcher.serializeNBT(CapabilityDispatcher.java:127)
	at net.minecraftforge.common.capabilities.CapabilityProvider.serializeCaps(CapabilityProvider.java:86)
	at net.minecraft.item.ItemStack.copy(ItemStack.java:375)
	at net.minecraft.client.gui.screen.inventory.CreativeScreen.handleMouseClick(CreativeScreen.java:191)
	at net.minecraft.client.gui.screen.inventory.ContainerScreen.mouseClicked(ContainerScreen.java:341)
	at net.minecraft.client.gui.screen.inventory.CreativeScreen.mouseClicked(CreativeScreen.java:443)
	at net.minecraft.client.MouseHelper.lambda$mouseButtonCallback$0(MouseHelper.java:87)

-- Affected screen --
Details:
	Screen name: net.minecraft.client.gui.screen.inventory.CreativeScreen
Stacktrace:
	at net.minecraft.client.gui.screen.Screen.wrapScreenError(Screen.java:446)
	at net.minecraft.client.MouseHelper.mouseButtonCallback(MouseHelper.java:85)
	at net.minecraft.client.MouseHelper.lambda$null$4(MouseHelper.java:173)
	at net.minecraft.util.concurrent.ThreadTaskExecutor.execute(ThreadTaskExecutor.java:86)
	at net.minecraft.client.MouseHelper.lambda$registerCallbacks$5(MouseHelper.java:172)
	at org.lwjgl.glfw.GLFWMouseButtonCallbackI.callback(GLFWMouseButtonCallbackI.java:36)
	at org.lwjgl.system.JNI.invokeV(Native Method)
	at org.lwjgl.glfw.GLFW.glfwPollEvents(GLFW.java:3101)
	at com.mojang.blaze3d.systems.RenderSystem.flipFrame(RenderSystem.java:85)

-- Affected level --
Details:
	All players: 1 total; [ClientPlayerEntity['Dev'/200, l='MpServer', x=355.60, y=64.00, z=426.98]]
	Chunk stats: Client Chunk Cache: 625, 361
	Level dimension: DimensionType{survivalessentials:essential}
	Level name: MpServer
	Level seed: -1620586829441060295
	Level generator: ID 00 - default, ver 1. Features enabled: false
	Level generator options: {}
	Level spawn location: World: (176,68,-224), Chunk: (at 0,4,0 in 11,-14; contains blocks 176,0,-224 to 191,255,-209), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1)
	Level time: 56265 game time, 26277 day time
	Known server brands: 
	Level was modded: false
	Level storage version: 0x00000 - Unknown?
	Level weather: Rain time: 0 (now: true), thunder time: 0 (now: false)
	Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: false
	Server brand: forge
	Server type: Integrated singleplayer server
Stacktrace:
	at net.minecraft.client.world.ClientWorld.fillCrashReport(ClientWorld.java:457)
	at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:1839)
	at net.minecraft.client.Minecraft.run(Minecraft.java:572)
	at net.minecraft.client.main.Main.main(Main.java:177)
	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.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55)
	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37)
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54)
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72)
	at cpw.mods.modlauncher.Launcher.run(Launcher.java:81)
	at cpw.mods.modlauncher.Launcher.main(Launcher.java:65)
	at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:102)

-- System Details --
Details:
	Minecraft Version: 1.15.2
	Minecraft Version ID: 1.15.2
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 1.8.0_231, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 1102739320 bytes (1051 MB) / 1928331264 bytes (1839 MB) up to 3791650816 bytes (3616 MB)
	CPUs: 4
	JVM Flags: 1 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump
	ModLauncher: 5.1.0+69+master.79f13f7
	ModLauncher launch target: fmluserdevclient
	ModLauncher naming: mcp
	ModLauncher services: 
		/eventbus-2.2.0-service.jar eventbus PLUGINSERVICE 
		/forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-launcher.jar object_holder_definalize PLUGINSERVICE 
		/forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-launcher.jar runtime_enum_extender PLUGINSERVICE 
		/accesstransformers-2.1.1-shadowed.jar accesstransformer PLUGINSERVICE 
		/forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-launcher.jar capability_inject_definalize PLUGINSERVICE 
		/forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-launcher.jar runtimedistcleaner PLUGINSERVICE 
		/forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-launcher.jar fml TRANSFORMATIONSERVICE 
	FML: 31.2
	Forge: net.minecraftforge:31.2.0
	FML Language Providers: 
		javafml@31.2
		minecraft@1
	Mod List: 
		client-extra.jar Minecraft {minecraft@1.15.2 DONE}
		main Survival Essentials {survivalessentials@1.1.1 DONE}
		forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-recomp.jar Forge {forge@31.2.0 DONE}
	Launched Version: MOD_DEV
	Backend library: LWJGL version 3.2.2 build 10
	Backend API: Intel(R) HD Graphics 620 GL version 4.4.0 - Build 21.20.16.4542, Intel
	GL Caps: Using framebuffer using OpenGL 3.0
	Using VBOs: Yes
	Is Modded: Definitely; Client brand changed to 'forge'
	Type: Client (map_client.txt)
	Resource Packs: 
	Current Language: English (US)
	CPU: 4x Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz

 

  • Quote

Share this post


Link to post
Share on other sites

Draco18s    2401

Draco18s

Draco18s    2401

  • Reality Controller
  • Draco18s
  • Members
  • 2401
  • 15920 posts
Posted August 6, 2020
4 minutes ago, frankiecav said:

cap = new SheathCapability();

Sigh...

  • Quote

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Share this post


Link to post
Share on other sites

frankiecav    3

frankiecav

frankiecav    3

  • Tree Puncher
  • frankiecav
  • Members
  • 3
  • 36 posts
Posted August 6, 2020

lol, regardless that's A problem, not THE problem. THE problem is getting IItemHandler into that slot...

  • Quote

Share this post


Link to post
Share on other sites

frankiecav    3

frankiecav

frankiecav    3

  • Tree Puncher
  • frankiecav
  • Members
  • 3
  • 36 posts
Posted August 6, 2020

Ok  I didn't make an instance of it and I made the ItemStackHandler field in the capability class public.

this.addSlot(new SlotItemHandler(cap.inventory, 0, 50, 50));

I'm lazy. It crashes the game when I click on it and try to put it in my inventory.

---- Minecraft Crash Report ----
// Don't do that.

Time: 8/6/20 1:21 PM
Description: mouseClicked event handler

java.lang.IllegalArgumentException: Invalid null NBT value with key Parent
	at net.minecraft.nbt.CompoundNBT.put(CompoundNBT.java:107) ~[forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading}
	at net.minecraftforge.common.capabilities.CapabilityDispatcher.serializeNBT(CapabilityDispatcher.java:127) ~[forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading}
	at net.minecraftforge.common.capabilities.CapabilityProvider.serializeCaps(CapabilityProvider.java:86) ~[forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading}
	at net.minecraft.item.ItemStack.copy(ItemStack.java:375) ~[forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading}
	at net.minecraft.client.gui.screen.inventory.CreativeScreen.handleMouseClick(CreativeScreen.java:191) ~[forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.gui.screen.inventory.ContainerScreen.mouseClicked(ContainerScreen.java:341) ~[forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.gui.screen.inventory.CreativeScreen.mouseClicked(CreativeScreen.java:443) ~[forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.MouseHelper.lambda$mouseButtonCallback$0(MouseHelper.java:87) ~[forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.gui.screen.Screen.wrapScreenError(Screen.java:446) ~[forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.MouseHelper.mouseButtonCallback(MouseHelper.java:85) ~[forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.MouseHelper.lambda$null$4(MouseHelper.java:173) ~[forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.util.concurrent.ThreadTaskExecutor.execute(ThreadTaskExecutor.java:86) ~[forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.client.MouseHelper.lambda$registerCallbacks$5(MouseHelper.java:172) ~[forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at org.lwjgl.glfw.GLFWMouseButtonCallbackI.callback(GLFWMouseButtonCallbackI.java:36) ~[lwjgl-glfw-3.2.2.jar:build 10] {}
	at org.lwjgl.system.JNI.invokeV(Native Method) ~[lwjgl-3.2.2.jar:build 10] {}
	at org.lwjgl.glfw.GLFW.glfwPollEvents(GLFW.java:3101) ~[lwjgl-glfw-3.2.2.jar:build 10] {}
	at com.mojang.blaze3d.systems.RenderSystem.flipFrame(RenderSystem.java:85) ~[forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.MainWindow.flipFrame(MainWindow.java:296) ~[forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:983) ~[forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.run(Minecraft.java:558) ~[forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.main.Main.main(Main.java:177) ~[forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_231] {}
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_231] {}
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_231] {}
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_231] {}
	at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55) ~[forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-5.1.0.jar:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-5.1.0.jar:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-5.1.0.jar:?] {}
	at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) [modlauncher-5.1.0.jar:?] {}
	at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) [modlauncher-5.1.0.jar:?] {}
	at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:102) [forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-recomp.jar:?] {}


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

-- Head --
Thread: Render thread
Stacktrace:
	at net.minecraft.nbt.CompoundNBT.put(CompoundNBT.java:107)
	at net.minecraftforge.common.capabilities.CapabilityDispatcher.serializeNBT(CapabilityDispatcher.java:127)
	at net.minecraftforge.common.capabilities.CapabilityProvider.serializeCaps(CapabilityProvider.java:86)
	at net.minecraft.item.ItemStack.copy(ItemStack.java:375)
	at net.minecraft.client.gui.screen.inventory.CreativeScreen.handleMouseClick(CreativeScreen.java:191)
	at net.minecraft.client.gui.screen.inventory.ContainerScreen.mouseClicked(ContainerScreen.java:341)
	at net.minecraft.client.gui.screen.inventory.CreativeScreen.mouseClicked(CreativeScreen.java:443)
	at net.minecraft.client.MouseHelper.lambda$mouseButtonCallback$0(MouseHelper.java:87)

-- Affected screen --
Details:
	Screen name: net.minecraft.client.gui.screen.inventory.CreativeScreen
Stacktrace:
	at net.minecraft.client.gui.screen.Screen.wrapScreenError(Screen.java:446)
	at net.minecraft.client.MouseHelper.mouseButtonCallback(MouseHelper.java:85)
	at net.minecraft.client.MouseHelper.lambda$null$4(MouseHelper.java:173)
	at net.minecraft.util.concurrent.ThreadTaskExecutor.execute(ThreadTaskExecutor.java:86)
	at net.minecraft.client.MouseHelper.lambda$registerCallbacks$5(MouseHelper.java:172)
	at org.lwjgl.glfw.GLFWMouseButtonCallbackI.callback(GLFWMouseButtonCallbackI.java:36)
	at org.lwjgl.system.JNI.invokeV(Native Method)
	at org.lwjgl.glfw.GLFW.glfwPollEvents(GLFW.java:3101)
	at com.mojang.blaze3d.systems.RenderSystem.flipFrame(RenderSystem.java:85)

-- Affected level --
Details:
	All players: 1 total; [ClientPlayerEntity['Dev'/273, l='MpServer', x=-492.61, y=63.00, z=-603.96]]
	Chunk stats: Client Chunk Cache: 625, 361
	Level dimension: DimensionType{survivalessentials:cookie}
	Level name: MpServer
	Level seed: 5302932262801901022
	Level generator: ID 00 - default, ver 1. Features enabled: false
	Level generator options: {}
	Level spawn location: World: (240,63,-48), Chunk: (at 0,3,0 in 15,-3; contains blocks 240,0,-48 to 255,255,-33), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1)
	Level time: 9480 game time, 9480 day time
	Known server brands: 
	Level was modded: false
	Level storage version: 0x00000 - Unknown?
	Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
	Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: false
	Server brand: forge
	Server type: Integrated singleplayer server
Stacktrace:
	at net.minecraft.client.world.ClientWorld.fillCrashReport(ClientWorld.java:457)
	at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:1839)
	at net.minecraft.client.Minecraft.run(Minecraft.java:572)
	at net.minecraft.client.main.Main.main(Main.java:177)
	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.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55)
	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37)
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54)
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72)
	at cpw.mods.modlauncher.Launcher.run(Launcher.java:81)
	at cpw.mods.modlauncher.Launcher.main(Launcher.java:65)
	at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:102)

-- System Details --
Details:
	Minecraft Version: 1.15.2
	Minecraft Version ID: 1.15.2
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 1.8.0_231, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 1200263296 bytes (1144 MB) / 1830813696 bytes (1746 MB) up to 3791650816 bytes (3616 MB)
	CPUs: 4
	JVM Flags: 1 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump
	ModLauncher: 5.1.0+69+master.79f13f7
	ModLauncher launch target: fmluserdevclient
	ModLauncher naming: mcp
	ModLauncher services: 
		/eventbus-2.2.0-service.jar eventbus PLUGINSERVICE 
		/forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-launcher.jar object_holder_definalize PLUGINSERVICE 
		/forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-launcher.jar runtime_enum_extender PLUGINSERVICE 
		/accesstransformers-2.1.1-shadowed.jar accesstransformer PLUGINSERVICE 
		/forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-launcher.jar capability_inject_definalize PLUGINSERVICE 
		/forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-launcher.jar runtimedistcleaner PLUGINSERVICE 
		/forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-launcher.jar fml TRANSFORMATIONSERVICE 
	FML: 31.2
	Forge: net.minecraftforge:31.2.0
	FML Language Providers: 
		javafml@31.2
		minecraft@1
	Mod List: 
		client-extra.jar Minecraft {minecraft@1.15.2 DONE}
		main Survival Essentials {survivalessentials@1.1.1 DONE}
		forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-recomp.jar Forge {forge@31.2.0 DONE}
	Launched Version: MOD_DEV
	Backend library: LWJGL version 3.2.2 build 10
	Backend API: Intel(R) HD Graphics 620 GL version 4.4.0 - Build 21.20.16.4542, Intel
	GL Caps: Using framebuffer using OpenGL 3.0
	Using VBOs: Yes
	Is Modded: Definitely; Client brand changed to 'forge'
	Type: Client (map_client.txt)
	Resource Packs: 
	Current Language: English (US)
	CPU: 4x Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz

 

Error is probably here:

 

@Override
	public INBT serializeNBT() {
		
		return null;
	}

	@Override
	public void deserializeNBT(INBT nbt) {
	}

 

Not sure what goes here...

  • Quote

Share this post


Link to post
Share on other sites

FrostDracony    1

FrostDracony

FrostDracony    1

  • Tree Puncher
  • FrostDracony
  • Members
  • 1
  • 19 posts
Posted August 6, 2020

So, or you do what you want because you know 100% how Forge works, or you try the solutions that the advanced people recommend you. Have you at least tried? If not, you should. The two ErrorLogs look very similar, so at least try listening to the others. 
 

If you don't understand what I'm talking about:
 

1 hour ago, Draco18s said:

Sigh...

Once again, have you really tried?

  • Quote

Share this post


Link to post
Share on other sites

FrostDracony    1

FrostDracony

FrostDracony    1

  • Tree Puncher
  • FrostDracony
  • Members
  • 1
  • 19 posts
Posted August 6, 2020

Sigh…

  • Quote

Share this post


Link to post
Share on other sites

CAS_ual_TY    18

CAS_ual_TY

CAS_ual_TY    18

  • Stone Miner
  • CAS_ual_TY
  • Members
  • 18
  • 72 posts
Posted August 6, 2020

1/2:

https://github.com/CAS-ual-TY/YgoDuelingMod/blob/8888405bdde4992838441b472d33f920c03b63b0/src/main/java/de/cas_ual_ty/ydm/YDM.java#L197

2/2 (the three DeckBox*** classes):

https://github.com/CAS-ual-TY/YgoDuelingMod/tree/8888405bdde4992838441b472d33f920c03b63b0/src/main/java/de/cas_ual_ty/ydm/deckbox

 

This is how I implemented a deck box that can hold up to 90 card items. The only thing you will have to do different is to consider your slots to be the x/y size of 18; I used the size 16 for my slots because otherwise there would not be enough space (in container and screen class).

  • Quote

https://github.com/CAS-ual-TY/Visibilis

[1.14] How to Villagers, Trades, Professions, Fix Trades

https://minecraft.curseforge.com/projects/gun-customization-infinity / https://github.com/CAS-ual-TY/GunCus

https://minecraft.curseforge.com/projects/ygo-dueling-mod

https://minecraft.curseforge.com/projects/mundus-magicus

https://minecraft.curseforge.com/projects/deuf-duplicate-entity-uuid-fix

Share this post


Link to post
Share on other sites

frankiecav    3

frankiecav

frankiecav    3

  • Tree Puncher
  • frankiecav
  • Members
  • 3
  • 36 posts
Posted August 6, 2020

CAS thanks for the example; I fixed the NBT crash. Still trying to go with the capability which Draco and Ben have helped me with... by the way, Frost, I have been trying... and it's not all solutions I'm being thrown (except casual), but hints so that I figure it out on my own which I respect. If I wanted to just copy someone's code completely, there are enough githubs online to do so.

 

Anyway, I'm really close. Just need to get a reference to my capability class without creating an instance of it, as Draco pointed out...

  • Like 1
  • Quote

Share this post


Link to post
Share on other sites

frankiecav    3

frankiecav

frankiecav    3

  • Tree Puncher
  • frankiecav
  • Members
  • 3
  • 36 posts
Posted August 6, 2020

Does anyone know if there's a markDirty method for items? That's what I would put in onSlotChanged if this was a tileentity.

public ContainerSheath(final int windowID, PlayerInventory player) {
		this(windowID, player, new SheathCapability());
	}
	
	public ContainerSheath(final int windowID, PlayerInventory player, SheathCapability cap) {
		super(EssentialContainers.SHEATH, windowID);
		ItemStackHandler inv = cap.getInventory();
		
		for(int y = 0; y < 3; ++y)
			for(int x = 0; x < 9; ++x)
				this.addSlot(new Slot(player, 9 + x + y * 9, 8 + x * 18, 84 + y * 18));
		
		for(int x = 0; x < 9; ++x)
			this.addSlot(new Slot(player, x, 8 + x * 18, 142));
		this.addSlot(new SlotItemHandler(inv, 0, 50, 50)	{
			@Override
			public void onSlotChanged() {
				
			}
		});
	}

 

  • Quote

Share this post


Link to post
Share on other sites

frankiecav    3

frankiecav

frankiecav    3

  • Tree Puncher
  • frankiecav
  • Members
  • 3
  • 36 posts
Posted August 6, 2020

Actually forget that... here's what I think has to be fixed:

 

@Override
	public ActionResultType onItemUseFirst(ItemStack stack, ItemUseContext context) {
		PlayerEntity player = context.getPlayer();
		if(!context.getWorld().isRemote && player instanceof ServerPlayerEntity) {
			SheathCapability icap = new SheathCapability();
			NetworkHooks.openGui((ServerPlayerEntity) player, new InterfaceSheath(icap));
		}
		return ActionResultType.SUCCESS;
	}

The Capability needs to be passed into InterfaceSheath, and I make a new instance of it every time onItemUse is called. Is there a way to get the SheathCapability class from ItemStack or ItemUseContext?

  • Quote

Share this post


Link to post
Share on other sites

diesieben07    7586

diesieben07

diesieben07    7586

  • Reality Controller
  • diesieben07
  • Forum Team
  • 7586
  • 54922 posts
Posted August 6, 2020

You call getCapability on the ItemStack.

  • Quote

Share this post


Link to post
Share on other sites

frankiecav    3

frankiecav

frankiecav    3

  • Tree Puncher
  • frankiecav
  • Members
  • 3
  • 36 posts
Posted August 6, 2020

Yes, but then how do I get it to return ICapabilityProvider or SheathCapability?

public class ItemSheath extends Item {

	
	
	public ItemSheath() {
		super(new Properties().group(SurvivalEssentials.ESSENTIAL_TAB).maxStackSize(1));
		setRegistryName("sheath");
		
	}
	
	

	@Override
	public ActionResultType onItemUseFirst(ItemStack stack, ItemUseContext context) {
		PlayerEntity player = context.getPlayer();
		if(!context.getWorld().isRemote && player instanceof ServerPlayerEntity) {
			ICapabilityProvider icap = stack.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null);
			if (icap instanceof SheathCapability) {
				
				NetworkHooks.openGui((ServerPlayerEntity) player, new InterfaceSheath((SheathCapability) icap));
			}
			
		}
		return ActionResultType.SUCCESS;
	}

	
	
	@Override
	public ICapabilityProvider initCapabilities(ItemStack stack, CompoundNBT nbt) {
		
		
		return new SheathCapability();
	}
	
	
	

	
	
	
	
	
	
	public static class InterfaceSheath implements INamedContainerProvider {
		
		private final SheathCapability sheath;
		
		public InterfaceSheath(SheathCapability sheath) {
			this.sheath = sheath;
		}
		
		@Override
		public ITextComponent getDisplayName() {
			return NarratorChatListener.EMPTY;
		}

		@Override
		public Container createMenu(int windowID, PlayerInventory playerInventory, PlayerEntity playerIn) {
			return new ContainerSheath(windowID, playerInventory, sheath);
		}
	}




	
	
	
}

"Cannot convert LazyOptional<IItemHandler> to ICapabilityProvider"

  • Quote

Share this post


Link to post
Share on other sites

diesieben07    7586

diesieben07

diesieben07    7586

  • Reality Controller
  • diesieben07
  • Forum Team
  • 7586
  • 54922 posts
Posted August 6, 2020

Correct, the ICapabilityProvider is the ItemStack.

And yes, getCapability returns a LazyOptional.

  • Quote

Share this post


Link to post
Share on other sites

loordgek    174

loordgek

loordgek    174

  • World Shaper
  • loordgek
  • Members
  • 174
  • 1796 posts
Posted August 6, 2020 (edited)
IItemHandler handler = ???

is that so hard ?

oops my bad

 

 

Edited August 6, 2020 by loordgek
  • Quote

Share this post


Link to post
Share on other sites

diesieben07    7586

diesieben07

diesieben07    7586

  • Reality Controller
  • diesieben07
  • Forum Team
  • 7586
  • 54922 posts
Posted August 6, 2020
3 minutes ago, loordgek said:

is that so hard ?

No, so don't give them copy-paste ready code. It doesn't help anyone.

  • Like 1
  • Quote

Share this post


Link to post
Share on other sites

frankiecav    3

frankiecav

frankiecav    3

  • Tree Puncher
  • frankiecav
  • Members
  • 3
  • 36 posts
Posted August 6, 2020 (edited)

I don't see how that helps, I'm trying to pass in an ICapabilityProvider not an IItemHandler. I have ItemStackHandler in the Capability class. Unless I'm totally missing something (definitely possible). I really appreciate everyone's patience.

 

 

 

Wait... can I just say:

 

ICapabilityProvider icap = stack;
			if (icap instanceof SheathCapability) {
				
				NetworkHooks.openGui((ServerPlayerEntity) player, new InterfaceSheath((SheathCapability) icap));
			}

??

Apparently not, because it didn't work!

Edited August 6, 2020 by frankiecav
im dumb
  • Quote

Share this post


Link to post
Share on other sites

diesieben07    7586

diesieben07

diesieben07    7586

  • Reality Controller
  • diesieben07
  • Forum Team
  • 7586
  • 54922 posts
Posted August 6, 2020

This makes no sense.

You cannot get the original capability provider, it only exists to provide the capabilities.

  • Quote

Share this post


Link to post
Share on other sites

loordgek    174

loordgek

loordgek    174

  • World Shaper
  • loordgek
  • Members
  • 174
  • 1796 posts
Posted August 6, 2020
stack.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null)

that returns a LazyOptional<IItemHandler> or if the itemstack has no IItemHandler capability it returns LazyOptiona.empty (< bad wording i hope you get it)

 

your container needs to take a IItemHandler instead of SheathCapability

 

 

 

 

  • Quote

Share this post


Link to post
Share on other sites

frankiecav    3

frankiecav

frankiecav    3

  • Tree Puncher
  • frankiecav
  • Members
  • 3
  • 36 posts
Posted August 6, 2020

Ok. I thought that since in initCapabilities I returned SheathCapability, stack would contain SheathCapability.

  • Quote

Share this post


Link to post
Share on other sites

frankiecav    3

frankiecav

frankiecav    3

  • Tree Puncher
  • frankiecav
  • Members
  • 3
  • 36 posts
Posted August 6, 2020

Ok loordgek I'll try it. So you're saying that if the itemstack doesn't have the capability it will return null. I set the capability. This makes sense!

  • Quote

Share this post


Link to post
Share on other sites

loordgek    174

loordgek

loordgek    174

  • World Shaper
  • loordgek
  • Members
  • 174
  • 1796 posts
Posted August 6, 2020

not null it returns a empty LazyOptional

  • Quote

Share this post


Link to post
Share on other sites

frankiecav    3

frankiecav

frankiecav    3

  • Tree Puncher
  • frankiecav
  • Members
  • 3
  • 36 posts
Posted August 6, 2020 (edited)

But how do I invoke IItemHandler here:

 

public ContainerSheath(final int windowID, PlayerInventory player) {
		this(windowID, player);
	}
	
	public ContainerSheath(final int windowID, PlayerInventory player, IItemHandler cap) {
		super(EssentialContainers.SHEATH, windowID);
		
		
		for(int y = 0; y < 3; ++y)
			for(int x = 0; x < 9; ++x)
				this.addSlot(new Slot(player, 9 + x + y * 9, 8 + x * 18, 84 + y * 18));
		
		for(int x = 0; x < 9; ++x)
			this.addSlot(new Slot(player, x, 8 + x * 18, 142));
		this.addSlot(new SlotItemHandler(cap, 0, 50, 50));
	}

 in the top constructor?

 

Edit: I put in ItemStackHandler

Edited August 6, 2020 by frankiecav
  • Quote

Share this post


Link to post
Share on other sites

loordgek    174

loordgek

loordgek    174

  • World Shaper
  • loordgek
  • Members
  • 174
  • 1796 posts
Posted August 6, 2020

SheathCapability is a CapabilityProvider it Providers the IItemHandler

  • Quote

Share this post


Link to post
Share on other sites

frankiecav    3

frankiecav

frankiecav    3

  • Tree Puncher
  • frankiecav
  • Members
  • 3
  • 36 posts
Posted August 6, 2020

This works:

 

public ContainerSheath(final int windowID, PlayerInventory player) {
		this(windowID, player, new ItemStackHandler());
	}
	
	public ContainerSheath(final int windowID, PlayerInventory player, IItemHandler cap) {
		super(EssentialContainers.SHEATH, windowID);
		
		
		for(int y = 0; y < 3; ++y)
			for(int x = 0; x < 9; ++x)
				this.addSlot(new Slot(player, 9 + x + y * 9, 8 + x * 18, 84 + y * 18));
		
		for(int x = 0; x < 9; ++x)
			this.addSlot(new Slot(player, x, 8 + x * 18, 142));
		this.addSlot(new SlotItemHandler(cap, 0, 50, 50));
	}

Is there a downside to using that?

  • Quote

Share this post


Link to post
Share on other sites

loordgek    174

loordgek

loordgek    174

  • World Shaper
  • loordgek
  • Members
  • 174
  • 1796 posts
Posted August 6, 2020
public ContainerSheath(final int windowID, PlayerInventory player) {
		this(windowID, player, new ItemStackHandler());
	}

that will wont do anything

 

  • Quote

Share this post


Link to post
Share on other sites
  • Prev
  • 1
  • 2
  • 3
  • Next
  • Page 2 of 3  

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

    • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 1
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • metword
      [1.16.4] Config file will not update.

      By metword · Posted 13 minutes ago

      Sorry, after reading the Minecraft Forge code I am still confused at how to link these two...
    • ChampionAsh5357
      [1.15] replacing chunks

      By ChampionAsh5357 · Posted 19 minutes ago

      Something that cannot be mentioned on the forums as coremodding isn't supported here.
    • AurenX
      [1.16.4] Generation Help

      By AurenX · Posted 35 minutes ago

      Started to update my mod to 1.16.4 and i hit a roadblock. I started my mod in 1.12 and lost my computer so my work halted, But what i had working was overriding the nether generation and putting overworld generation on top essentially replacing the bedrock layer with layers that would have hills, lava lakes, lava rivers, trees, etc...; added biomes so there would some variation. At that time i had to create a world provider and chunk generator and replace the nether world provider. Obviously this has changed to the new json format What i have working is the dimension json and the dimension type json (tested with a new dimension and then overriding the default nether), can add biomes to it. My question is with this new json system it appears the chunk generator is called from the json nether being (multi_noise). Am i going down the wrong path here or what are the proper steps. What is recommended here?      
    • gibbyj
      Help using Minecraft Forge on Manjaro Linux

      By gibbyj · Posted 50 minutes ago

      For the record, we made decent progress.  Learned how to activate logging and read the log file in .minecraft folder.  Found that I had mis-configured execution options (heap 64M when 32M was the max allowable).  Fixed that and latest versions of Forge started working.  May be able to get the older ones working too, by using an Oracle 1.8 jvm.   But my son is having fun with forge and some recent mods.
    • JeffMan
      [1.15] replacing chunks

      By JeffMan · Posted 1 hour ago

      What library is it using?
  • Topics

    • metword
      11
      [1.16.4] Config file will not update.

      By metword
      Started Wednesday at 04:20 PM

    • JeffMan
      3
      [1.15] replacing chunks

      By JeffMan
      Started 6 hours ago

    • AurenX
      0
      [1.16.4] Generation Help

      By AurenX
      Started 35 minutes ago

    • gibbyj
      3
      Help using Minecraft Forge on Manjaro Linux

      By gibbyj
      Started 4 hours ago

    • Linky132
      1
      [1.16.5 ] Dust Block Texture Glitch

      By Linky132
      Started 5 hours ago

  • Who's Online (See full list)

    • metword
    • litehed
    • JeffMan
    • chuckdie5el
    • thorstenschwager
    • ChampionAsh5357
    • AurenX
    • Draco18s
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • Container in Item
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community