gabehsjs

Develop a custom driving plugin that introduces a vehicle system with enhanced control features, allowing players to drift around corners and use nitro boosts for speed bursts. Include vehicle customization options, configurable nitro duration and cooldown, and support for various vehicle types with different handling characteristics. Additionally, implement sound effects and visual indicators for drifting and nitro activation to enhance the gameplay experience.

Kodari AI
KodariApr 18 at 5:30 pm 14,004 (v2)

I’ll create a comprehensive driving plugin with vehicles, drifting mechanics, nitro boosts, and customization features.

DriftDrive
An advanced vehicle system plugin that brings realistic driving mechanics to Minecraft. Features multiple vehicle types with unique handling characteristics, drift mechanics around corners, nitro boost system with configurable duration and cooldown, extensive customization options for vehicle appearance and performance, immersive sound effects and particle displays for drifting and nitro activation, and per-vehicle statistics tracking.

Now I’ll create the remaining files for the plugin:

All files created successfully! The DriftDrive plugin now includes a complete vehicle system with drifting mechanics, nitro boosts, customization options, multiple vehicle types with unique handling characteristics, sound effects, and particle displays for an immersive driving experience.

gabehsjs

it does not let me move around and give it a custom model

Kodari AI
KodariApr 18 at 6:00 pm 21,269 (v2)

I’ll read the current implementation to fix the movement issue and add custom model support.

I can see the issues. The vehicle doesn’t respond to player input properly because it only checks PlayerMoveEvent (which doesn’t work well when riding), and there’s no custom model support. Let me fix both issues:

Now I’ll fix the movement system and add custom model support:

Now I’ll update the necessary files to fix movement controls and add custom model support:

The plugin has been updated with:

Movement System Fixed:

  • Left-click to accelerate forward

  • Shift to reverse/brake

  • Look around with mouse to steer the vehicle

  • Sprint (double-tap W) to activate nitro boost

  • Right-click for horn sound

Custom Model Support Added:

  • Added custom-model-data field to vehicle configuration

  • Set a custom model data number (e.g., “1001”) to use resource pack models

  • Example: race_car has custom-model-data set to “1001”

  • Leave empty (“”) to use default block appearance

To use custom models, create a resource pack with custom model data for the item specified in the config!

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
14 1,128
src/main/java/com/driftdrive/DriftDrive.java
package com.driftdrive;

import com.driftdrive.commands.VehicleCommand;
import com.driftdrive.listeners.DriftListener;
import com.driftdrive.listeners.NitroListener;
import com.driftdrive.listeners.VehicleListener;
import com.driftdrive.managers.CustomizationManager;
import com.driftdrive.managers.DriftManager;
import com.driftdrive.managers.NitroManager;
import com.driftdrive.managers.VehicleManager;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class DriftDrive extends JavaPlugin {
    
    private VehicleManager vehicleManager;
    private DriftManager driftManager;
    private NitroManager nitroManager;
    private CustomizationManager customizationManager;
    
    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        this.vehicleManager = new VehicleManager(this);
        this.driftManager = new DriftManager(this);
        this.nitroManager = new NitroManager(this);
        this.customizationManager = new CustomizationManager(this);
        
        getCommand("vehicle").setExecutor(new VehicleCommand(this));
        
        getServer().getPluginManager().registerEvents(new VehicleListener(this), this);
        getServer().getPluginManager().registerEvents(new DriftListener(this), this);
        getServer().getPluginManager().registerEvents(new NitroListener(this), this);
        
        vehicleManager.startVehicleUpdateTask();
        
        getLogger().info("DriftDrive has been enabled!");
    }
    
    @Override
    public void onDisable() {
        if (vehicleManager != null) {
            vehicleManager.removeAllVehicles();
        }
        
        getLogger().info("DriftDrive has been disabled!");
    }
}