H_SerhatY Posted August 31, 2018 Posted August 31, 2018 (edited) Hello. I want to make a crafting table for my mod items. How can I do it? Note: I don't know anything about that. Edited September 4, 2018 by H_SerhatY Quote My Mods: More Strenghtened Tools Mod: https://www.curseforge.com/minecraft/mc-mods/mstm
H_SerhatY Posted August 31, 2018 Author Posted August 31, 2018 But I made a texture for GUI. Quote My Mods: More Strenghtened Tools Mod: https://www.curseforge.com/minecraft/mc-mods/mstm
Cadiboo Posted September 1, 2018 Posted September 1, 2018 10 hours ago, H_SerhatY said: But I made a texture for GUI. Isn’t that a normal crafting table texture? make a custom block, look at BlockWorkbench and ContainerWorkbench and GuiWorkbench and make custom versions of them Quote About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
H_SerhatY Posted September 1, 2018 Author Posted September 1, 2018 (edited) 3 hours ago, Cadiboo said: Isn’t that a normal crafting table texture? make a custom block, look at BlockWorkbench and ContainerWorkbench and GuiWorkbench and make custom versions of them Correct. It's a normal crafting table texture. Now I'm going to make a block and take the codes from Minecraft's workbench. Edit: I find the BlockWorkbench and ContainerWorkbench but I can't find the GuiWorkbench. Edited September 1, 2018 by H_SerhatY Quote My Mods: More Strenghtened Tools Mod: https://www.curseforge.com/minecraft/mc-mods/mstm
Draco18s Posted September 1, 2018 Posted September 1, 2018 It's in net.minecraft.client Quote Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
H_SerhatY Posted September 1, 2018 Author Posted September 1, 2018 (edited) 23 hours ago, Draco18s said: It's in net.minecraft.client I'm looked at this but I can't find the GuiWorkbench, I find only thing related, GuiCrafting. Edit: Oh, it's VERY HARD. At least, I'm seeing it's VERY HARD. Edited September 2, 2018 by H_SerhatY Quote My Mods: More Strenghtened Tools Mod: https://www.curseforge.com/minecraft/mc-mods/mstm
H_SerhatY Posted September 1, 2018 Author Posted September 1, 2018 12 hours ago, Cadiboo said: Isn’t that a normal crafting table texture? make a custom block, look at BlockWorkbench and ContainerWorkbench and GuiWorkbench and make custom versions of them Now, I need to make four classes? Or three? Quote My Mods: More Strenghtened Tools Mod: https://www.curseforge.com/minecraft/mc-mods/mstm
H_SerhatY Posted September 2, 2018 Author Posted September 2, 2018 (edited) On 9/1/2018 at 7:17 PM, Draco18s said: It's in net.minecraft.client I make custom version of BlockWorkbench. But I can't be sure doing it right. package com.H_SerhatY.MoreStrenghtenedToolsMod.blocks; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.init.Blocks; import net.minecraft.inventory.Container; import net.minecraft.inventory.ContainerWorkbench; import net.minecraft.stats.StatList; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; import net.minecraft.util.math.BlockPos; import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.TextComponentTranslation; import net.minecraft.world.IInteractionObject; import net.minecraft.world.World; public class MSTMWorkbench extends Block { protected MSTMWorkbench() { super(Material.IRON); this.setCreativeTab(CreativeTabs.DECORATIONS); } /** * Called when the block is right clicked by a player. */ public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) { if (worldIn.isRemote) { return true; } else { playerIn.displayGui(new MSTMWorkbench.InterfaceCraftingTable(worldIn, pos)); playerIn.addStat(StatList.CRAFTING_TABLE_INTERACTION); return true; } } public static class InterfaceCraftingTable implements IInteractionObject { private final World world; private final BlockPos position; public InterfaceCraftingTable(World worldIn, BlockPos pos) { this.world = worldIn; this.position = pos; } /** * Get the name of this object. For players this returns their username */ public String getName() { return "mstm_workbench"; } /** * Returns true if this thing is named */ public boolean hasCustomName() { return false; } /** * Get the formatted ChatComponent that will be used for the sender's username in chat */ public ITextComponent getDisplayName() { return new TextComponentTranslation(Blocks.CRAFTING_TABLE.getUnlocalizedName() + ".name", new Object[0]); } public Container createContainer(InventoryPlayer playerInventory, EntityPlayer playerIn) { return new ContainerWorkbench(playerInventory, this.world, this.position); } public String getGuiID() { return "mstm:workbench"; } } } @Cadiboo Edited September 3, 2018 by H_SerhatY Quote My Mods: More Strenghtened Tools Mod: https://www.curseforge.com/minecraft/mc-mods/mstm
Cadiboo Posted September 3, 2018 Posted September 3, 2018 21 hours ago, H_SerhatY said: I make custom version of BlockWorkbench. But I can't be sure doing it right. package com.H_SerhatY.MoreStrenghtenedToolsMod.blocks; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.init.Blocks; import net.minecraft.inventory.Container; import net.minecraft.inventory.ContainerWorkbench; import net.minecraft.stats.StatList; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; import net.minecraft.util.math.BlockPos; import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.TextComponentTranslation; import net.minecraft.world.IInteractionObject; import net.minecraft.world.World; public class MSTMWorkbench extends Block { protected MSTMWorkbench() { super(Material.IRON); this.setCreativeTab(CreativeTabs.DECORATIONS); } /** * Called when the block is right clicked by a player. */ public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) { if (worldIn.isRemote) { return true; } else { playerIn.displayGui(new MSTMWorkbench.InterfaceCraftingTable(worldIn, pos)); playerIn.addStat(StatList.CRAFTING_TABLE_INTERACTION); return true; } } public static class InterfaceCraftingTable implements IInteractionObject { private final World world; private final BlockPos position; public InterfaceCraftingTable(World worldIn, BlockPos pos) { this.world = worldIn; this.position = pos; } /** * Get the name of this object. For players this returns their username */ public String getName() { return "mstm_workbench"; } /** * Returns true if this thing is named */ public boolean hasCustomName() { return false; } /** * Get the formatted ChatComponent that will be used for the sender's username in chat */ public ITextComponent getDisplayName() { return new TextComponentTranslation(Blocks.CRAFTING_TABLE.getUnlocalizedName() + ".name", new Object[0]); } public Container createContainer(InventoryPlayer playerInventory, EntityPlayer playerIn) { return new ContainerWorkbench(playerInventory, this.world, this.position); } public String getGuiID() { return "mstm:workbench"; } } } @Cadiboo What’s going wrong? I can see some obvious small errors, and you probably aren’t using your GUI instead of vanilla’s but I can see anything horrible wrong except for that you copy pasted everything and didn’t change most of the logic Quote About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
H_SerhatY Posted September 4, 2018 Author Posted September 4, 2018 10 hours ago, Cadiboo said: What’s going wrong? I can see some obvious small errors, and you probably aren’t using your GUI instead of vanilla’s but I can see anything horrible wrong except for that you copy pasted everything and didn’t change most of the logic Okey. Maybe I need to start with basic things. What I know: - Making Items - Making Blocks - Making Tools - Making Armors But I can't select anything basic except this ones. Because there is no basic things except this ones. Quote My Mods: More Strenghtened Tools Mod: https://www.curseforge.com/minecraft/mc-mods/mstm
Animefan8888 Posted September 4, 2018 Posted September 4, 2018 1 minute ago, H_SerhatY said: Okey. Maybe I need to start with basic things. Well there is the most basic thing, the Java language. Do you know this one. 1 Quote 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.
ButterAleks Posted March 10, 2019 Posted March 10, 2019 On 9/1/2018 at 1:57 PM, H_SerhatY said: I'm looked at this but I can't find the GuiWorkbench, I find only thing related, GuiCrafting. Edit: Oh, it's VERY HARD. At least, I'm seeing it's VERY HARD. where did you find GuiWorkbench? i have looked all over net.client.gui and i couldn't find it Quote
DavidM Posted March 10, 2019 Posted March 10, 2019 54 minutes ago, ButterAleks said: where did you find GuiWorkbench? i have looked all over net.client.gui and i couldn't find it 1. Do not necrothread. Make a new thread. 2. Use your IDE. The search function exists for a reason. Quote 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.
Recommended Posts
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.