📄
pasted-code-1789115471174.txt
txt
169 lines
▶
Create a professional, lightweight and highly optimized **Minecraft Fabric Motion Blur mod** designed for smooth PvP gameplay, cinematic gameplay, and content creation.
### Core Feature — Adjustable Motion Blur
Implement a real-time motion blur system that can be controlled through chat commands.
The main command should be:
`/motionblur `
The percentage must support values from **0% to 100%**.
Examples:
* `/motionblur 0` → Motion Blur OFF
* `/motionblur 10` → Very subtle blur
* `/motionblur 25` → Light blur
* `/motionblur 50` → Medium blur
* `/motionblur 75` → Strong blur
* `/motionblur 100` → Maximum blur
The command should validate the input and prevent values below 0 or above 100.
Also add:
`/motionblur on` → Enable Motion Blur using the saved intensity
`/motionblur off` → Disable Motion Blur
`/motionblur status` → Display the current Motion Blur percentage
`/motionblur reset` → Reset the setting to the default value
Display clean and minimal feedback messages in chat whenever the setting is changed.
### Mod Menu Integration
Add full **Mod Menu** support.
Create a polished configuration screen where players can:
* Enable/disable Motion Blur
* Adjust Motion Blur strength from **0–100%**
* Use a slider for precise adjustment
* See the current percentage while moving the slider
* Reset settings to default
* Apply changes instantly without restarting Minecraft
The Mod Menu settings and `/motionblur` command must stay synchronized. Changing the percentage through the Mod Menu should immediately update the command value, and changing it through the command should update the configuration.
### Motion Blur System
Create a smooth, visually appealing motion blur effect that reacts naturally to camera movement and player rotation.
The effect should:
* Be smooth rather than choppy
* Scale naturally according to the selected percentage
* Work correctly in first-person gameplay
* Work correctly in third-person gameplay
* Avoid excessive screen distortion
* Avoid causing severe FPS drops
* Avoid interfering with Minecraft's HUD
* Avoid blurring static UI elements
* Work properly with common Fabric rendering environments
* Be optimized for Minecraft PvP gameplay
At 0%, the effect should be completely disabled.
### Performance
Performance is extremely important.
The mod should:
* Have minimal FPS impact
* Avoid unnecessary rendering calculations
* Avoid memory leaks
* Avoid excessive GPU usage
* Avoid causing stuttering during fast camera movements
* Handle high-FPS gameplay smoothly
* Be suitable for competitive Minecraft PvP
Prefer an efficient rendering implementation rather than repeatedly performing expensive operations every frame.
### Configuration Persistence
Save the player's Motion Blur settings locally so that the selected percentage remains after restarting Minecraft.
Store:
* Enabled/disabled state
* Motion Blur percentage
The default value should be **50%**.
### Watermark / Branding
Add a subtle, professional watermark:
**Made By SpideyyVerse**
The watermark should appear in an appropriate location without obstructing gameplay.
Make it:
* Small
* Clean
* Subtle
* Professional
* Non-intrusive
It should not interfere with the Minecraft HUD, crosshair, menus, or gameplay.
If possible, provide a configuration option to enable/disable the watermark.
### User Experience
Make the entire mod feel like a polished PvP/client-side utility rather than a basic experimental mod.
Use clean feedback messages such as:
`Motion Blur: 50%`
`Motion Blur enabled`
`Motion Blur disabled`
`Motion Blur reset to 50%`
Avoid unnecessary spam in chat.
### Compatibility
Target the requested Minecraft version and Fabric Loader version provided by the project configuration.
Keep the implementation client-side and avoid requiring server-side installation.
Ensure compatibility with:
* Fabric API
* Mod Menu
* Standard Minecraft rendering
* Common client-side optimization mods where possible
### Code Quality
Use a clean and maintainable architecture.
Separate:
* Command handling
* Configuration management
* Motion Blur rendering
* Mod Menu configuration UI
* Watermark rendering
* Utility/helper classes
Include proper error handling, input validation, comments for complex rendering code, and avoid deprecated APIs whenever possible.
### Final Goal
The final result should be a **professional Minecraft Fabric Motion Blur mod** where players can instantly control the effect using:
`/motionblur 0-100`
and conveniently customize it through **Mod Menu**, with smooth rendering, strong performance optimization, persistent settings, and the subtle branding:
**Made By SpideyyVerse**
The mod should feel polished, stable, lightweight, and suitable for Minecraft PvP, gameplay recordings, and high-FPS setups.
Set up the Fabric 1.21.11 client-only project with Mod Menu/YACL dependencies.
Add persistent synchronized configuration and
/motionblurcommand handling.Implement efficient camera-motion blur rendering and optional watermark HUD rendering.
Add assets, mixin metadata, language strings, and required library manifest.
Created the Fabric 1.21.11 client-side Motion Blur mod with:
/motionblur 0–100,on,off,status, andresetcommandsPersistent JSON configuration with a default strength of 50%
YACL configuration screen integrated with Mod Menu
Adjustable blur strength slider from 0–100%
Camera-rotation-based blur activation with multiple intensity tiers
Optional “Made By SpideyyVerse” watermark
Fabric 1.21.11 project setup, split client source set, mixin metadata, resources, and
manifest.kodMod Menu and YACL dependency declarations
The compilation failed with this error:
Compilation failed with 2 error(s):
ERROR in src/main/java/client/java/com/spideyyverse/motionblur/client/MotionBlurCommand.java at line 56: package net.fabricmc.client.command.v2 does not exist
private static void send(com.mojang.brigadier.context.CommandContext<net.fabricmc.client.command.v2.FabricClientCommandSource> context,
^
ERROR in src/main/java/client/java/com/spideyyverse/motionblur/client/MotionBlurCommand.java at line 56: package net.fabricmc.client.command.v2 does not exist
private static void send(com.mojang.brigadier.context.CommandContext<net.fabricmc.client.command.v2.FabricClientCommandSource> context,
^
=== COMPILATION ERROR ANALYSIS ===
FILES TO INVESTIGATE:
- src/main/java/client/java/com/spideyyverse/motionblur/client/MotionBlurCommand.java
- src/main/java/client/java/com/spideyyverse/motionblur/client/MotionBlurCommand.java
Please fix this error by creating a new artifact with the corrected code.
Fixed the compilation error by using the correct Fabric API package:
net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource
Updated file:
src/client/java/com/spideyyverse/motionblur/client/MotionBlurCommand.java
package com.spideyyverse.motionblur;
import com.spideyyverse.motionblur.client.MotionBlurCommand;
import com.spideyyverse.motionblur.client.MotionBlurRenderer;
import com.spideyyverse.motionblur.client.WatermarkRenderer;
import com.spideyyverse.motionblur.config.MotionBlurConfig;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents;
public final class MotionBlurClient implements ClientModInitializer {
@Override
public void onInitializeClient() {
MotionBlurConfig.load();
MotionBlurCommand.register();
ClientTickEvents.END_CLIENT_TICK.register(MotionBlurRenderer::tick);
WatermarkRenderer.register();
}
}