Files
MinecraftForge/patches/minecraft/net/minecraft/client/Camera.java.patch
T
7b782e5b05 1.20.6 Initial Update
New Decompiler
Runtime Official mappings
ItemStacks arnt Capability providers anymore, use Vanilla's system.

Co-authored-by: RealMangoRage <[email protected]>
Co-authored-by: Paint_Ninja <[email protected]>
2024-04-30 11:42:52 -07:00

22 lines
714 B
Diff

--- a/net/minecraft/client/Camera.java
+++ b/net/minecraft/client/Camera.java
@@ -227,6 +_,18 @@
return this.partialTickTime;
}
+ public void setAnglesInternal(float yaw, float pitch) {
+ this.yRot = yaw;
+ this.xRot = pitch;
+ }
+
+ public net.minecraft.world.level.block.state.BlockState getBlockAtCamera() {
+ if (!this.initialized)
+ return net.minecraft.world.level.block.Blocks.AIR.defaultBlockState();
+ else
+ return this.level.getBlockState(this.blockPosition).getStateAtViewpoint(this.level, this.blockPosition, this.position);
+ }
+
@OnlyIn(Dist.CLIENT)
public static class NearPlane {
final Vec3 forward;