promotional bannermobile promotional banner

Fairy Lights (Neoforge)

A modern port of the beloved decorative hanging lights mod, bringing customizable string lights, bunting, and garlands to Minecraft 1.21.1.
Back to Files

fairylights-8.0.10-neoforge-1.21.1.jar

File namefairylights-8.0.10-neoforge-1.21.1.jar
Uploader
ImbavirusImbavirus
Uploaded
May 2, 2026
Downloads
18.2K
Size
829.1 KB
Mod Loaders
NeoForge
File ID
8025079
Type
R
Release
Supported game versions
  • 1.21.1

Curse Maven Snippet

NeoForge

implementation "curse.maven:fairy-lights-neoforge-1429552:8025079"

Learn more about Curse Maven

What's new

Fairy Lights 8.0.10 - Performance: Remove Dead Reflection Code

Performance Fixes

CapabilityHandler (~16% render thread overhead eliminated)

  • Removed per-tick reflection calls in getFastenerCapability() for both Entity and BlockEntity overloads. The code was calling Class.getMethod() / Method.invoke() every tick trying to find old Forge API methods (getCapability, getData, setData, addCapability, getOrCreateCapability) that don't exist in NeoForge 1.21.1. Each call threw NoSuchMethodException which is expensive to construct.
  • The instanceof checks for FastenerBlockEntity, FenceFastenerEntity, and Player already covered all real use cases — the reflection fallbacks never succeeded.

Bug Fixes

Connection Item Matching (Connection.java)

  • Fixed matches() and replace() using dead getTag() reflection instead of the Data Components API. ItemStack.getTag() was removed in 1.20.5 — the reflection always failed and returned null, causing matches() to always return true for same-type items (preventing valid NBT comparison) and replace() to always pass empty data (losing connection properties like color/pattern). Now correctly reads from FLDataComponents.CONNECTION_LOGIC.

Dead Code Removal

FenceFastenerEntity.java

  • Removed two useless reflection attempts for NbtAccounter.unlimitedHeap() and NbtAccounter.createUnlimited(int) in readSpawnData() — neither exists in 1.21.1. The correct NbtAccounter.create() was already the final fallback.

NetBuilder.java

  • Removed dead reflection in sendToClient() trying PayloadRegistrar.send() and PayloadRegistrar.sendToPlayer() — neither method exists. The handler map fallback was the actual working code path.

ClientEventHandler.java

  • Removed reflection-based addVertexToBuffer() trying the old VertexConsumer.vertex(double,double,double) chained API. This code path is unreachable (only called from commented-out drawEntityHighlight).

ClientProxy.java

  • Removed unused getUvIndex() method containing VertexFormatElement.getUsage() reflection — never called from anywhere in the codebase.

This mod has no additional files