mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-22 04:27:59 +01:00
Disable head angle changes when moving through a portal
This commit is contained in:
parent
47022fc1e8
commit
12dc7c1d28
1 changed files with 7 additions and 0 deletions
|
@ -1,7 +1,10 @@
|
|||
package com.minelittlepony.client;
|
||||
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.block.Material;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.util.hit.BlockHitResult;
|
||||
import net.minecraft.util.hit.HitResult;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
|
||||
|
@ -85,6 +88,10 @@ public class HorseCam {
|
|||
return originalPitch;
|
||||
}
|
||||
|
||||
if (hit instanceof BlockHitResult && player.world.getBlockState(((BlockHitResult)hit).getBlockPos()).getMaterial() == Material.PORTAL) {
|
||||
return originalPitch;
|
||||
}
|
||||
|
||||
Vec3d hitPos = hit.getPos();
|
||||
Vec3d pos = player.getPos();
|
||||
|
||||
|
|
Loading…
Reference in a new issue