All versions
8.0.10
Release
v8.0.103 months ago 1,903
Compatibility
Minecraft: Java Edition
1.21.1
Platform
NeoForge
Supported environments
Client and server
Changes
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 bothEntityandBlockEntityoverloads. The code was callingClass.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 threwNoSuchMethodExceptionwhich is expensive to construct. - The
instanceofchecks forFastenerBlockEntity,FenceFastenerEntity, andPlayeralready covered all real use cases — the reflection fallbacks never succeeded.
Bug Fixes
Connection Item Matching (Connection.java)
- Fixed
matches()andreplace()using deadgetTag()reflection instead of the Data Components API.ItemStack.getTag()was removed in 1.20.5 — the reflection always failed and returnednull, causingmatches()to always returntruefor same-type items (preventing valid NBT comparison) andreplace()to always pass empty data (losing connection properties like color/pattern). Now correctly reads fromFLDataComponents.CONNECTION_LOGIC.
Dead Code Removal
FenceFastenerEntity.java
- Removed two useless reflection attempts for
NbtAccounter.unlimitedHeap()andNbtAccounter.createUnlimited(int)inreadSpawnData()— neither exists in 1.21.1. The correctNbtAccounter.create()was already the final fallback.
NetBuilder.java
- Removed dead reflection in
sendToClient()tryingPayloadRegistrar.send()andPayloadRegistrar.sendToPlayer()— neither method exists. The handler map fallback was the actual working code path.
ClientEventHandler.java
- Removed reflection-based
addVertexToBuffer()trying the oldVertexConsumer.vertex(double,double,double)chained API. This code path is unreachable (only called from commented-outdrawEntityHighlight).
ClientProxy.java
- Removed unused
getUvIndex()method containingVertexFormatElement.getUsage()reflection — never called from anywhere in the codebase.
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:BC84wYkA:JzX3zb60"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:BC84wYkA:JzX3zb60"
}