Apply rotation and scale to entity (livingbase), not its parts
Reduces amount of keyframes per entity and makes it easier to work with.
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
//#if MC>=10800
|
||||
package com.replaymod.render.blend.mixin;
|
||||
|
||||
import com.replaymod.render.blend.BlendState;
|
||||
import com.replaymod.render.blend.exporters.EntityExporter;
|
||||
import net.minecraft.client.renderer.entity.RenderLivingBase;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
@Mixin(RenderLivingBase.class)
|
||||
public abstract class MixinRenderLivingBase {
|
||||
@Inject(method = "doRender", at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Lnet/minecraft/client/renderer/entity/RenderLivingBase;prepareScale(Lnet/minecraft/entity/EntityLivingBase;F)F",
|
||||
shift = At.Shift.AFTER
|
||||
))
|
||||
private void recordModelMatrix(EntityLivingBase entity, double x, double y, double z, float entityYaw, float partialTicks, CallbackInfo ci) {
|
||||
BlendState blendState = BlendState.getState();
|
||||
if (blendState != null) {
|
||||
blendState.get(EntityExporter.class).postEntityLivingSetup();
|
||||
}
|
||||
}
|
||||
}
|
||||
//#endif
|
||||
Reference in New Issue
Block a user