mohamed zenthen

build an elytra racing mod that contains full settings ui that you can edit the settings of the game. the blocks that will be included in the game are the start game button, back to lobby button, check point block, race end block and race start block. when you click at the start game button or back to lobby button it will teleport you to a specific place and you can edit in the settings what will be that place. after clicking on the start button you will be teleported to the player queue system that will automatically teleport you to the race when the amount of players need to start the game set in the settings. for the leader board system the first, second and third places will get a specific item reward after finishing the race. the rewards can also be set in the settings menu. the settings menu ui can only be accssessd by the admin. make the settings ui be accessed by a command or an item in the settings.

Kodari AI
KodariOct 16 at 12:42 am 16
ElytraRaceManager
An elytra racing mod with a comprehensive admin settings UI. Includes start game button, back to lobby button, checkpoint blocks, race start/end blocks. Admin configures teleport locations, player queue system with configurable player count, and podium rewards (1st, 2nd, 3rd place items). Settings UI accessible via command or item, admin-only. Players automatically teleport to race when queue fills, then receive item rewards upon finishing.
  1. Set up the Fabric 26.3 project and survival-ready race blocks.

  2. Add server-side queue, race/checkpoint tracking, configurable locations and podium rewards.

  3. Add an admin-only settings command and owo-ui screen for editing those settings.

Created the Elytra Race Fabric 26.3 mod with an admin-only settings UI, queue matchmaking, checkpoint tracking, finish placement, and configurable rewards.

  • Admins open the settings with /elytrarace settings. It requires command-admin permission; the server also checks permission when settings are saved.

  • Settings include the minimum queue size, lobby/queue/race destinations, and the item and count rewarded for each of the top three finishers. Enter destinations as dimension,x,y,z,yaw,pitch. Settings persist in config/elytrarace.properties.

  • Clicking the Race Queue Button joins the queue and teleports the player to the queue destination. When enough players have joined, they’re sent to the race destination. Touch the Race Start Gate to begin, then checkpoints and the Race Finish Gate to record progress and finish.

  • Added all five blocks to the Functional Blocks tab, with textures, names, mining tags, loot tables, and survival crafting recipes:

    • Race Queue Button: 4 iron ingots, 4 redstone, 1 green wool.

    • Return to Lobby Button: 4 iron ingots, 2 redstone, 1 blue wool, 1 ender pearl.

    • Race Checkpoint: 4 iron ingots, 4 green wool, 1 emerald.

    • Race Finish Gate: 4 gold ingots, 4 black concrete, 1 redstone.

    • Race Start Gate: 4 iron ingots, 2 white wool, 2 redstone, 1 diamond.

The default destinations are placeholders at minecraft:overworld,0,80,0,0,0; configure them before running a race.

mohamed zenthen

it gives that error when creating new world please fix

📎 1 file 5,508 chars
📄
pasted-code-1792112079396.txt
txt 56 lines
▶
>> Errors in element elytrarace:start_game_button:
java.lang.IllegalStateException: Failed to parse elytrarace:start_game_button from pack elytrarace
	at knot//net.minecraft.resources.RegistryLoadTask$PendingRegistration.loadFromResource(RegistryLoadTask.java:111)
	at knot//net.minecraft.resources.ResourceManagerRegistryLoadTask.mixinextras$bridge$loadFromResource$17(ResourceManagerRegistryLoadTask.java)
	at knot//net.minecraft.resources.ResourceManagerRegistryLoadTask.wrapOperation$zzc000$fabric-advancement-api-v1$modifyAdvancement(ResourceManagerRegistryLoadTask.java:550)
	at knot//net.minecraft.resources.ResourceManagerRegistryLoadTask.mixinextras$bridge$wrapOperation$zzc000$fabric-advancement-api-v1$modifyAdvancement$19(ResourceManagerRegistryLoadTask.java)
	at knot//net.minecraft.resources.ResourceManagerRegistryLoadTask.wrapOperation$zio000$fabric-loot-api-v3$modifyLootTable(ResourceManagerRegistryLoadTask.java:1550)
	at knot//net.minecraft.resources.ResourceManagerRegistryLoadTask.lambda$load$2(ResourceManagerRegistryLoadTask.java:46)
	at knot//net.minecraft.util.thread.ParallelMapTransform$Container.applyOperation(ParallelMapTransform.java:89)
	at knot//net.minecraft.util.thread.ParallelMapTransform$BatchedTaskSplitter.lambda$createTask$0(ParallelMapTransform.java:213)
	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1825)
	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1817)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:511)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1450)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:2019)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:187)
