csontgolyo

Develop a Minecraft plugin that adds a fully functional 3D model of the Koenigsegg Jesko as a drivable vehicle. Include customizable speed, acceleration, and handling properties, as well as a unique sound engine and an option for players to modify the car's color and design using in-game currency.

Kodari AI
KodariSep 8 at 5:17 pm 2
JeskoVehiclePlugin
Adds a drivable 3D Koenigsegg Jesko model to Minecraft. Players can spawn the vehicle, drive with adjustable speed, acceleration, and handling. Features a custom sound engine for engine and tire effects. Includes an in-game currency system to purchase color and design modifications, allowing full customization of the car's appearance.
  1. Create the Gradle project and plugin metadata.

  2. Implement configurable Jesko vehicle physics, 3D armor-stand model, engine audio, and driving controls.

  3. Add currency-backed design customization, commands, persistence, and interaction listeners.

Created the Koenigsegg Jesko vehicle plugin with:

  • Configurable speed, acceleration, handling, engine sounds, and designs.

  • 3D armor-stand vehicle model with customizable colors/materials.

  • Drivable pig-based vehicle with forward/reverse controls.

  • /jesko spawn, /jesko remove, /jesko designs, /jesko customize, and /jesko balance.

  • Persistent in-game Jesko credits.

  • Multiple built-in designs: Carbon, Rosso, Azure, and Gold.

  • Vehicle ownership, damage protection, quit cleanup, and permission handling.

  • Gradle build setup and plugin metadata.

csontgolyo

Could you make the model use a bbmodel, with the block rotational rule aplied?

Kodari AI
KodariSep 8 at 5:32 pm 2
  1. Inspect the current vehicle model and rendering flow.

  2. Replace the armor-stand approximation with a .bbmodel-driven display model and apply block rotation rules to its parts.

  3. Update resources/configuration and keep driving, customization, and cleanup behavior intact.

Implemented .bbmodel support with Blockbench block-rotation handling.

Changes include:

  • Added models/jesko.bbmodel resource.

  • Added a Gson-based .bbmodel loader.

  • Replaced armor-stand model parts with Paper BlockDisplay entities.

  • Converted Blockbench cube elements into display transformations.

  • Applied Blockbench element rotation axes, angles, and origins.

  • Added animated wheel rotation based on vehicle speed.

  • Preserved configurable speed, acceleration, handling, sounds, and designs.

  • Preserved in-game material customization by changing display block materials.

  • Added configurable model path:

    YAML
    vehicle:
      model: models/jesko.bbmodel
    
  • Added required Gson and XSeries dependencies.

  • Added manifest.kod for Gson packaging.

The model can now be replaced by editing src/main/resources/models/jesko.bbmodel or changing the configured model path.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
manifest.kod
settings.gradle
Code
17 1,031
src/main/java/com/kodari/jesko/KoenigseggPlugin.java
package com.kodari.jesko;

import com.kodari.jesko.command.JeskoCommand;
import com.kodari.jesko.config.JeskoConfig;
import com.kodari.jesko.currency.CurrencyManager;
import com.kodari.jesko.listener.JeskoListener;
import com.kodari.jesko.model.BbModel;
import com.kodari.jesko.model.BbModelLoader;
import com.kodari.jesko.vehicle.VehicleManager;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

public class KoenigseggPlugin extends JavaPlugin {

    @Getter
    private JeskoConfig jeskoConfig;

    @Getter
    private CurrencyManager currencyManager;

    @Getter
    private VehicleManager vehicleManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();

        jeskoConfig = new JeskoConfig(this);
        currencyManager = new CurrencyManager(this);
        BbModel model;
        try {
            model = new BbModelLoader(this).load(jeskoConfig.getModelPath());
        } catch (Exception exception) {
            getLogger().severe("Unable to load the Jesko bbmodel: " + exception.getMessage());
            getServer().getPluginManager().disablePlugin(this);
            return;
        }
        vehicleManager = new VehicleManager(this, jeskoConfig, model);
        vehicleManager.start();

        JeskoCommand command = new JeskoCommand(this);
        getCommand("jesko").setExecutor(command);
        getCommand("jesko").setTabCompleter(command);
        getServer().getPluginManager().registerEvents(new JeskoListener(this), this);
    }

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