-
Posts
188 -
Joined
-
Last visited
Everything posted by ModMCdl
-
...likewise
-
[1.11.2][UNSOLVED] Custom Crafting Block Not Crafting
ModMCdl replied to ModMCdl's topic in Modder Support
But now you've left me with a new system to learn, while I had most of if not all of the work done with the older system. I guess, but that's not really what I meant. I meant more of using the old code. Plenty of the experienced modders here like you and others who help can pick through it, because you know the methods and the old ways. It just seems that everywhere I look these are being forced on others because they're new. I don't need my mortar and pestle to work with other machines. I need it to be able to combine two ingredients, and the furnace's code seems the most likely candidate to do that. - Attempting to implement IItemHandler broke the entirety of my code. My TileEntity, the GUI, my Container, and my Block no longer work the way they're supposed to. I understand that this forum hates code chunks, and people writing other's code or working with it, but for some things, especially when they're new, it's incredibly difficult and frustrating. I know modding isn't for beginner programmers, but even for veterans like me, moving from a system of rigid structure to this (arguably) sloppy mess, is very hard. Essentially, yes, I know HOW to do that, but WHY and WHERE do I do that? -
[1.11.2][UNSOLVED] Custom Crafting Block Not Crafting
ModMCdl replied to ModMCdl's topic in Modder Support
Hence why I didn't know I needed it. It was an oversight on my part. Was trying to focus on fixing all of the problems that this "conversion" made for me, and just overlooked that argument. Everything here was working fine except for the crafting, which I think could've been caused by me forgetting to call something somewhere. Considering my code was literally pulled from the furnace block, I feel like most of what I've been told here was more of "use this new fancy way" rather than trying to actually fix the problem at hand with the code I supplied. Old ways of doing things work fine if they're implemented correctly, and since I'm going to be the one working on it, it doesn't matter that it's sloppy. I feel like a lot of people don't get that here. -
[1.11.2][UNSOLVED] Custom Crafting Block Not Crafting
ModMCdl replied to ModMCdl's topic in Modder Support
So, I would return this as "null" since I don't care about the direction. Aha! So while all of these "fixes" have cleaned up all of my errors, they haven't actually solved my issue, and have created more. My GUI no longer shows up, and still nothing can be crafted. -
[1.11.2][UNSOLVED] Custom Crafting Block Not Crafting
ModMCdl replied to ModMCdl's topic in Modder Support
Well I was only asking because my container errors on me calling the two getCapability() here, saying to create the method in my TileEntity, when my TileEntity already overrides that method: ContainerPestle(InventoryPlayer player, TileEntityPestle tileentity) { //CustomSlots this.tileentity = tileentity; this.addSlotToContainer(new SlotItemHandler(tileentity.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY), 0, 32, 25)); this.addSlotToContainer(new SlotItemHandler(tileentity.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY), 1, 67, 44)); this.addSlotToContainer(new SlotPestleOutput(player.player, tileentity, 2, 124, 35)); My TileEnitity: @Override public boolean hasCapability(Capability capability, EnumFacing facing) { if (capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) return true; return super.hasCapability(capability, facing); } @Override public <T> T getCapability(Capability<T> capability, EnumFacing facing) { if (capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) return (T) inventory; return super.getCapability(capability, facing); } -
[1.11.2][UNSOLVED] Custom Crafting Block Not Crafting
ModMCdl replied to ModMCdl's topic in Modder Support
So, I would then have to create this as a method in my individual TileEntity. Alright. Would I still be implementing nothing? Or would I now need to implementICapabilityProvider? -
[1.11.2][UNSOLVED] Custom Crafting Block Not Crafting
ModMCdl replied to ModMCdl's topic in Modder Support
Thank... you? -
[1.11.2][UNSOLVED] Custom Crafting Block Not Crafting
ModMCdl replied to ModMCdl's topic in Modder Support
But I would extend Slot still?(In my custom output slot) And where am I adding the getCapability() method? If I'm not casting anything, how would this work to fix it? -
[1.11.2][UNSOLVED] Custom Crafting Block Not Crafting
ModMCdl replied to ModMCdl's topic in Modder Support
Would I be replacing every instance of Slot? Or would just setting it in SlotPestleOutput.java do that? This sounds like a basic java question to be asking... -
[1.11.2][UNSOLVED] Custom Crafting Block Not Crafting
ModMCdl replied to ModMCdl's topic in Modder Support
Alright, but what do I do about all of my other classes? My Container, GUI, and Block were all built around the original version. Am I casting those toIInventory? And what about my block'scanInteractWith? -
[1.11.2][UNSOLVED] Custom Crafting Block Not Crafting
ModMCdl replied to ModMCdl's topic in Modder Support
Oh, I see. So I'm no longer overriding IInventory, but instead solely using ItemStackHandler. But now what do I do with the canCraft and craftItem methods? You mentioned issues, but wouldn't that completely error them out because they rely on all the methods from IInventory? Would I just replace .get with.getStackInSlot? And creategetInventoryStackLimit as my own method rather than an override? Then I could just cast all of the methods in my other classes to IInventory? -
[1.11.2][UNSOLVED] Custom Crafting Block Not Crafting
ModMCdl replied to ModMCdl's topic in Modder Support
Se essentially replace my NonNullList with that? If I'm not mistaken, that's what would change my inventory instance? Because doing that errors almost every instance of inventory I use... -
[1.11.2][UNSOLVED] Custom Crafting Block Not Crafting
ModMCdl replied to ModMCdl's topic in Modder Support
So I have to re-write my old code with IItemHandler, which doesn't implement the same methods? Damn, that's gonna be a pain. -
[1.11.2][UNSOLVED] Custom Crafting Block Not Crafting
ModMCdl replied to ModMCdl's topic in Modder Support
...so what method would I call upon to do that, if not ITickable. Sorry, I feel stupid. -
[1.11.2][UNSOLVED] Custom Crafting Block Not Crafting
ModMCdl replied to ModMCdl's topic in Modder Support
That's what I thought, but now I'm lost. If you look above, I was informed I needed the update method to check the crafting recipe list each time I wanted to craft something. The only way to do this was through ITickable. Now, you're saying I don't need it, which puts me back to square one. Since you have never failed me before, Draco, (and if you haven't already), take a look at my original post and git and see if you can tell where I'm going wrong? -
[1.11.2][UNSOLVED] Custom Crafting Block Not Crafting
ModMCdl replied to ModMCdl's topic in Modder Support
I did, and I had omitted all of the "tickable" methods, because I didn't think they were needed unless I was doing some form of cooking? Would all I need from the furnace be the isRemote statement regarding the furnaceItemStacks, instead using that with my Pestle Recipes? Most of my code is frankensteined from the furnace, but I really have no idea what to do here. -
[1.11.2][UNSOLVED] Custom Crafting Block Not Crafting
ModMCdl replied to ModMCdl's topic in Modder Support
Yeah I got that. I'm just unsure what to do with it now. (As in what to call to specifically only update the recipes) -
[1.11.2][UNSOLVED] Custom Crafting Block Not Crafting
ModMCdl replied to ModMCdl's topic in Modder Support
Alright, after a lot of experimentation and fails, I can't quite figure out how this update thing works, or more precisely, how to make it work in my case. Could you please give an example?(Not asking for you to do it for me, more of like a brief rundown of how one would do it). -
[1.11.2][UNSOLVED] Custom Crafting Block Not Crafting
ModMCdl replied to ModMCdl's topic in Modder Support
I tried overriding update, but It wouldn't let me. I'll check again, maybe I'm just an idiot. Was typing that when I decided to read the first part and implement ITickable. That's probably my issue here. I thought it wasn't necessary, because I wouldn't be using methods for smelting time and such. Also, are you saying I need to call my TileEntity in my custom crafting class, or call it through ITickable to check for new crafting items. (I know some of these questions are probably really stupid, but I'm just trying to learn here. This is new, and I couldn't find a decent tutorial or coherent example). -
[1.11.2][UNSOLVED] Custom Crafting Block Not Crafting
ModMCdl replied to ModMCdl's topic in Modder Support
The ItemStack is referring to the two input slots in my TileEntity, and I pretty much frankensteined the code from the furnace, which uses the HasBasedTable. The reason I used this instead of the workbench was because I was a bit more familiar with TileEntities, and I could not find an example relating to the workbench that was newer than 1.7.10. (and I hate having to scour the web to find named versions of all the various unnamed funcs and fields). I'll be honest, I'm confused. I can understand most of the reason behind using IItemHandler, but I don't understand where I need to call that TileEntity reference. This is a relatively new thing for me here, so I'm probably asking a stupid question. You reference that I never compare the hashcodes of my two ItemStacks. I'm confused as by how to exactly implement that. Could you possibly provide an example of where and when? -
How to download the libraries required by forge
ModMCdl replied to Sm0keySa1m0n's topic in Support & Bug Reports
The libraries should have been installed when you installed forge? -
So this is a bit tricky. I know I've been spamming up the forums lately, but here's yet another problem I can't solve. I have successfully created a block and a GUI with container, however, I cannot get the custom crafting methods right. Essentially, I want to take two items and be able to combine them into one, but they don't craft. Nothing appears in the "result" slot, index 2. Image of GUI below for reference. My custom crafting class: https://github.com/ModMCdl/Magitech/blob/master/src/main/java/com/modmcdl/magitech/recipe/PestleRecipe.java My Tile Entity: https://github.com/ModMCdl/Magitech/blob/master/src/main/java/com/modmcdl/magitech/tileenitity/TileEntityPestle.java My Container: https://github.com/ModMCdl/Magitech/blob/master/src/main/java/com/modmcdl/magitech/gui/ContainerPestle.java My Block: https://github.com/ModMCdl/Magitech/blob/master/src/main/java/com/modmcdl/magitech/blocks/BlockPestle.java If another class is needed, they're all in the github there.
-
[1.11.2] [Solved]Custom GUI error: NullPointerException
ModMCdl replied to ModMCdl's topic in Modder Support
Now, because I'm very needy, can you also possibly point out what's wrong here with my crafting? I don't get any errors or crashes, it just doesn't work. Pestle Recipe class: https://pastebin.com/15huRuYq -
[1.11.2] [Solved]Custom GUI error: NullPointerException
ModMCdl replied to ModMCdl's topic in Modder Support
I am well aware. I'm just an idiot. -
[1.11.2] [Solved]Custom GUI error: NullPointerException
ModMCdl replied to ModMCdl's topic in Modder Support
Side note, what's the updated name for transferStackInSlot. It doesn't seem to be working for me in 1.11.2 Please just ignore that, I'm an idiot.