Caused by: java.lang.IllegalStateException: Map entry 'I' : Failed to parse either. First: No key fabric:type in MapLike[{"item":"minecraft:iron_ingot"}]; Second: Failed to parse either. First: Not a string: {"item":"minecraft:iron_ingot"}; Second: Failed to parse either. First: Not a json array: {"item":"minecraft:iron_ingot"}; Second: Not a string: {"item":"minecraft:iron_ingot"}
	at knot//com.mojang.serialization.DataResult$Error.getOrThrow(DataResult.java:287)
	at knot//com.mojang.serialization.DataResult.getOrThrow(DataResult.java:81)
	at knot//net.minecraft.resources.RegistryLoadTask$PendingRegistration.loadFromResource(RegistryLoadTask.java:109)
	... 13 more
[03:53:32] [Render thread/ERROR]: Negative index in crash report handler (14/16)
[03:53:32] [Render thread/ERROR]: Error executing task on Client
net.minecraft.ReportedException: Registry Loading
	at knot//net.minecraft.client.MouseHandler.onButton(MouseHandler.java:129)
	at knot//com.mojang.blaze3d.platform.SDLEventHandler.lambda$handleMouseButtonEvent$0(SDLEventHandler.java:108)
	at knot//net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:173)
	at knot//net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:23)
	at knot//net.minecraft.util.thread.BlockableEventLoop.execute(BlockableEventLoop.java:114)
	at knot//com.mojang.blaze3d.platform.SDLEventHandler.handleMouseButtonEvent(SDLEventHandler.java:108)
	at knot//com.mojang.blaze3d.platform.SDLEventHandler.pollEvents(SDLEventHandler.java:45)
	at knot//com.mojang.blaze3d.systems.RenderSystem.pollEvents(RenderSystem.java:168)
	at knot//net.minecraft.client.Minecraft.run(Minecraft.java:966)
	at knot//net.minecraft.client.main.Main.main(Main.java:292)
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:517)
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:72)
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
	at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:115)
	at org.prismlauncher.EntryPoint.listen(EntryPoint.java:129)
	at org.prismlauncher.EntryPoint.main(EntryPoint.java:70)
Caused by: java.lang.IllegalStateException: Failed to load registries due to errors
	at knot//net.minecraft.resources.RegistryDataLoader.createReportWithBriefInfo(RegistryDataLoader.java:313)
	at knot//net.minecraft.resources.RegistryDataLoader.logErrors(RegistryDataLoader.java:294)
	at knot//net.minecraft.resources.RegistryDataLoader.lambda$load$2(RegistryDataLoader.java:263)
	at knot//net.minecraft.resources.RegistryDataLoader.mdf93534$fabric-registry-sync-v0$lambda$thenApplyAsync$1$1(RegistryDataLoader.java:565)
	at java.base/jdk.internal.vm.ScopedValueContainer.callWithoutScope(ScopedValueContainer.java:162)
	at java.base/jdk.internal.vm.ScopedValueContainer.call(ScopedValueContainer.java:147)
	at java.base/java.lang.ScopedValue$Carrier.call(ScopedValue.java:419)
	at knot//net.minecraft.resources.RegistryDataLoader.mdf93534$fabric-registry-sync-v0$lambda$thenApplyAsync$0$0(RegistryDataLoader.java:565)
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:667)
	at java.base/java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:504)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:511)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1450)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:2019)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:187)
Kodari AI
KodariOct 16 at 12:59 am 1

Plan:

  • Replace the outdated { "item": ... } ingredient objects with the 26.3 ingredient-ID string format.

  • Apply the fix across all five block recipes, since they share the same invalid format.

