bte_optimization_fixes-1.8.0.jar
Curse Maven Snippet
What's new
Fix GeckoLib 3 mob models going wild while the game is paused
With the game paused, some GeckoLib 3 mobs (Dungeons Mobs' Blastling and
other enderlings) spun their heads non-stop.
GeckoLib 3.1.40 does not advance seekTime while paused, and
AnimationProcessor#tickAnimation returns early when seekTime equals the
previous one ("entity already animated on this tick"), so the bones keep
last frame's values. Models that turn the head add to the bone's current
rotation in setCustomAnimations (head.setRotationX(head.getRotationX() +
headPitch)), so that addition piled up every frame.
- New client mixin geckolib.AnimationProcessorPauseMixin (@Pseudo,
remap=false): while paused, tickAnimation forgets the last seekTime
(NaN), so the bones are recomputed every frame (same seekTime, same pose)
and the head offset is applied on a clean pose. Nothing changes when the
game is not paused.
Fix GeckoLib 3 mobs jittering in GUI previews (JEI / Just Enough Resources)
The mob previews of Just Enough Resources in JEI (and similar GUIs)
jittered between poses (Mutant More, Dungeons Mobs...).
AnimatedGeoModel#setCustomAnimations uses entity.tickCount + partialTick as
the animation clock. Those preview entities are not in the world and never
tick, so the clock only moved by the partial tick and jumped back every
tick. JEI does not pause the game, so AnimationProcessorPauseMixin does not
apply here.
- New client mixin geckolib.AnimatedGeoModelGuiTickMixin (@Pseudo,
remap=false, @Redirect on the Entity.tickCount read, SRG f_19797_):
entities not added to the world use the client level game time instead.
Entities in the world are unchanged.
This mod has no additional files

