crazysnailboy / UncraftingTable

A minecraft mod to allow uncrafting of items in exchange for XP
GNU Lesser General Public License v3.0
9 stars 6 forks source link

Found some bugs. :) #1

Closed Zelly9191 closed 7 years ago

Zelly9191 commented 7 years ago

Hey! thanks for taking a crack at this! i really appreciate it. i have found 2 bugs. currently it seems that if you drop a stack of items in it will not register the item meta values again. However one at a time works fine. It also seems that it has lost it's functionality to Uncraft damaged tools. Seriously thank you though this is a huge improvement to what it was before! Good luck! I hope with my bug testing and your knowledge we can fix this mod.

crazysnailboy commented 7 years ago

Hey,

I've fixed the issue with uncrafting stacks of multiple items.

As for damaged tools, I can see why it no longer works - damage wasn't being taken into account which lead to the golden apple bug, and fixing that means it can't find an uncrafting recipe for a damaged tool. I'm not convinced that should be a feature really, but I can see there was a debate about this on the forum thread when the mod was first released so I'll take a look and see if I can figure out how that's supposed to work.

Zelly9191 commented 7 years ago

What the mod is suppost to do is if you set a minimum and maximum level in the config it shoould calculate the damage on a damaged tool and take a value between the minimum and maximum level set that is fair for the damage done to the item. It would then minus that amount of xp from the player. Otherwise it will use the minimum level given in the config to uncraft everything else that was not a damaged tool. It was deffanately intended as this (depending on the calculation formula you set in the config(1-2) was the only way to have the maximum level taken off items. Sorry it's a little hard to explain. Do you kind of get what im saying. Thanks for fixing the stack bug!

crazysnailboy commented 7 years ago

OK pre3 is up, you can uncraft damaged tools :) And I fixed achievements not working as well.

Let me know how you get on!

Zelly9191 commented 7 years ago

Sweet i'll go test it in a minute!

Zelly9191 commented 7 years ago

Ok i just finished some more testing. I found that say you have an invintory full of full emerald stacks and 5 full stacks of emerald blocks. If you start dropping the full stacks quickly into the uncraft slot and just let the newly uncrafted emeralds fall out of the table you end up with fake stacks of emralds on the ground. You can pick the real ones up however and the gakes go away after re loading the world. Also uncrafing an empty map crashes the game for some reason.

Zelly9191 commented 7 years ago

Emeralds are just an exsample it can be gold, coal, ect.

crazysnailboy commented 7 years ago

I can uncraft an empty map and it works fine. Do you have any other mods installed? Can you upload the crash log? I'll take a look at the fake emerald thing.

Zelly9191 commented 7 years ago

Hmm i have a modpack im making installed but as far as i can tell the crash log only contained problems from the uncrafting table ill check and post the log +crash report tonight/tomarrow as i have work soon. I was using a standard level 0 a maximum level 5 and the uncrafting algorithim 0 if that helps at all.

Zelly9191 commented 7 years ago

My bad, tipicaly im pretty good at being able to figure out which mod is causing the error. A mod had added a recipie for duplicating a finished map as an empty one the recipie type was not supported by the uncrafting table and it crashed. I can still give you the error if you want. The only problem i can see with this bug is that if a recipie isn't shapless, shaped, or any other format supported by the uncrafting table. It will cause the game to crash. Maybe it can be worked so that if when it finds a recipie format it doesn't support it will try to find a diffrent recipie. And if one is not found it can just output the default cannot uncraft message. You don't have to do this though if you don't want it's not a major bug. Thanks for everything so far just let me know if you need the crash report+log still or not. Any luck with the other bug so far by the way?

crazysnailboy commented 7 years ago

No problem, good to know what was causing it. Which mod was it? I'll try installing it and see what I can do about preventing the crash.

No luck on the other one yet. I can replicate it so that's a start, but I'm not sure what's causing it yet. Not spent a lot of time on it today but I'll try and get to the bottom of it over the next day or two.

Hopefully we're getting near the bottom of the bug list!

Zelly9191 commented 7 years ago

Hmmm.... i removed every mod i was using except for forge and the uncrafting table mod tried to uncraft an empty map and i still got the same crash :/

crash report:

log:

It seems to be trying to uncraft the zoomed out map recipe. (I think?) There is only one other bug I found but I don't quite know how to reproduce it yet. It's just a very minor graphical bug where the calculus shows a huge amount of xp cost but it only takes the normal xp amount set in the config. Other than that there is not a single other bug i have found, and i have used this mod a lot. So to say the least we are definitely at the bottom of the bug list! :) The moment I figure out how to reproduce it i'll let you know! Good luck.

crazysnailboy commented 7 years ago

Hi,

I think I've sorted the fake emerald bug - when the inventories are full and the mod spawns items in the world it wasn't checking whether that was a client or server operation that was running (even in single player, minecraft runs a server internally) and doing both when it should only have been happening on the server.

I don't understand the map issue I'm afraid. I can't craft a zoomed out map - an empty map is an empty map and they uncraft fine when I try to do it. If I try and uncraft a map that's not empty, it tells me it's impossible. Either way - no crashes :( Could you give me exact step by step instructions to reproduce please?