Fixed the world-creation error by changing recipe ingredients to the Minecraft 26.3 format. Updated all five race-block recipes, since they all used the outdated { "item": "..." } format.

mohamed zenthen

now lets make the 2.0 version of this mod, firstly for the checkpoint, race end blocks there will be a seen wall that when you walk through it the block will perform the action given. for example when you walk through the race end wall the race will end and your position will appear as an ui then you can get your reward (if you were 1st, 2nd or 3rd). also for the checkpoint when you move through its wall a title will appear (checkpoint reached) so when you fall in void you will get back to the checkpoint and complete the race. be on mind the the wall will be like 7x7 and semi transparent according to these colours: race end: red, race start: green, checkpoint: yellow. also whenever a race is full of players and already started, the players who click on the start race button will not join the race unless the first race finishes. so i want you to add this feature and as well add an "add race" button in the settings so that players will join the other race place and start a new race completely diffrent from the first race. you can add races as much as you want (max 50), and every race place will have a custom coordinates that you can edit also in the settings. also add the race countdown, that whenever the amont of players given join the races a 1,2,3 countdown will start before the race. unti the countdown, the players will be freezed in a place until the countdown finish. you can also adjust the player place until the countdown in the settings.

Kodari AI
KodariOct 16 at 1:59 am 10

Plan:

  1. Trace the existing race blocks, world interactions, and player/race state.

  2. Implement race walls, checkpoint respawns, finish placements, and rewards.

  3. Add independent race slots, capacity handling, countdown/freezing, and configurable race locations in settings.

  4. Verify every changed entry point against the 26.3 sources and compile.

Implemented the main 2.0 race features:

  1. 7×7 race gates: Checkpoint, finish, and start markers display semi-transparent yellow, red, and green walls. Passing through a checkpoint shows “Checkpoint reached”; after death, racers respawn at their latest checkpoint. Passing the finish shows the racer’s place, and the top three receive their configured rewards.

  2. Multiple race places: Added an Add Race button in settings, supporting up to 50 places. Each has editable countdown staging and race-start coordinates. Players are assigned to an available race; if all places are running, they wait for one to open.

  3. Countdown and freeze: When a race reaches its configured minimum players, a 3–2–1 countdown starts. Queued racers are held at that race’s staging coordinates until it ends. Race capacity is configurable too.

For each course, place its start, checkpoint, and finish marker blocks near that race’s configured coordinates. Gates are vertical planes; racers pass through them along the Z axis.

mohamed zenthen

now lets make some more edits. first of all for each race the countdown place is configured for each player. for example when all players join the race, dont make them all fixed in one position, make them fixed in diffrent positions. and these position coordinates can be edited in the race settings according to the maximum players set for the race. make also the amount of players needed to join equal to the maximum players in a race. also when a player join the race he will automatically given an item called "leave the race" so when players interact with this item they will teleport to lobby. but once they finish the race and clicked on the back to lobby button, the item will be removed from there inventory. during the race the item cannot be removed from the inventory unless they interact with it and left the race it will be automatically removed. now for the checkpoint, race start, race end blocks , just when touching there walls they will perform the action given.

Kodari AI
KodariOct 16 at 3:03 am 7
  1. Make countdown staging positions per racer, editable per race up to that race’s player cap.

  2. Start countdown only when the race reaches its maximum player count.

  3. Add a protected “Leave the Race” item that returns racers to the lobby and is removed on exit or finish.

  4. Trigger start, checkpoint, and finish actions when players touch the gate walls.

  1. Per-racer staging positions are now configurable per race and assigned individually during the countdown.

  2. Next I’m making race admission wait for the full configured capacity before the countdown begins.

  1. Countdown now waits for every slot to fill; the separate minimum-player setting is removed. Next: the leave-race item and its inventory protections.

  1. The “Leave the Race” item is now registered, given to racers, usable to return to the lobby, and protected from ordinary inventory clicks, drops, and offhand swaps. I’m changing the gates from crossing-plane detection to actual wall contact next.

  1. Individual countdown positions: Each racer is assigned a distinct staging coordinate, with editable settings for each player up to the race’s configured capacity. If you increase capacity, save and reopen settings to edit the added positions.

  2. Full-capacity countdown: A race countdown now begins only when the race is full; the separate minimum-player setting has been removed.

  3. Leave the Race item: Players receive the item when they join a race or its wait queue. Right-clicking it returns them to the configured lobby. While queued or racing, normal inventory clicks, drops, and offhand swaps can’t remove it. It’s removed when they leave or finish.

  4. Gate contact: Start, checkpoint, and finish actions now trigger when the player touches the visible wall, rather than requiring a specific plane crossing.

