Best thing is to always check the class you are recreating first and see how it is written so when you make your class it will reflect the same methods. Example in this case you are making a new crafting manager for your table, have a look at the vanilla one and see how each part is written and make sure yours is the exact same. I have had similar issues before, but doing what I suggested, removing the imports and making a copy and all seemed to save me once or twice....Also about 75% of all my tutorials and mods have been created using notepad++ so I do a lot of the work without imports.
There should be something in the console about the texture path for the GUI, because if you are getting no errors, and nothing happens at all when clicked, its simply just not showing the GUI.
I am not real sure what is the issue then, havent came across this myself. I can only suggest to go back through my code and compare to yours, my seem redundant, but may be the only way to fix this.....
FMLNetworkHandler.openGui(player, DayZ.instance, 0, world, x, y, z);
instead of using
player.opengui..... etc,
but i really need to know where this path goes to: textures/gui/container/crafting_table.png?
There is absolutely no need to do it that way and you will run into issues doing so ....now that I see what you did it should look like this, exactly the way I have it...
I was using it from the assets folder. I created a new folder inside minecraft/textures/gui and then the above...there is a better way though..however I dont have the code in front of me..Its in the resource location and you need to make it sort of like this..
new resource location ("modid:/textures/GUI/yourgui.png")...something like that.
I basically just squeezed it all into the original 3x3 edited in paint.net. Slots are lined up using the variables in the container. At the top where is says
this.addSlot....
the variables at the end of the lines for the crafting matrix and the output slots. The player inventory should remain the same..maybe some height adjustment. If you cant get it, just download either my builder mod, or my better table (better crafting and smelting thread) and the GUI I used is in those. Both have a 5x5 table.
Best thing is to always check the class you are recreating first and see how it is written so when you make your class it will reflect the same methods. Example in this case you are making a new crafting manager for your table, have a look at the vanilla one and see how each part is written and make sure yours is the exact same. I have had similar issues before, but doing what I suggested, removing the imports and making a copy and all seemed to save me once or twice....Also about 75% of all my tutorials and mods have been created using notepad++ so I do a lot of the work without imports.
I've done anything I know what to do now and its doing nothing different
"func_135053_a" needs to be changed to "getString".
Also in:
protected void guiDraw() {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
this.mc.func_110434_K().func_110577_a(field_110422_t);
int k = (this.width - this.xSize) / 2;
int l = (this.height - this.ySize) / 2;
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
}
The Method "this.mc.func_110434_K()" Doesn't exist.
this.mc.func_110434_K().func_110577_a(field_110422_t); Needs to be
this.mc.getTextureManager().bindTexture(field_110422_t);
My GUI opens but it closes back less than a second later. It just flashes out really fast. I copied the sources and i edited to fit my mod's names.
EDIT: Searching on Google i saw that you also had the same problem! I read that thread but I didnt find any answer. I think that you should be able to help me then
If you look here, I have said this many times, and also you will run into problems using it like this....All you had to do in your container is change this
Now I have another problem huh -__- Even if I add some custom recipes, I cant craft anything but vanilla things. This is my code:
private MagicCraftingManager() { recipes = new ArrayList(); this.addRecipe(new ItemStack(Core.fireWand), new Object[]{ " QQ", " SQ", "S ", 'S', Item.blazeRod, 'Q', Item.netherQuartz }); Collections.sort(this.recipes, new MagicRecipeSorter(this)); }
I just added a recipe to test it but it doesnt work at all :'/ The crafting manager isnt loading because I tried adding some prints but they never show up in the console..
Looking at your code you should take a real close look at this
" QQ", " SQ", "S "
The last segment only has two spaces where it should have three...make sure if making a table of any shape you should make sure that all your recipes are correct...3x3 gets 3 spaces for each set...must be 3 in each or it will not work.
FIrst of all, i did that but it didnt work, thats why i thought of that solution. Sorry for even having posted that, I wasnt capable of solving the issue, haha
EDIT: Actually for distraction i wrote another block instead of the actual Crafting table. I am so ashamed of myself :S
And btw i dont know why but there actually are 3 spaces in my code O.o I dont know why in the paste there are only 2.
Still nothing works though.
However, thanks for even listening to me
Dont be sorry, you tried and that worked out for you....ultimately thought it should be as I had said...Since you are making a 3x3 table, you should look at the vanilla crafting manager for the workbench. Copy that and make the necessary changes and add your recipes to it. You could also make the new manager and add the code in the mod class...if this is an option you would like to explore let me know and I will post the code, though I think I did on the first page.
Could you post your mod class and anything related to the table? use spoilers and code tags and I will look at it some this evening. Its no bother really. Thats why I have started the thread in the first place. I have just been pretty busy the last few weeks recoding my entire mod, fixing some bugs and upgrading my structures to new code for generating by coolAlias....I will be fixing some of the issues here with the table code and adding in a new table to my better crafting and smelting thread. It has lots of individual furnaces and tables...adding in a solar powered table....
ALso, another question. Could you make a mob tutorial? Or if you have no time give me the src and i'll post it for you (Adding credits)?
I have problems making mobs. Entites render ad white boxes.. :/
Okay, for the first issue above....I see you are making a 3x3 table, so my best option for this is to gather all the necessary files from the minecraft code...
Make the changes as needed and then you can add them to your Handler. You really dont need a slot class and also you can see how the recipes are done in the manager class...I am using 1.6.2, but there should not be many changes in the code....though you may want to look above to see how the textures are now called as some one has posted they changed and shown how to make the change. This will be a lot faster than trying to find the issue you are having.
For the second question...I dont make custom mobs, sorry. There are a few good tutorials for this already though, and the best ones I have seen are here on this forum.
Oh another thing that I noticed is that in your tutorial's GUI class, you write this line of code
public class GuiBetterTable extends GuiBetterTable {
which doesnt make sense. What should the Gui class extend? I put there GuiContainer
Yeah, I have been meaning to fix that...I have been swamped with upgrading my mod at the moment. Just check the vanilla classes always as a reference when making new custom stuff like that as it will usually point you in the right direction.
There was the vanilla crafting manager instead of mine. I fixed it with logic. I should've thought that before. Thats what I thought: The crafting manager isnt loading at all. So I have to find which classes should use it... hmmm container? Sure. Thanks a lot for your nice tutorial, saved my mod :P! I hope to see you in another tutorial of yours And also I will credit you for the crafting table even if the code if the vanilla one lol
I am happy to hear you got it working. Usually what I do is when making copies of classes I remove the imports as it will show me what all classes are being imported with the red underlines. Then I can see if I need to change them to my classes or not, or even if I need to make a new class. As soon as I finish my upgrade I have two I have been putting off I plan to add....a custom odd shaped grid...like a 2x4 or 3x5 and also one with two grids and one result....This should be enough to make it possible to make anything in the way of a table just by looking at or trying out the code and see how it is done and make changes that fit your needs...I also plan to make a new table to add to my table mods...a solar powered table...will be in 1.7.x though by time I get there...
So you did something wrong. Are you coding for Minecraft 1.6.x ?
Correct, if they are not coding in 1.6.2 and forge 789 or 804 this will not work, and also will need a few errors corrected first before run. But the source is complete as I stated before and can be dropped in eclipse and run as a mod so they can compare to what they have done wrong, or as a learning tool...I only did not include my textures...easy to make using the vanilla GUI as a template. Even the guide/tutorial in the main post is essentially my source code with a bit of explanation for the key parts that get attention. These blocks are quite easy with a bit of patience...I strongly suggest looking at the vanilla source and use as a guide as well...
The hardest part about this is making sure you have you instance correct and setting up the GUI handler, it can be a bit confusing for some...
furnaces are easy too, once you learn how to read the tile. It can be overwhelming at first, but its just like an item class with the update method, or even better like an entity class...except this one is for blocks...I created my first table using only vanilla source as there was no tutorial at the time, then jcm2606 showed me how to make a GUI handler....
One question: how do you make a recipe for custom grid sizes,
Is it like this:
CustomCraftingHandler.addRecipe(new ItemStack(item, 1), new Object[]{"aaaaa", "aaaaa", "aaaaa", "aaaaa", "aaaaa", 'a', uranium});
And if that's not the case what do you need to do then?
Thanks for helping me out
yes that is correct. and if you look at my source for the 5x5 you will see that. and also its the same for any custom grid...if its 4x4, you need four spaces for each row and same for odd ones too, like 5x3 it would be 5 rows by 3 columns...so five sets of three...
I want to thank you I love this I tried this out like 10 times but I gave up.
I saw your post and now I am happy cause it works (NOTE: you can only use func_92051_a not addBuilderShapeless)
TY
~Nielsbwashere
No problem...glad everything worked out for you....
Find out how I generate....coolAlias...world structure generation and rotation tool...
Find out how I generate....coolAlias...world structure generation and rotation tool...
Find out how I generate....coolAlias...world structure generation and rotation tool...
There is absolutely no need to do it that way and you will run into issues doing so ....now that I see what you did it should look like this, exactly the way I have it...
if that is not working, you have an issue some where else.....
Find out how I generate....coolAlias...world structure generation and rotation tool...
new resource location ("modid:/textures/GUI/yourgui.png")...something like that.
Find out how I generate....coolAlias...world structure generation and rotation tool...
this.addSlot....
the variables at the end of the lines for the crafting matrix and the output slots. The player inventory should remain the same..maybe some height adjustment. If you cant get it, just download either my builder mod, or my better table (better crafting and smelting thread) and the GUI I used is in those. Both have a 5x5 table.
Find out how I generate....coolAlias...world structure generation and rotation tool...
I've done anything I know what to do now and its doing nothing different
Send me a link to your src through PM, I will see what I can do....
Find out how I generate....coolAlias...world structure generation and rotation tool...
In:
"func_135053_a" needs to be changed to "getString".
Also in:
The Method "this.mc.func_110434_K()" Doesn't exist.this.mc.func_110434_K().func_110577_a(field_110422_t); Needs to be
this.mc.getTextureManager().bindTexture(field_110422_t);
Legend of Zelda Mod (Minecraft 1.10.2!)[Updated September 10th 2016 to 4.0-pre2]
Extra Achievements (Minecraft 1.9.4!)[Updated July 8th 2016 to 2.3.3]
Legend of Zelda Mod (Minecraft 1.10.2!)[Updated September 10th 2016 to 4.0-pre2]
Extra Achievements (Minecraft 1.9.4!)[Updated July 8th 2016 to 2.3.3]
If you look here, I have said this many times, and also you will run into problems using it like this....All you had to do in your container is change this
Block.workbench.blockID
to your block and it will work perfect
Looking at your code you should take a real close look at this
" QQ", " SQ", "S "
The last segment only has two spaces where it should have three...make sure if making a table of any shape you should make sure that all your recipes are correct...3x3 gets 3 spaces for each set...must be 3 in each or it will not work.
Find out how I generate....coolAlias...world structure generation and rotation tool...
Dont be sorry, you tried and that worked out for you....ultimately thought it should be as I had said...Since you are making a 3x3 table, you should look at the vanilla crafting manager for the workbench. Copy that and make the necessary changes and add your recipes to it. You could also make the new manager and add the code in the mod class...if this is an option you would like to explore let me know and I will post the code, though I think I did on the first page.
Find out how I generate....coolAlias...world structure generation and rotation tool...
Find out how I generate....coolAlias...world structure generation and rotation tool...
Okay, for the first issue above....I see you are making a 3x3 table, so my best option for this is to gather all the necessary files from the minecraft code...
Block
Container
GUI
Crafting Manager
Recipe Sorter
Make the changes as needed and then you can add them to your Handler. You really dont need a slot class and also you can see how the recipes are done in the manager class...I am using 1.6.2, but there should not be many changes in the code....though you may want to look above to see how the textures are now called as some one has posted they changed and shown how to make the change. This will be a lot faster than trying to find the issue you are having.
For the second question...I dont make custom mobs, sorry. There are a few good tutorials for this already though, and the best ones I have seen are here on this forum.
Find out how I generate....coolAlias...world structure generation and rotation tool...
Yeah, I have been meaning to fix that...I have been swamped with upgrading my mod at the moment. Just check the vanilla classes always as a reference when making new custom stuff like that as it will usually point you in the right direction.
I am happy to hear you got it working. Usually what I do is when making copies of classes I remove the imports as it will show me what all classes are being imported with the red underlines. Then I can see if I need to change them to my classes or not, or even if I need to make a new class. As soon as I finish my upgrade I have two I have been putting off I plan to add....a custom odd shaped grid...like a 2x4 or 3x5 and also one with two grids and one result....This should be enough to make it possible to make anything in the way of a table just by looking at or trying out the code and see how it is done and make changes that fit your needs...I also plan to make a new table to add to my table mods...a solar powered table...will be in 1.7.x though by time I get there...
Find out how I generate....coolAlias...world structure generation and rotation tool...
Link
Find out how I generate....coolAlias...world structure generation and rotation tool...
Correct, if they are not coding in 1.6.2 and forge 789 or 804 this will not work, and also will need a few errors corrected first before run. But the source is complete as I stated before and can be dropped in eclipse and run as a mod so they can compare to what they have done wrong, or as a learning tool...I only did not include my textures...easy to make using the vanilla GUI as a template. Even the guide/tutorial in the main post is essentially my source code with a bit of explanation for the key parts that get attention. These blocks are quite easy with a bit of patience...I strongly suggest looking at the vanilla source and use as a guide as well...
The hardest part about this is making sure you have you instance correct and setting up the GUI handler, it can be a bit confusing for some...
Find out how I generate....coolAlias...world structure generation and rotation tool...
Find out how I generate....coolAlias...world structure generation and rotation tool...
yes that is correct. and if you look at my source for the 5x5 you will see that. and also its the same for any custom grid...if its 4x4, you need four spaces for each row and same for odd ones too, like 5x3 it would be 5 rows by 3 columns...so five sets of three...
Find out how I generate....coolAlias...world structure generation and rotation tool...
No problem...glad everything worked out for you....
Find out how I generate....coolAlias...world structure generation and rotation tool...