
ThePizzaBoy-
Members-
Posts
18 -
Joined
-
Last visited
Everything posted by ThePizzaBoy-
-
[1.7.10] Buttons not being drawn SOLVED
ThePizzaBoy- replied to ThePizzaBoy-'s topic in Modder Support
Okay duly noted, but that was not the problem it turns out my calculation for guiLeft and guiTop did not give a nice number and son the buttons were being drawn off screen. I do appreciate however your quick replies and wisdom Thank you -
[1.7.10] Buttons not being drawn SOLVED
ThePizzaBoy- replied to ThePizzaBoy-'s topic in Modder Support
If you won't have Container on server, you can (should) send custom packet. Thanks for all your help but I have one last problem. for some reason my buttons won't get drawn anymore. I updated the github (link in op) the class in question is (GuiWarning) I add them to the button list in #initGui and the super of #drawScrenn is called but the button is still not drawn If you have any insight that would be extremely helpful -
[1.7.10] Buttons not being drawn SOLVED
ThePizzaBoy- replied to ThePizzaBoy-'s topic in Modder Support
After using fontRendererObj.drawString(...) you need to re-set texture to widgets (or icons, whatever their name) with mc.getTextureManager().bindTexture(...). Oh thank you so much. Also if you can answer one more question it would prove helpful. So you said there is no need for GuiContainer, but what would you give the GuiHandler as a Server Element? EDIT: I figured it out -
[1.7.10] Buttons not being drawn SOLVED
ThePizzaBoy- replied to ThePizzaBoy-'s topic in Modder Support
I realized this before hand but it did not draw the texture correctly at all. All I got was my text being rendered, the buttons but in the background was a bunch of weird symbols almost as if it was drawing the minecraft hieroglyphs -
[1.7.10] Buttons not being drawn SOLVED
ThePizzaBoy- replied to ThePizzaBoy-'s topic in Modder Support
Actually it did not work I pushed the latest changes to my GitHub -
For some reason it will not draw my GUI (GuiWarning) (200x100) in full it kind of just cuts off. I did it the exact same way as the other GUI in my mod (GuiSkills). The only difference is that it also draws two buttons. If someone could help me that would be greatly appreciated. Now for some reason my buttons I added to the buttonList in #initGui do not get drawn Again the problem is in the GuiWarning class Here is the source code: https://github.com/gapizzacalla/RPGSkills/blob/master/src/main/java/rpgs
-
[1.7.10] Trouble with registering a packet
ThePizzaBoy- replied to ThePizzaBoy-'s topic in Modder Support
thanks just more carelessness on my part -
[1.7.10] Trouble with registering a packet
ThePizzaBoy- replied to ThePizzaBoy-'s topic in Modder Support
Sorry this is the one: http://pastebin.com/AHbTjJdw -
For some reason I get an instantiation exception when I try to register my "PlayerPropertiesPacket". I do not understand what is going on. Any guidance is well appreciated. Thank you! Crash report: http://pastebin.com/AHbTjJdw Source Code: https://github.com/gapizzacalla/RPGSkills
-
Thank you for shedding light. It works perfectly now. Would you say that markDirty is deprecated now? if not what uses does it have? Basically why not always use markBlock for update?
-
I am trying to make it so that when you look at the block it displays what is inside it as I am providing no direct GUI to see it. The point is not to have a GUI. You place items by right clicking which works fine. The problem I am having is that it only renders what is inside after saving and re entering the world. Not while I am in the world changing the contents You can view all my source code at: https://github.com/gapizzacalla/InteractiveCraftingTable-1.7 The classes you want to pay attention to are EventsHandler, BlockICT, ContainerICT, and TileEntityICT (although there is not much in the tile entity besides read and write NBT methods) If anyone can help it would be much appreciated thank you.
-
Oh alright gotcha . By the way thank you for all your advice it is EXTREMELY helpful. PS. DUDE you will not believe what my problem was. right after I put in the @Override on the writeToNBT method I got an error, that error occurred because I name the method writetoNBT not writeToNBT, so when I called the super.writeToNBT it didn't recognize the method writetoNBT so I changed it and now it works perfectly. Thanks again!
-
It seems as though the read/write methods do not get called at all. I added break points at the beginning of each method and nothing happened, I even put system out print lines in multiple parts of each method and returned no results. I am now going to look at syncing and see what that entails. But I do appreciate the help, thank you.
-
All right thanks I'll try that and get back to you on that. Thanks again for the advice
-
I did that is there anything else that could be the issue?
-
Hello, Basically I have made a furnace and it works 99.9% the only thing that does not work and is probably the biggest thing is the read/write from/to NBT methods. I have reviewed countless tutorial and whenever they did it, it seemed to work, but when I do it, it does not work. I looked at the minecraft furnace code in the TileEntityFurnace class and noticed no differences between that code and mine. Please tell me what I have done wrong and hint me towards a solution so that I can actually learn from this. Thank you in advance! /** Reads a tile entity from NBT. */ public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); NBTTagList nbttaglist = nbt.getTagList("CFItems"); this.cfslots = new ItemStack[this.getSizeInventory()]; for (int i = 0; i < nbttaglist.tagCount(); ++i) { NBTTagCompound nbttagcompound = (NBTTagCompound)nbttaglist.tagAt(i); byte b0 = nbttagcompound.getByte("CFSlot"); if (b0 >= 0 && b0 < this.cfslots.length) { this.cfslots[b0] = ItemStack.loadItemStackFromNBT(nbttagcompound); } } this.cfBurnTime = nbt.getShort("CFBurnTime"); this.cfCookTime = nbt.getShort("CFCookTime"); this.cfCurrentItemBurnTime = getItemBurnTime(this.cfslots[1]); if (nbt.hasKey("CFCustomName")) { this.localizedName = nbt.getString("CFCustomName"); } } /** Writes a tile entity from NBT. */ public void writetoNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); nbt.setShort("CFBurnTime", (short)this.cfBurnTime); nbt.setShort("CFCookTime", (short)this.cfCookTime); NBTTagList nbttaglist = new NBTTagList(); for (int i = 0; i < this.cfslots.length; ++i) { if (this.cfslots[i] != null) { NBTTagCompound nbttagcompound = new NBTTagCompound(); nbttagcompound.setByte("CFSlot", (byte)i); this.cfslots[i].writeToNBT(nbttagcompound); nbttaglist.appendTag(nbttagcompound); } } nbt.setTag("CFItems", nbttaglist); if (this.isInvNameLocalized()) { nbt.setString("CFCustomName", this.localizedName); } }