The new item is available in the Functional Blocks creative tab and is given automatically when joining a race.

mohamed zenthen

can you fix that? the save changes button in the settings is missing? as well can you allow changing the amount of players to 1 (just for testing). as well the leave race item when join the race or queue is still removed from the inventory fix that also.

Kodari AI
KodariOct 16 at 3:42 am 2
  1. Restore the settings save control.

  2. Allow a one-player race for testing.

  3. Keep the leave item in inventory while queued or racing.

  1. The settings screen now has an explicit Save Changes button, and the player limit accepts 1. I’m tracing why the leave item still disappears when joining or queueing.

  1. Added a visible Save Changes button to the settings screen.

  2. Lowered the race capacity minimum to 1, so a one-player test race can start.

  3. Fixed the leave item grant: it now goes into a non-selected inventory slot first, avoiding accidental use when it was placed in the player’s hand. The server also restores it while the player remains queued or racing; existing inventory protections still apply.

mohamed zenthen

now lets make these edits, first of all remove completely the green start race block and after the countdown finish the race will start automatically. also instead of showing checkpoint reached message as a title, make it in chat with coloured yellow. also add these sounds to the countdown sound, and checkpoint sound. (make them according to the names of the mp3 in the project root)

Kodari AI
KodariOct 16 at 4:25 am 2
  1. Remove the green start block and start the race automatically when its countdown ends.

  2. Send checkpoint notifications in yellow chat instead of as a title.

  3. Hook countdown and checkpoint sounds to the MP3 files in the project root.

  1. Removed the green start-race block and its recipe, loot table, models, and registration. Racers now start automatically when the countdown ends.

  2. Checkpoint notifications now appear in yellow chat instead of as titles.

  3. Wired countdown and checkpoint sound events to countdown and checkpoint. The provided files are MP3s, which Minecraft 26.3 can’t play directly—it requires Ogg Vorbis .ogg files under the mod’s sounds folder. The sound hooks are in place, but they won’t be audible until matching .ogg files are available.

mohamed zenthen

ok i converted them to ogg now apply them

Kodari AI
KodariOct 16 at 4:28 am 1

Both converted files are present; the existing sound events already reference these names. I’m placing them in the resource paths Minecraft expects.

Moved checkpoint.ogg and countdown.ogg into the mod’s assets/elytrarace/sounds/ folder. They match the existing sound definitions and event names.

mohamed zenthen

can you fix that the sound still dosent work

Kodari AI
KodariOct 16 at 4:45 am 2

Fixed the sound playback: ServerPlayer.playSound(...) excludes that player from the broadcast, so the race sounds weren’t reaching the racer. Countdown and checkpoint sounds now send a sound packet directly to each player.

mohamed zenthen

can you fix that? in the countdown the sound is reapeating every second in the countdown, can you just make the countdown sound play once from only the first tick in the countdown?

Kodari AI
KodariOct 16 at 5:09 am 1

The countdown sound now plays once when the countdown begins; the later countdown titles no longer replay it.

mohamed zenthen

now for each race in settings add the queue distenation position do you can edit its coordinates. as well the leave game item when given it will be given in the hotbar slot 1

Kodari AI
KodariOct 16 at 5:34 am 1

I’ll handle this in two parts: add an editable queue destination position to each race’s settings, then put the leave-game item in hotbar slot 1.

Each race’s settings now label the editable per-player queue coordinates as Queue destination. The coordinate fields were already supported by the saved settings; this makes them clear in the UI.

The leave-race item is now placed in the first hotbar slot (slot 1). If that slot is occupied, its item is moved to an empty inventory slot or dropped if the inventory is full.

mohamed zenthen

