maciejp_30073

You are a Minecraft Java edition Plugin Developer using PaperMC 1.21.11. Break down your probkem into clear, sequecial steps. Be sure to Check your answer for logical or factual errors before finalizing. If any part is uncertain, explicitly state the uncertainty. Ensure that your techniques and code are compatible with Minecraft Java edition and PaperMC 1.21.11, not bedrock edition. Solve this as if it will be reviewed by a Minecraft Developer expert. Feel free to use any resources or encourage me to ask for other resources you can provide.

Now, please create me...

Make me a minecraft plugin that a 2 vehicles to the game. one ground transportation and one air transport. They should be custom made and obtainable in survival minecraft (crafting recipes and such).

Return me a .tar if possible. otherwise .zip

Kodari AI
KodariApr 17 at 4:41 pm 15,947 (v2)

I’ll create a custom vehicles plugin that adds a ground motorcycle and an air helicopter to the game, both craftable in survival mode.

CustomVehicles
A plugin that adds custom vehicles to Minecraft including a high-speed motorcycle for ground transportation and a flyable helicopter for air travel. Both vehicles are fully craftable in survival mode with custom recipes. Features realistic controls, particle effects, fuel system, and vehicle persistence. Players can craft, ride, and own their vehicles with proper mounting mechanics and smooth movement.

Perfect! Now let me fix a couple of issues I spotted:


CustomVehicles Plugin Complete!

This plugin adds two custom vehicles:

  • Motorcycle (ground vehicle) - Fast ground transportation with exhaust particle effects

  • Helicopter (air vehicle) - Full 3D flight with rotor particle effects

Key Features:

  • Craftable in survival mode with custom shaped recipes

  • Fuel system (configurable per vehicle)

  • Particle effects for immersion

  • Smooth WASD movement controls

  • For helicopters: look up to ascend, look down to descend

  • Admin commands: /vehicle give, /vehicle remove, /vehicle list

  • Permissions system

  • Fully configurable speeds, fuel consumption, and recipes

Important Notes:

  1. The vehicles use custom model data (1001 for motorcycle, 1002 for helicopter)

  2. You’ll need to create custom resource pack models for these items or use the default horse armor items

  3. Right-click the vehicle item to spawn it

  4. Right-click the spawned vehicle to mount it

  5. Add fuel by right-clicking with coal, coal blocks, or lava buckets while mounted or near the vehicle

The plugin is ready for compilation and use on PaperMC 1.21+!

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
IMPORTANT.txt
Code
16 1,214
src/main/java/com/customvehicles/CustomVehicles.java
package com.customvehicles;

import com.customvehicles.commands.VehicleCommand;
import com.customvehicles.listeners.VehicleListener;
import com.customvehicles.managers.ConfigManager;
import com.customvehicles.managers.RecipeManager;
import com.customvehicles.managers.VehicleManager;
import com.customvehicles.tasks.VehicleMovementTask;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public final class CustomVehicles extends JavaPlugin {

    @Getter
    private static CustomVehicles instance;

    private ConfigManager configManager;
    private RecipeManager recipeManager;
    private VehicleManager vehicleManager;
    private VehicleMovementTask movementTask;

    @Override
    public void onEnable() {
        instance = this;

        saveDefaultConfig();

        this.configManager = new ConfigManager(this);
        this.vehicleManager = new VehicleManager(this);
        this.recipeManager = new RecipeManager(this);

        this.recipeManager.registerRecipes();

        getServer().getPluginManager().registerEvents(new VehicleListener(this), this);

        VehicleCommand vehicleCommand = new VehicleCommand(this);
        getCommand("vehicle").setExecutor(vehicleCommand);
        getCommand("vehicle").setTabCompleter(vehicleCommand);

        this.movementTask = new VehicleMovementTask(this);
        this.movementTask.runTaskTimer(this, 0L, 1L);

        getLogger().info("CustomVehicles has been enabled!");
    }

    @Override
    public void onDisable() {
        if (vehicleManager != null) {
            vehicleManager.removeAllVehicles();
        }

        if (movementTask != null) {
            movementTask.cancel();
        }

        getLogger().info("CustomVehicles has been disabled!");
    }
}