Posted April 4, 20196 yr Hi, I wanted to make a custom crafting table. The idea I had was to basically to copy the vanilla crafting table - so have the 3 by 3 grid and the 1 output (I wanted to do this so my recipes wouldn't clash, in the vanilla table). Context aside for a minute. I tried to copy the classes, but nothing worked! I was just wondering if anyone would be able to help, either with reference code or just some help! Please and Thanks! This is for 1.12.2! Edited April 4, 20196 yr by Pppineeeee3
April 8, 20196 yr On 4/5/2019 at 3:11 AM, Pppineeeee3 said: I tried to copy the classes, but nothing worked! Of course nothing worked. You can't just copy everything out of its original context and expect it to work. Define "nothing worked" Show your code. We can't do anything without seeing your code. Some tips: Spoiler Modder Support: Spoiler 1. Do not follow tutorials on YouTube, especially TechnoVision (previously called Loremaster) and HarryTalks, due to their promotion of bad practice and usage of outdated code. 2. Always post your code. 3. Never copy and paste code. You won't learn anything from doing that. 4. Quote Programming via Eclipse's hotfixes will get you nowhere 5. Learn to use your IDE, especially the debugger. 6. Quote The "picture that's worth 1000 words" only works if there's an obvious problem or a freehand red circle around it. Support & Bug Reports: Spoiler 1. Read the EAQ before asking for help. Remember to provide the appropriate log(s). 2. Versions below 1.11 are no longer supported due to their age. Update to a modern version of Minecraft to receive support.
April 8, 20196 yr Author 19 hours ago, DavidM said: Of course nothing worked. You can't just copy everything out of its original context and expect it to work. Define "nothing worked" Show your code. We can't do anything without seeing your code. The block was IG but no GUI opened.
April 9, 20196 yr 1 hour ago, Pppineeeee3 said: The block was IG but no GUI opened. 21 hours ago, DavidM said: Show your code. We can't do anything without seeing your code. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
April 9, 20196 yr 1 hour ago, Pppineeeee3 said: The block was IG but no GUI opened. You have to call player.openGUI(INSTANCE (Main mod instance), id (0 if it is the first GUI your mod has), other args...). Then you have to make a GUI handler like this: public class GuiHandler implements IGuiHandler { @Nullable @Override public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { if(ID == 0) return new YourContainer(); return null; } @Nullable @Override public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { if(ID == 0) return new YourGuiScreen(YourContainer()); return null; } } Then register it in your load method: NetworkRegistry.INSTANCE.registerGuiHandler(INSTANCE(Main mod instance), new GuiHandler());
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.