Jump to content

ResaloliPT

Members
  • Posts

    41
  • Joined

  • Last visited

Everything posted by ResaloliPT

  1. Works like a charm, thx for the patch EDIT: Github link just for future reference: HERE!
  2. Dunno who to rlly react to that , also an honor to be responded by someone i enjoy its awsome work
  3. Indeed ShapedRecipes limited to 3x3, Shapeless already was using inv.get[Width/Height]() by default so i only made a ShapedRecipes implementing my own IRecipes and did some other changes, now when i place a item in the 3x3 it errors but doesnt crash, i push again the code to git. The changes can be seen HERE And here is the error i get: EDIT: On the commit i posted as can be seen on the CraftingManager i changed findMatchingRecipe to findMatchingRecipes and getRecipe to getRecipes because both where giving me clashing error. Error it would give: findMatchingRecipe(InventoryCrafting, World) in 'com.resaloli.eim.content.CraftingManagerDCT' clashes with findMatchingRecipe(InventoryCrafting, World) in 'net.minecraft.item.crafting.CraftingManager'; attempting to use incompatible type And same for getRecipe: getRecipe(ResourceLocation) in 'com.resaloli.eim.content.CraftingManagerDCT' clashes with getRecipe(ResourceLocation) in 'net.minecraft.item.crafting.CraftingManager'; attempting to use incompatible type
  4. Ohh nice Will try new things then will reply back
  5. Thx for posting, Hmm, weird no wonder i would never find, when i use IntelliJ to goto definition it show a nearly empty IRecipe interface Where could i get the default IRecipe to copy from?
  6. Hello there, Im trying to get my Custom Workbench to work but without sucess, i can craft my on recipes on the whole grid wherever i place (Shapeless), but when i try with vanilla recipes it only works on the upper left corner 3x3 of my 5x5 grid. All my code is available at github HERE At attachments i have some images of whats happening. Iv tried multiple changes and none work I also did a breakpoint on the part that findMatchingRecipe compares the recipes and weither inside or outside the 3x3 grid, the contents of variables are the same. Just in case if needed, my IDE is IntelliJ IDEA. Thanx in advance.
  7. 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. I didnt mentioned you should add it . 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 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
  8. 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
  9. 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 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... 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
  10. 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 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...
  11. Hi comunity of Minecraft Forge, got a few problems to get this part of my noob mod 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
  12. well im not english native so ye it can be even worse to understand well all nbt code is working the thing is the only slot being saved is the output wich is a nonsence cause when theres nothing or no recipe matching theres not output so ye i want to save the grid but i cant seem to make it work and also the crafting as also stoped working from nowhere i did no change and it stoped work i can craft all my recipes no problem but when it comes to vanilla it only works on corner 3x3 btw i will always list problems on each commit i do on github
  13. after being for quite a while like this[ to your code i found out that none base methods on my TE was overriden --' so the called code was from minecraft and not mines so it wasnt being saved on mine itemstack so after many much breakpointing(this thing rly helps finding problems) i se that the method @Override public void setInventorySlotContents(int i, ItemStack itemstack) { inventory[i] = itemstack; if (itemstack != null && itemstack.stackSize > getInventoryStackLimit()) { itemstack.stackSize = getInventoryStackLimit(); } markDirty(); } is detecting the items i drop on the grid problem is the ID is Always 0 so its setting always the same index on the inventory itemstack array because this is the output slot index EDIT: im just goin nuts with this i organized my project and workspaces and all this stuff and after import my code from github well the crafting stoped working..... it recognizes my recipes but not vanillas when out of 3x3 bounds but when inside it works great so that meast that somthing stupid fixed it but now i doest and the code is still the same from the 1 commit i made.... um not the best at java im still learning what i can i can do some work arounds and clean code and stuff but when it cames from scrach well i dont know how to start and how i do things, i have basics of java but is not its best. i can make blocks, items, recipes and other simple things but when it cames to TE+Container+guis dam i suck so i try my best to learn that but with such errors i cant get no where
  14. Otherwise it will change/save the itemStack array's in the vanilla IInventories instead. ye sry my bad i did read that but i was doing one thing and saw it worked and then i forgot that gimme 10 mins+- to implement that and do some changed will reply back when done EDIT: well all i did dont work i changed the things to my TE then it errors that such methods and costructers didnt exist so i created them then i error on all my code i fixed that and now i got so other errors so i gave up and restarted al over and hope u may give a lead i can follow
  15. omg *facepalm* myself my fix to 5x5 worx open this topic start writing reply open eclipse start my recipes on constructer debug client *facepalm my self hard* magicly 5x5 working --' but still nbt not saving
  16. well i did loads of code and finaly my nbt thing is being called but its always getting nulls because my inventory doesnt contain any items...(not the grid but the inventory[25] itemstack) i see that inventoryItems has the grid items but the itemstack i declared didnt so thats the reason its null and the crafting thing well i had to change the limits on shapedrecipes and shapelessrecipes i had to do new files and loop trough 5 instead of 3 also added all recipes manualy to my manager but still only working on the corner 3x3 because of that my 4x4 recipe isnt working...
  17. like only those 3x3 are working the others arent i changed a debug recipe to this this.addRecipe(new ItemStack(Blocks.diamond_block, 1), new Object[] {"SSSS", "SSSS", "SSSS", 'S', Blocks.dirt}); and then when i place dirt on a 4x4 pattern it doesnt craft the diamond block but when it was only 3x3 it did(when using this.addRecipe(new ItemStack(Blocks.diamond_block, 1), new Object[] {"SSS", "SSS", "SSS", 'S', Blocks.dirt}); ) the nbt its not writing or reading it just not working and the packet things the same arent being called none of them. is there a way to save the ivnentory every time the crafting grid changed? i tried using markDirty(); but it didnt work
  18. yay its crafting now but only im a 3 by 3 but i have this as 5 by 5... ( public InventoryCrafting craftMatrix = new InventoryCrafting(this, 5, 5); ) and the two thing u sent me about the nbt isnt working they are not being called...
  19. yay its crafting now but only in some places... working crafting slots are X's: x x x 0 0
  20. well that was indeed swaped, fixed that and no more linked slots yay inventory working just fine using shift now i just cant craft anything... since i still dont get where i register my recipes on my crafting manager, i know how to add to the vanilla crafting but not to just mine EDIT: well after tons of tests i found out that my crafting manager is never called neither is my recipes class how can i make my block call its crafting manager + my read/writenbt stuff to save inventory is not being called
  21. omfreakinggod im so sorry after updating i wasnt saving.... code is updated for sure now i was getting like wth this guy is talking about already did what he told but we where looking at diff classes my bad im soo sorry again
  22. well no more null things now just all slots on grid geting the same item could u explain more on suing my slots cause im already using them on the contructred DCTCrafting and DCTSlot on my slots and using vannila on vanilla inventory
×
×
  • Create New...

Important Information

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