Also, I've created a config GUI to replace the old options screen that was present in the 1.6.4 and 1.7.2 versions of the mod. Forge has a built-in way of doing this now which wasn't there when this mod was originally made and I wanted to learn how to use it :) Jordy141 had left the old one in there in 1.7.10 but disabled it, and having the "Click O for options" text on the container GUI was a bit clunky anyway. You can get to that from the mods list on the main minecraft screen before you load the world.

Let me know what you think of pre4 :)

Zelly9191 commented 7 years ago

Awesome that sound amazing. Maybe the empty map bug isn't in the new version i'll have to check. I'll do some testing and get back to you with the way to reproduce the last two bugs. I had an idea for an addition to the mod but I would understand if you wanted to keep it as is. let me know if you would be willing to think about it and i'll let you know the idea!

crazysnailboy commented 7 years ago

I'm willing to think about it if you tell me what it is! No promises though...

Zelly9191 commented 7 years ago

Hey. Sorry i didn't get a chance to test today. Ill test it first thing tomarrow. My idea was if it's possible can you make it so i can put item names (like : "minecraft:beacon") or item ids in an area of the config and they would be prevented from being uncrafted. If it would be a pain to add don't feel you have to. I just thought I would suggest it. Sorry about not geting to testing. I'll report here with the results tomarrow. Thanks again! (the in game config looks great by the way i love it!)

Zelly9191 commented 7 years ago

I figured it out! I had set the forge config option sort recipies to false. This will make the uncrafting table find the other recipie first and crash. The uncrafting table will always use the first recipie it finds for uncrafting. Now im off to reproduce the other bug. Oh by the way i noticed that the game must reboot to apply the config changes. I'm not shure if it was intended to be that way or not. However i figured i would mention it. (sorry this took so long i got a bit busy.)

Zelly9191 commented 7 years ago

just figured it out.

my config is set to: standard level:0 max level:5 equation:1

This makes the level, when putting in items with meta damage (EX:enchanted golden apple, some types stained glass) in the calculus slot jump really high. However it's only a visual bug and the levels are still calculated correctly when uncrafting. (please don't remove the option to set standard level to 0 it's an amazing part of the mod) Anyway let me know if you have any luck. This should be the last of it, I have never encountered another bug with this mod. Good luck and thanks for all of your hard work. 2016-12-08_22 54 54

crazysnailboy commented 7 years ago

OK I've fixed those last two and uploaded pre5! I changed the config GUI as well so that it doesn't require a restart for the changes to kick in. Good job on the testing - the map one in particular sounds like it was tricky to track down.

I'll have a look at your request for a list of item IDs that can be excluded from uncrafting. If it's relatively easy I'll do a pre6. Then, assuming that there are no more bugs I'll release either pre5 or pre6 as 1.4.2, and go back to the forum and let other people know it exists. Depending on the amount of interest I'm potentially open to continuing this, updating it to later minecraft versions and adding new features if people can think of any. It's been a fun little project so far :)

Zelly9191 commented 7 years ago

Awesome! Im looking forward to it! Getting to watch this mod be slowly brought back to life before my eyes has been amazing. Thank you for letting me work with you on testing it's been a lot of fun (and i would love to test future updates of the mod if you will let me). A bit before you do an offical release let me know i'll create an image for the mcmod.info file and some banners for the forum to help show off the mod! I feel it's a mod people want but never know about. So hopefully it will be a hit.

Zelly9191 commented 7 years ago

I think i may have found a bug. It's not a big one though. Im guessing at some point the uncrafting table makes note of all of the recipies it can find put's them in it's own list and use's that list for uncrafting. It seems that when using a mod such as minetweaker if i remove a recipie the uncrafting table cannot uncraft the item as expected. However if i add a new recipie the uncrafting table fails to find and uncraft that recipie. However, using a mod such as the customrecipies mod. Will allow the uncrafting table to see the new recipie and not the old one as it should. This mod loads the recipies as the game loads and as the world loads. The best bet i can think of to fix this would be to have the uncrafting table either dynamicly read the recipie list....or it should load the recipie list as the world loads. Again this isn't a huge problem it's just mod support really. It's a little hard to explain so just let me know if you kind of get it. I can send you a way to reproduce it as well if nessasary. Thanks again!

Zelly9191 commented 7 years ago

*sorry for spelling and grammer. Still a little tired i have had many late nights recently.

crazysnailboy commented 7 years ago

I've uploaded pre6 which has the item list feature you requested, so you can store a list of blocks or items in the format "minecraft:beacon" and it will no longer be possible to uncraft them.

The mod actually does check the list of crafting recipes each time it's needed - I was considering changing it to look them up once and store them as this seemed unnecessary to me. I did a bit of reading around and found a reddit post that suggests there's a bug in minetweaker 3.0.10 which might account for this - is that the version you're using?

Thanks for offering to do some banners and a logo, that sounds great! And you're more than welcome - it's been a pleasure to work with you on this and your testing has been massively helpful - I probably wouldn't have gotten this far without all of your effort :)

Zelly9191 commented 7 years ago

