Smithed Summit is back! Check it out here!
You are currently on the unstable branch. Click here to go to safety.
Download
Choose Minecraft Version
1.21.1126.2v1.4.1
1.21.1126.1.2v1.4.0
1.21.1126.1.1v1.4.0
1.21.1126.1v1.4.0
1.21.111.21.11v1.4.0
1.21.111.21.7v1.3.4
Close

Shopping Kart

GitHub Smithed Modrinth Discord Powered by StewBeet

šŸ›’ Shopping Kart is a datapack that lets you ride various vehicles in Minecraft, it is not intended to be used in a survival server but rather in a minigame or a custom server.

šŸŽ® Core Commands

  • /function shopping_kart:kart/summon: Spawns a default vehicle
  • /function shopping_kart:kart/switch_model/summon_new_kart: Spawns a vehicle with current player's selected model
  • /trigger shopping_kart.trigger_model set <number>: Sets the current player's selected model to the given number. Special cases are:
    • number > 0: Specific model number
    • -1: Next model
    • -2: Previous model
    • -3: Ride the nearest kart
    • -4: Random model

A kart left without a player can be mounted again with a right click on its top once it has stopped.

āš™ļø Configuration Commands

Fine-tune your shopping kart experience with these configuration commands!

Kart Effects and Controls šŸŽ›ļø

The following tags and scoreboards are applied to the kart entity (tagged shopping_kart.kart). You can run the commands in chat or from command blocks. The examples below affect every currently summoned kart.

EffectCommand to enableCommand to disableWhat it does
Forced accelerationtag @e[tag=shopping_kart.kart] add shopping_kart.forced_accelerationtag @e[tag=shopping_kart.kart] remove shopping_kart.forced_accelerationAccelerates in the kart's facing direction without requiring steering input. By default, the kart follows its passenger's facing direction.
No steeringtag @e[tag=shopping_kart.kart] add shopping_kart.no_steeringtag @e[tag=shopping_kart.kart] remove shopping_kart.no_steeringKeeps the kart's current facing direction instead of following the passenger's yaw. Can be combined with forced acceleration.
Engine offtag @e[tag=shopping_kart.kart] add shopping_kart.engine_offtag @e[tag=shopping_kart.kart] remove shopping_kart.engine_offPrevents normal acceleration from building engine power; any existing power continues to drain.
No griptag @e[tag=shopping_kart.kart] add shopping_kart.no_griptag @e[tag=shopping_kart.kart] remove shopping_kart.no_gripMakes the kart handle as if it were on a slippery surface, regardless of the block underneath it.
Cruise controlscoreboard players set @e[tag=shopping_kart.kart] shopping_kart.cruise_control 1scoreboard players set @e[tag=shopping_kart.kart] shopping_kart.cruise_control 0Holds the current engine level: normal engine drain and steering-driven engine gain are suspended until disabled. Steering still works; boosters can still modify the engine level.
Collisionsscoreboard players set @e[tag=shopping_kart.kart] shopping_kart.collision_factor 1000scoreboard players set @e[tag=shopping_kart.kart] shopping_kart.collision_factor 0Makes a kart, ridden or not, collide with the karts and players on foot it touches, which vanilla never does for an entity carrying passengers. A fast kart hands its speed to what it hits, then the factor pushes them apart: 1000 is the default strength, 5000 is five times stronger. At 0 the kart neither hits nor is hit.
Restitutionscoreboard players set @e[tag=shopping_kart.kart] shopping_kart.restitution 1000scoreboard players set @e[tag=shopping_kart.kart] shopping_kart.restitution 0How much speed a collision gives back. At 1000 a kart hitting a still one stops and hands over all its speed, at 0 both roll on together at half the speed, 500 is the default. Two karts use the lower of their values, and one hit transfers at most 1 block per tick.

For example, put the cruise-control enable command in an impulse command block to activate it once. Use the disable command to return to normal engine drain and acceleration. A repeating command block is not needed.

To give all current karts a temporary reactor boost, set its duration in ticks (20 ticks = 1 second):

