Jump to content

[Help 1.8(1.7.10 Aceptable i can adapt)] Crafting only on 3x3 and not saving nbt


ResaloliPT

Recommended Posts

Hi comunity of Minecraft Forge,  got a few problems to get this part of my noob mod :P

so i followed a few tuts and code isnt copy-pasta 100% (maybe 30% and a bit more from vanillas) and i still not get this to work :/

 

So the bugs List is: 1 - of a craftingGrid 5x5 can only use an corner of 3x3

                                2- tileentity not saving to nbt

 

Thx in advance!

 

If its needed more just ask!

 

Here is the Sources:

 

Codez Here

Link to comment
Share on other sites

Hey,

 

Im verry sorry that I forgat to relply, I had some bussy days.

Anyway, the recipe problem is there because you add the vanilla recipes to the recipe List. The methods in the vanillaRecipe Classes are hardcoded to only search in (the first) 3x3 area. To work around this problem you need to recreate them in your own craftingSystem.

 

As to the nbt problem, you seems to do everything oke, so I would have to test it a bit more to find the problem, though unfortunatly Im not able to do that right now.

Projects:

Discontinued:

- N2ConfigAPI

- Meachanical Crafting Table

 

Latest:

- CollectionUtils

 

Coöperations:

- InGameConfigManager

Link to comment
Share on other sites

Hey,

 

Im verry sorry that I forgat to relply, I had some bussy days.

Anyway, the recipe problem is there because you add the vanilla recipes to the recipe List. The methods in the vanillaRecipe Classes are hardcoded to only search in (the first) 3x3 area. To work around this problem you need to recreate them in your own craftingSystem.

 

As to the nbt problem, you seems to do everything oke, so I would have to test it a bit more to find the problem, though unfortunatly Im not able to do that right now.

 

i wanted anyway to create a new thread since the old was being too messy with alot of diferent problems so i created this one to make it cleaner.

 

Moving on to topic, so i have to add all vanilla recipes manualy? to my Crafting manager? dam thats alot of recipes... for the time being i will draw something unto the gui image that vanillas only work there and then add them overtime because on the old days it was just a few 50s recipes now they must be over 150s xD oh well nothing evolves with no  work ill do it overtime or when im bored but it ill happen.

 

About the nbt well the thing is only saving the output but its nonsence since the output depends on the craftingGrid so if we read a dirtBlock from nbt and add it to output it will disapear cause theres no matching recipe...

Link to comment
Share on other sites

Hey,

 

Im verry sorry that I forgat to relply, I had some bussy days.

Anyway, the recipe problem is there because you add the vanilla recipes to the recipe List. The methods in the vanillaRecipe Classes are hardcoded to only search in (the first) 3x3 area. To work around this problem you need to recreate them in your own craftingSystem.

 

As to the nbt problem, you seems to do everything oke, so I would have to test it a bit more to find the problem, though unfortunatly Im not able to do that right now.

 

i wanted anyway to create a new thread since the old was being too messy with alot of diferent problems so i created this one to make it cleaner.

 

Moving on to topic, so i have to add all vanilla recipes manualy? to my Crafting manager? dam thats alot of recipes... for the time being i will draw something unto the gui image that vanillas only work there and then add them overtime because on the old days it was just a few 50s recipes now they must be over 150s xD oh well nothing evolves with no  work ill do it overtime or when im bored but it ill happen.

 

About the nbt well the thing is only saving the output but its nonsence since the output depends on the craftingGrid so if we read a dirtBlock from nbt and add it to output it will disapear cause theres no matching recipe...

 

I would recommend you make your code readable by replacing the var# and parObject with actual names.

 

Code cleanup still to be done ill do bits over time and it will be updated to github everytime i stop coding for that day

Link to comment
Share on other sites

That makes no sence indeed, but can you craft things without closing the gui? It could be that its autocrafting, or that there are some ghostblocks.

 

Ps. You dont have to add recipes manualy, you only have to switch them over to your recipe type. I think thats easy possible with some  methods

Projects:

Discontinued:

- N2ConfigAPI

- Meachanical Crafting Table

 

Latest:

- CollectionUtils

 

Coöperations:

- InGameConfigManager

Link to comment
Share on other sites

That makes no sence indeed, but can you craft things without closing the gui? It could be that its autocrafting, or that there are some ghostblocks.

 

Ps. You dont have to add recipes manualy, you only have to switch them over to your recipe type. I think thats easy possible with some  methods

 

 

 

How can i switch the CManager then i dont have no idea how ....

also im not thinking on autocrafting i just want it as a normal crafting that stores its inventory, ofc u can use others mods like AE to autocraft on it since they are the master of automation

Link to comment
Share on other sites

How can i switch the CManager then i dont have no idea how ....

 

rather simple, the recipes contains the recipe input and output. the only thing you have to do is iterate through the whole list, determine if its a shaped or shapeless recipe. than create every recipe in your Crafting Manager just the same way as you add a custom recipe. The parameters are the same as the input and output as the vanilla recipes in this case.

 

also im not thinking on autocrafting i just want it as a normal crafting that stores its inventory, ofc u can use others mods like AE to autocraft on it since they are the master of automation

I didnt mentioned you should add it :P. I tried to give some thoughts on what could cause the nbt problem.

So could you check if the items are saved before you close the gui? (e.g. if changes in the crafting grid are save at all?)

Projects:

Discontinued:

- N2ConfigAPI

- Meachanical Crafting Table

 

Latest:

- CollectionUtils

 

Coöperations:

- InGameConfigManager

Link to comment
Share on other sites

How can i switch the CManager then i dont have no idea how ....

 

rather simple, the recipes contains the recipe input and output. the only thing you have to do is iterate through the whole list, determine if its a shaped or shapeless recipe. than create every recipe in your Crafting Manager just the same way as you add a custom recipe. The parameters are the same as the input and output as the vanilla recipes in this case.

 

also im not thinking on autocrafting i just want it as a normal crafting that stores its inventory, ofc u can use others mods like AE to autocraft on it since they are the master of automation

I didnt mentioned you should add it :P. I tried to give some thoughts on what could cause the nbt problem.

So could you check if the items are saved before you close the gui? (e.g. if changes in the crafting grid are save at all?)

 

ohh i got it on how to save it ye looks like ima have some fun interatening trough objects on lists xD

 

the nbt now is only being called from time to time, when loading world and when pausing the game

but when i put a breakpoint there when it is cycling trough the inventory ItemStack[] it is always returning null on all 25 slots of my container meaning that my container still not being linked to my inventory array....

 

REPLY: man it passed 3+ hours of straigth coding im so tired for today so ye just pushed code to github but the nbt still not saving

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.