Fix camera being affected by portal wobbling
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package eu.crushedpixel.replaymod.mixin;
|
||||
|
||||
import eu.crushedpixel.replaymod.replay.ReplayHandler;
|
||||
import net.minecraft.client.entity.EntityPlayerSP;
|
||||
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(EntityPlayerSP.class)
|
||||
public abstract class MixinEntityPlayerSP {
|
||||
@Inject(method = "onLivingUpdate", at = @At("HEAD"), cancellable = true)
|
||||
public void isInReplay(CallbackInfo ci) {
|
||||
if (ReplayHandler.isInReplay()) {
|
||||
ci.cancel();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
"required": true,
|
||||
"package": "eu.crushedpixel.replaymod.mixin",
|
||||
"mixins": [
|
||||
"MixinEntityPlayerSP",
|
||||
"MixinEffectRenderer",
|
||||
"MixinEntityRenderer",
|
||||
"MixinMinecraft",
|
||||
|
||||
Reference in New Issue
Block a user