scoreboard players set @e[tag=shopping_kart.kart] shopping_kart.reactor_boost 100

The reactor boost increases acceleration and movement for 100 ticks. The score counts down automatically.

A new kart takes its collision factor from #default_collision_factor shopping_kart.data, 1000 by default, and its restitution from #default_restitution shopping_kart.data, 500 by default. A datapack built on Shopping Kart sets them for the karts it summons next:

scoreboard players set #default_collision_factor shopping_kart.data 5000
scoreboard players set #default_restitution shopping_kart.data 1000

Shopping Kart's load function sets them back to their defaults on every /reload, so set them after Shopping Kart has loaded, for instance when your game starts.

A kart pushes a player on foot through the Player Motion API library, so install it next to Shopping Kart. Without it, karts still slow down when they hit a player, but the player is not pushed.

A hit player is not lifted by default. #player_lift shopping_kart.data adds an upward speed to the push, 10000 per block per tick, so a game mode that throws players into the void can send them further (an airborne player loses less speed than one sliding on the ground):

scoreboard players set #player_lift shopping_kart.data 2000

Like the defaults above, it is set back to 0 on every /reload.

The speed_up and speed_down effects are handled automatically while driving: steering input accelerates the kart, and engine power naturally drains when not using cruise control. Drive over magenta glazed terracotta to activate a directional booster.

Surface Settings ⚔

Control how the kart behaves on different surfaces with the shopping_kart:kart_surfaces/ block tags in the datapack's data/shopping_kart/tags/block/kart_surfaces/ folder:

Surface TypeDescription
NormalBlocks not in one of the surface tags
FastColored concrete
SlipperyIce, packed ice, and blue ice
SlowDirt, sand, gravel, grass, and other rough terrain
Very SlowSoul sand, mud, honey blocks, slime blocks, and similar terrain

Edit the corresponding fast.json, slippery.json, slow.json, or very_slow.json block tag to customize which blocks use each surface behavior. The no_grip tag overrides these settings and forces slippery handling.

Special Features 🌟

  • šŸŽļø Directional boosters: Magenta glazed terracotta pushes the kart in the direction the block faces.
  • šŸš€ Reactor boost: Temporarily increases acceleration and movement; activate it with the shopping_kart.reactor_boost scoreboard as shown above.
  • 🌊 Water: Kart buoyancy and vertical movement are adjusted automatically while it is in water.

šŸ“” Signals

A datapack reacts to kart events by adding its functions to these function tags, in its own data/shopping_kart/tags/function/signals/<signal>.json. Shopping Kart calls a signal only when its event happens, so an unused signal costs nothing per tick.

SignalWhen@s, at its positionSelectorsReadable data
#shopping_kart:signals/kart_spawnedA kart is summoned, including the new kart of a model switchThe new kartThe summoning player carries shopping_kart.owner@s shopping_kart.id, the model number in #model shopping_kart.data
#shopping_kart:signals/kart_mountedShopping Kart seats a player: right click on a stopped empty kart, the ride after a summon or a model switch, trigger -3The seated playerThe kart is execute on vehicleThe kart's shopping_kart.id
#shopping_kart:signals/kart_collisionA kart hits another kart and hands it speedThe struck kartshopping_kart.victim: the struck kart and its driver. shopping_kart.attacker: the striking kart and its driverBoth karts' shopping_kart.id, the speed handed over in #j shopping_kart.data (10000 per block per tick)
#shopping_kart:signals/player_hitA kart launches a player on foot, once per hitThe hit playershopping_kart.victim: the player. shopping_kart.attacker: the kart and its driverThe kart's shopping_kart.id, #j shopping_kart.data

The shopping_kart.victim and shopping_kart.attacker tags exist only while the signal runs, so any function in the tag can select them. For example, to credit the driver with a hit:

scoreboard players add @a[tag=shopping_kart.attacker] mygame.hits 1

⭐ Star History

Star History Chart
Smithed

Copyright Ā© 2023-2026 Smithed
Not an official Minecraft product. Not approved by or associated with Mojang Studios