Radim Poruba
📎 1 file 1,534 chars
📄
pasted-code-1792688274912.txt
txt 19 lines
▶
Please create a completely new standalone Fabric client-side mod for Minecraft 1.26.2. This mod must act as a global Item Finder for ALL dropped items with a custom dynamic rendering system. 

Please generate the Java code based on these updated technical requirements:

1. TARGET ALL ITEMS (No Whitelist):
The mod must target every single dropped item in the world. Do not filter by Item ID or use a whitelist. Every instance of ItemEntity must be highlighted.

2. CUSTOM 3D BOX RENDERING VIA WORLD RENDERER:
Do not use the native 'hasGlowingEffect' method, as its 1-pixel thickness cannot be modified. Instead, inject a Mixin into `WorldRenderer` (specifically during the entity rendering phase or via Fabric's WorldRenderEvents) to draw custom 3D bounding boxes around all ItemEntities in the world.

3. DISTANCE-BASED DYNAMIC SCALING:
Inside the rendering loop, calculate the distance between the local player's camera position and the ItemEntity's position. 
Implement a mathematical formula for the rendering line thickness and box size:
- When the player is CLOSE to the item, the box lines should be thin and normal.
- As the player moves FURTHER AWAY, the line thickness (and visual scale of the box) must dynamically INCREASE. 
This will prevent distant items from disappearing into tiny pixels and will make them highly prominent and visible over huge distances through terrain.

Please provide the rewritten main initializer class, the custom rendering Mixin/Event class, and the necessary mixins.json configuration file.
Kodari AI
KodariOct 22 at 5:14 pm 5
GlobalItemFinder
GlobalItemFinder is a standalone Fabric client-side mod for Minecraft 1.26.2 that highlights every dropped ItemEntity in the world with custom 3D bounding boxes. It injects into WorldRenderer via Mixin to draw dynamic boxes around all items without filtering. The rendering system calculates camera-to-item distance and applies a mathematical formula that increases line thickness and box scale as distance grows, ensuring distant items remain highly visible through terrain. Includes main initializer class, rendering Mixin, and mixins.json configuration.
  1. Look up the 26.2 client render/event signatures needed for item-entity box rendering.

  2. Create the client initializer, renderer, and mixin configuration.

Created the standalone client-side Fabric 26.2 Item Finder. It targets every loaded ItemEntity without an item whitelist and renders camera-relative boxes whose size and line width increase with distance. Its custom line pipeline disables depth testing, so boxes remain visible through terrain.

26.2 uses Fabric’s LevelRenderEvents.AFTER_SOLID_FEATURES rather than the older WorldRenderEvents; the mixin accessor exposes the render-type factory needed for the custom x-ray pipeline. The project includes its Gradle setup, client entrypoint, metadata, and mixin configuration.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
settings.gradle
Code
8 244
src/client/java/dev/kodari/itemfinder/ItemFinderClient.java
package dev.kodari.itemfinder;

import dev.kodari.itemfinder.render.ItemBoxRenderer;
import net.fabricmc.api.ClientModInitializer;

public final class ItemFinderClient implements ClientModInitializer {
	@Override
	public void onInitializeClient() {
		ItemBoxRenderer.register();
	}
}