Hmmmm..... I just checked and i dont think that is the problem I updated to 3.0.10B which had a fix for that bug in it's patch notes and it still happens. It's not 100% nessasary to fix it would be nice however as I try to remove unesasary mods from my mod pack, and having custom recipies (works with uncrafting) along with minetweaker (does not, but does loads of other stuff) kind of sucks. I'm super excited to test the new version. I cannot even tell you how much of a life saver this is. It shaves off many hours I would have spent trying to disable fetures of other mods. Now i can just make it so it the item cannot be uncrafted. I'll jump on to testing right away. If you want i can send you minetweaker with a test script so you can see what you can find or i can send you a log file (not sure if it would help). Because if it is a minetweaker bug or an uncrafting table bug it would be good to know. Thanks for fixing the acheivement. (I never knew what that one was.) :)

Zelly9191 commented 7 years ago

Hey i just did some more testing it works really well! However I did encounter 3 problems. The "all in one" acheivement does not allow the uncrafting table to check for blocks above it. Also I cannot seem to earn the "uncraft an item" acheivement. That or it does not allow you to unlock the next the acheivements after it. lastly do you think it would be possible to have the items that the uncrafting table cannot uncraft alow for meta data? It worked great but I put a ,1 after it and it didn't dectet the meta value. Do you think there is any chance of having the confing say "un-uncraftable items" :) currently it say "uncraftable items" it sounds a little reversed. I saw the ingame config it looked amazing! Fantastic job so far. Only a little more, we are in the home stretch now!

crazysnailboy commented 7 years ago

It looks like I broke achievements - I slightly overzealously refactored out some event registrations that it turned out were needed! Oops..

I've changed the way that the different types of crafting recipe are handled, which means it now works with minetweaker recipes as well, and added support for the metadata in the excluded items list. I've called it "Excluded Items" - Un-uncraftable is a bit of a mouthful! It's resourced anyway so you could change it in the language file if you wished.

In other news, I have working builds of pre6 for 1.8.9, 1.9.4 and 1.10.2 - just need to copy over the bug fixes from pre7 and then I can publish those as well!

crazysnailboy commented 7 years ago

Actually - scratch that - the change for minetweaker has re-introduced the crash with maps. I'll look to look at that again

Zelly9191 commented 7 years ago

Sweet! I'll Send the images to you tomorrow through a pm so you can add them before posting the mod to the forums. You did an amazing job! I cannot tell you how thankful I am!

Zelly9191 commented 7 years ago

Hey just wanted to let you know that the block breaks instantly in survival. Also the book in compute slot to get enchantments back seems to give the lowest level of the first enchantmen on an item back and nothing else. I'm still using pre 6. I should have the banners and mod.png done for tomarrow I have some ideas already but i'm open to sugesstions if you have them. I took two years of photography in school and I do graphic design as my pastime. So it should turn out pretty well. :) Keep it up. I'm shure it will be a hit when it is done.

crazysnailboy commented 7 years ago

pre7 is up. When uncrafting an item with enchantments, I get the correct level enchant. In the original mod, if you had a tool with multiple enchantments you needed multiple books in the compute slot to capture them all. I've changed that so that if there's a single book, all the enchantments are put onto that book, and if there are multiple books it spreads them out one per book. If there are more books than enchantments you get some books back.

I don't really have any ideas for banners etc - I was messing about on minetext before you mentioned it and came up with this, but I'm no designer! I'm sure whatever you do will look great. logo

I would like to keep the original author's name as part of the mod name - partly as credit and partly to differentiate this uncrafting table from the various other uncrafting table mods that have been made. If you can work that into the banner and logo in some way that would be cool :)

Zelly9191 commented 7 years ago

Haha no problem i use minetext as a base anyway! :) It should be done in a few hours. Could you pm me the minetweaker text on the fourm GitHub lowers image quality. And i dont want the logo to be blurry. If you don't i'll just make my own and go from there. I would love to keep his name in the title I think it's a fantastic idea. Once again thanks for all of your hard work. You did something amazing. Really I mean it. I'll close this on the offical posting of the mod after some final tests and the images.

Zelly9191 commented 7 years ago

They are done! I'll send them right now. i just wanted to check something however. when i uncraft something like a hoe or an axe the output does not look like the recipe. The materials come back correct it's just not in the right positions. not a huge problem I just figured i'd mention it. The mod has always been that way.

Zelly9191 commented 7 years ago

I'm going to close this shortly I just wanted to ask if everything was good with the images. (i can fix things if you don't like them. And if you ever need assistance or textures e.c.t just PM me it was a blast to work with you!

crazysnailboy commented 7 years ago

Yes they're great, thanks! I sent you an email. Just waiting for the moderation to clear on the CurseForge page (which I've added you as a member of) and hopefully then I can make a forum thread. And I may well need assistance testing the updates if you're up for it! Cheers :)

Zelly9191 commented 7 years ago

Just got your email. I'll definitely be up for testing the updates! Thanks for including me I feel honored to have helped and to be in the credit's of the mod. If I don't reply to a Pm just email me 99% chance i'll see it there. :) I'm closing this now I'll open a new issue if i find anything.