
kenbeannet
Members-
Posts
30 -
Joined
-
Last visited
Everything posted by kenbeannet
-
[1.7.2][UNSOLVED] Container - Basic Issue
kenbeannet replied to kenbeannet's topic in Modder Support
Still unable to come up with a solution. Ive literally commented everything down the the bones. *sigh* -
[1.7.2][UNSOLVED] Container - Basic Issue
kenbeannet replied to kenbeannet's topic in Modder Support
Still trying for a solution. Something must be throwing it off, and I really think its NOT with the container. It has to do with networking (Offset Packets). Maybe I am writing a Int and only reading a short (I did check though). Maybe I am not registering the GUI correctly? Not returning the correct information somewhere? I dunno. -
[1.7.2][UNSOLVED] Container - Basic Issue
kenbeannet replied to kenbeannet's topic in Modder Support
My slots are correct, I have taken it directly from the ChestContainer.java file, and just altered the starting X and Y. They match fine in the image I am using. -
[1.7.2][UNSOLVED] Container - Basic Issue
kenbeannet replied to kenbeannet's topic in Modder Support
Maybe your processing the Slots on the Gui Image displayed? Not sure if this is the root of my problem though. Just by changing the cordinates shouldn't really change where the items appear. The key is, when I open the inventory the real way (e), my items are moved to the new place where they appear in the custom made container. So the items are defiantly moving. I am thinking that something I do when the player logs in, is throwing off the Inventory and in turn messing with the custom container. I mean, if we think about it, this is a very BASIC thing. And its becoming such a major issue. -
[1.7.2][UNSOLVED] Container - Basic Issue
kenbeannet replied to kenbeannet's topic in Modder Support
Cool, Let me first say thank you for at least investigating. I spent hour and hours on this stupid bug. I am starting to think its packet related somehow. I just made the changes you suggested. I am still having the issue. I put items in Slots 0, 1, 2 (Hotbar). When I open the container, they appear in slot 33,34,35 (last slots in inventory). It appears to be moving them backwards somehow. Yet, When I click slot 0, the item disappears but does not appear in my hand. If I click slot 33, 34, or 35, nothing happens. Any thoughts? new code protected void bindPlayerInventory(IInventory playerInventory, IInventory chestInventory) { for (int j = 0; j < 2; ++j) { for (int k = 0; k < 3; ++k) { this.addSlotToContainer(new Slot(chestInventory, k + j * 3, 8 + k * 18, 18 + j * 18)); } } for (int j = 0; j < 3; ++j) { for (int k = 0; k < 9; ++k) { this.addSlotToContainer(new Slot(playerInventory, k + j * 9 + 9, 133 + k * 18, 122 + j * 18)); } } for (int j = 0; j < 9; ++j) { this.addSlotToContainer(new Slot(playerInventory, j, 133 + j * 18, 179)); } } -
[1.7.2][UNSOLVED] Container - Basic Issue
kenbeannet replied to kenbeannet's topic in Modder Support
Bump. Still looking for any advice on where to look. -
[1.7.2][UNSOLVED] Container - Basic Issue
kenbeannet replied to kenbeannet's topic in Modder Support
Of course. But its before that. Its not even displaying to the user correctly before any action is taken. NBT only has an effect on the TileEntity. Which I am not using at all. Just the player inventory is messed up. -
You didn't add public void registerPackets() { registerPacket(SendChatAll.class); } Do that, issue fixed.
-
You dont need 2 switches. Your client gui does not match your server gui. Server Gui = Containers. Client Guis = Guis. You need to change your server Gui to switch(Id), and put 2 cases, 1 for your first gui. 2 for your second.
-
[1.7.2][UNSOLVED] Container - Basic Issue
kenbeannet replied to kenbeannet's topic in Modder Support
Updated first post. Still unfixed. -
[1.7.2][UNSOLVED] Container - Basic Issue
kenbeannet replied to kenbeannet's topic in Modder Support
Bump. Still unable to fix this. :'( -
Of course. This way you have access to the blocks/items for the recipe.
-
Change your code new PacketParticle(player, 80); to UsefullStuff.packetPipeline.sendTo(new PacketParticle(player, 80), player) Fixed.
-
[1.7.2][UNSOLVED] Container - Basic Issue
kenbeannet replied to kenbeannet's topic in Modder Support
Still having issue. My code can be gotten on https://github.com/KenBeanNet/SimCraft/tree/master/java/mods/simcraft. To recap, The container is not function correctly. When I open the container, items are in the wrong positions. Its like the code for displaying from the inventory is incorrect, but its copied and pasted from the original minecraft code. Any help, I appreciate. -
[1.7.2][UNSOLVED] Container - Basic Issue
kenbeannet replied to kenbeannet's topic in Modder Support
Eh. Just put something in the main bar slot 0. Open the container. The item is now no longer in slot 0, its in slot like 33 (last row in your inventory, 3rd from the right side). Somehow it gets the wrong number and throws it off completely. Then you close your inventory, log out and in, and its back in the correct spot. Its only like changing it on the clientside, not server. -
[1.7.2][UNSOLVED] Container - Basic Issue
kenbeannet replied to kenbeannet's topic in Modder Support
Figured out that addSlotToContainer(new Slot(chestInventory, j + i * 3, 187 + i * 18, 63 + j * 18)); needs to be i *2 since I have only 2 rows. So that solved the Array Index crash. But my inventory items are still offset somehow. -
[1.7.2][UNSOLVED] Container - Basic Issue
kenbeannet replied to kenbeannet's topic in Modder Support
Line 33 in MarketTile is return chestContents[var1]; -
[1.7.2][UNSOLVED] Container - Basic Issue
kenbeannet replied to kenbeannet's topic in Modder Support
Sorry Lars, I understand the concept of why (When speaking General Java knowledge). What I don't understand is why Minecraft is asking for Slot 7. I only add 6 slots to the MarketTileEntity. The bug is why its asking for the 7th slot. -
[1.7.2][UNSOLVED] Container - Basic Issue
kenbeannet replied to kenbeannet's topic in Modder Support
Goto, While I agree that your findings are correct, that did not solve my issue. There is still some bug existing that when I put items on my hot bar (Slots 0 and 1) then open the container, they appear in the bottom right of my inventory (Slots like 25 and 26). Then if I open my inventory again, I get a duplicate item. My GUI only has 6 slots, and my Container code only has 6 slots. Yet, if I put 6 as my size, I get out of array index. Which I think is leading me to the source of the problem, but still unsure. -
Having an issue with my MarketContainer. When I open the GUI items are shifted 3 to the left. If I have something in Hot bar slot 0, and I open the GUI. The item is in my inventory, 3rd row, Slot 7. Way off. If I open my real inventory (e), its now moved from my hotbar. I have no idea whats going on, tried IRC, no luck. Code Git is below. https://github.com/KenBeanNet/SimCraft/tree/master/java/mods/simcraft
-
Found out the issue was I was drawing a new button every drawscreen. Which caused lag. Should create buttons in InitGui then display them if you want in the drawscreen.
-
Well, My guess is that when you press the button in debug mode, it runs slower and assumes your hitting the button more than you are? I guess when modding, we should put protection in so it doesn't run the code like 50x times.
-
Sorry, Its called after in a GUI on button actions. button.id == 0 ( Print hello ).
-
All my mod is EntityPlayer.addChatMessage("This sucks"); and when its called by the server, its running like 10x times in Eclipse. Compile the mod and run it normally, it only says it once. Its not really a problem, just annoying.
-
Anyone know why when your in Eclipse, and you do things like sending messages, the server sends like 50 to the client. Yet, when you run in final mode, it doesn't do it? Eh?