Posted September 5, 20169 yr @Override public void writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); NBTTagList list = new NBTTagList(); for (int i = 0; i < this.getSizeInventory(); ++i) { if (this.getStackInSlot(i) != null) { NBTTagCompound stackTag = new NBTTagCompound(); stackTag.setByte("Slot", (byte) i); this.getStackInSlot(i).writeToNBT(stackTag); list.appendTag(stackTag); } } nbt.setTag("Items", list); if (this.hasCustomName()) { nbt.setString("CustomName", this.getCustomName()); } } Thats my problem it does not want to have void and i am so confused it might be basic but im confused as hell on the WriteToNBT Method Are You Feeling it now Mr.Krabs? GitHub https://github.com/nuclearelectricity/Nuclear-Electricity
September 5, 20169 yr writeToNBT is no longer a void method, instead, it is now a method using the object NBTTagCompound. This means that you need to return said object. public NBTTagCompound writeToNBT(NBTTagCompound nbt) { //Do stuff with the gained nbt parameter. return nbt; } Also previously known as eAndPi. "Pi, is there a station coming up where we can board your train of thought?" -Kronnn Published Mods: Underworld Handy links: Vic_'s Forge events Own WIP Tutorials.
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.