now add an option in the settings that you can edit the time for each race. after joining the race the a time counting will apper at the top of the screen

Kodari AI
KodariOct 16 at 5:41 am 2
  1. Add a saved, per-race duration setting to the existing settings UI.

  2. Show each racer a countdown at the top of the screen after joining, ending the race when time expires.

  1. Added a Race time limit (seconds) setting for each race, saved with its settings. It defaults to 300 seconds and can be set from 1 to 3,600.

  2. When the race starts, racers see the remaining time in a boss bar at the top of the screen. When time runs out, unfinished racers are returned to the lobby without a podium reward.

mohamed zenthen

can you fix that? the countdown player postion for each race in settings are removed. as well can you fix that you cannot rotate the blocks that contains walls it only faces to one direction (the checkpoint and finish walls) . as well after touching the finish race wall can you make it play the sound entity.player.levelup . as well can you add a text above the start game block showing how many races are playing now? for example: Races playing: 2/40 it will be according to the total number of races in settings. as well can you add at the top left the position of the player in the race ? for example Your position is 1/6, also will be according to the number of players. also when a player didnt finish the race at the time a red title will appear: Eliminated . also set the maximum number of players for each race is 40. also change the item look of the exit game item make it more simpler please. also add these 3 new blocks: booster 1: increase speed of a player by 1.5 for 2 seconds. booster 2 : increases speed of a player by 2 for 2 seconds. booster 3: increases the speed of player by 3. and each block of them have a wall and you can rotate the block as well as its wall according to player direction when putting it. there wall colours will be: booster 1: light blue. booster 2: blue. booster 3: purple. also make the colour of the finish race wall green. also can you increase the render distance of the walls? when i just go far from them about 10 blocks they dissappear. so, make a new tab in the settings to set how much far (blocks) you can see the walls. max 300 blocks.

Kodari AI
KodariOct 17 at 9:33 am 17
  1. Restore per-race countdown/player position settings and verify they still save and apply.

  2. Make checkpoint, finish, and booster walls rotate with placement; color finish green.

  3. Play the level-up sound on finishing and show the active-race count above the start block.

  4. Show race placement, display an “Eliminated” title on timeout, and cap each race at 40 players.

  5. Simplify the exit item, add three speed booster blocks, and add a configurable wall render distance (up to 300 blocks).

Implemented the requested race updates:

  • Restored the per-player countdown-position settings for each race. Checkpoint and finish walls now face the placed block’s direction, and finish walls are green.

  • Finishing plays entity.player.levelup. Start blocks show Races playing: x/y; racers see Your position is N/M at the top left, ranked by checkpoints reached with start order breaking ties. Timeouts show a red Eliminated title.

  • Each race is capped at 40 players. The exit item icon is simplified; players still receive it in hotbar slot 1 when they join.

  • Added three directional speed-booster blocks with matching colored walls: light blue (1.5×), blue (2×), and purple (3×), each boosting for 2 seconds.

  • Added a Wall Visibility settings tab with a distance slider from 1 to 300 blocks (default 64). Walls are discovered as chunks load, avoiding a large brute-force scan.

Survival crafting: Booster I uses 4 iron ingots, 4 light-blue wool, and 1 quartz; Booster II uses 4 diamonds, 4 blue wool, and 1 emerald; Booster III uses 4 netherite ingots, 4 purple wool, and 1 nether star. Each booster drops itself when mined with the required pickaxe tier.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
manifest.kod
settings.gradle
Code
54 1,760
src/client/java/com/kodari/elytrarace/client/ElytraRaceClient.java
package com.kodari.elytrarace.client;

import com.kodari.elytrarace.RaceNetworking;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking;
import net.minecraft.client.Minecraft;

public class ElytraRaceClient implements ClientModInitializer {
    @Override
    public void onInitializeClient() {
        RaceWallRenderer.initialize();
        ClientPlayNetworking.registerGlobalReceiver(RaceNetworking.Payload.TYPE, (payload, context) -> {
            if (payload.action().equals("open")) {
                Minecraft.getInstance().gui.setScreen(RaceSettingsScreen.create(payload.data()));
            }
        });
    }
}