PromptBase
Close icon
General
Home
Marketplace
Hire
Create
Login
Sell
Explore
🤖 GPT

Create Mods And Addons For Your Games

Create Mods And Addons For Your Games gpt prompt mini thumbnail
1Heart icon
Favorites
28Eye icon
Views
GPT-4
TestedTick icon
TipsTick icon
Know little to nothing about scripting? Have a mod/addon idea for your favorite game, but don't know where to start? This prompt will fix that!
...more
$3.99
Get prompt
After purchasing, you will gain access to the prompt file which you can use with GPT or the app builder. You'll receive 20 free generation credits with this purchase. By purchasing this prompt, you agree to our terms of service.
Over 1 month ago

Prompt Details

Model
Chat - GPT-4 (gpt-4)
Token size
265 ($0.00800 / call)
Example input
My laptop cant hit f3+G at the same time. This means I cant use the option to show chunk borders. I'd like to make a mod that lets me bind this function to a button of its own
Example output
Understood. We will create a mod that allows you to bind the "Show Chunk Borders" function to a custom key. We'll start by creating a basic mod structure using Forge. Step 1: Import Forge MDK to your IDE Extract the downloaded Forge MDK to a folder. Open your IDE (Eclipse or IntelliJ IDEA), and choose "Import Project" or "Open Project". Navigate to the extracted Forge MDK folder and select it. Step 2: Modify build.gradle file In the Project Explorer, locate and open the "build.gradle" file. Change the "group" and "archivesBaseName" to reflect your mod's name and unique identifier. Save the changes. Step 3: Create the mod's main class In the "src/main/java" folder, create a new package (right-click, then "New > Package"). Name it using the format "com.yourname.modid". Inside the package, create a new Java class (right-click, then "New > Class") with the name "Main". In the "Main" class, add the following code: java Copy code package com.yourname.modid; import net.minecraftforge.fml.common.Mod; @Mod("modid") public class Main { } Replace "com.yourname.modid" with your actual package name and "modid" with your unique mod identifier. Now, let's create the custom keybinding: Step 4: Create a new class for the keybinding In the same package as the "Main" class, create a new Java class called "CustomKeybinding". In the "CustomKeybinding" class, add the following code: java Copy code package com.yourname.modid; import net.minecraft.client.Minecraft; import net.minecraft.client.settings.KeyBinding; import net.minecraftforge.client.event.InputEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.client.registry.ClientRegistry; import net.minecraftforge.fml.common.Mod; import org.lwjgl.glfw.GLFW; @Mod.EventBusSubscriber public class CustomKeybinding { private static final KeyBinding showChunkBorders = new KeyBinding("key.show_chunk_borders", GLFW.GLFW_KEY_C, "key.categories.misc"); public static void init() { ClientRegistry.registerKeyBinding(showChunkBorders); } @SubscribeEvent public static void onKeyInput(InputEvent.KeyInputEvent event) { if (showChunkBorders.isPressed()) { Minecraft.getInstance().debugRenderer.toggleChunkBorders(); } } } Replace "com.yourname.modid" with your actual package name. This code creates a new keybinding called "Show Chunk Borders" and binds it to the "C" key by default. You can change the key by modifying the GLFW.GLFW_KEY_C value. Step 5: Initialize the keybinding In the "Main" class, add the following code inside the class body: java Copy code public Main() { CustomKeybinding.init(); } This code initializes the custom keybinding when the mod is loaded. Now, run the mod in your development environment to see if the custom keybinding works. Let me know if it works or not, and I will provide you with the next steps.
Browse Marketplace