From f12fedf2848c93ca452f60a55081503f89dadf4d Mon Sep 17 00:00:00 2001
From: Jakllp <57708725+Jakllp@users.noreply.github.com>
Date: Sat, 10 Jun 2023 21:46:33 +0200
Subject: [PATCH] Update to 1.20
---
pom.xml | 2 +-
src/main/java/com/useful/ucars/CartOrientationUtil.java | 8 ++++++--
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/pom.xml b/pom.xml
index d6a766f..e11e84b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -127,5 +127,5 @@
UTF-8
- 1.19-R1.1.5
+ 1.20-R1.1.5
diff --git a/src/main/java/com/useful/ucars/CartOrientationUtil.java b/src/main/java/com/useful/ucars/CartOrientationUtil.java
index 47308ba..1347e7b 100644
--- a/src/main/java/com/useful/ucars/CartOrientationUtil.java
+++ b/src/main/java/com/useful/ucars/CartOrientationUtil.java
@@ -43,7 +43,9 @@ public static void setPitch(Entity cart, float pitch){
Class > ema = Reflect.getNMSClass("world.entity.","Entity");
if(ucars.MCVersion.get(0) == 1) {
- if(ucars.MCVersion.get(1) >= 18) {
+ if(ucars.MCVersion.get(1) >= 20) {
+ p = ema.getDeclaredField("aH");
+ } else if(ucars.MCVersion.get(1) >= 18) {
p = ema.getDeclaredField("aB");
} else if(ucars.MCVersion.get(1) == 17) {
p = ema.getDeclaredField("az");
@@ -76,7 +78,9 @@ public static void setYaw(Entity cart, float yaw){
Field p = null;
if(ucars.MCVersion.get(0) == 1) {
- if(ucars.MCVersion.get(1) >= 18) {
+ if(ucars.MCVersion.get(1) >= 20) {
+ p = ema.getDeclaredField("aG");
+ } else if(ucars.MCVersion.get(1) >= 18) {
p = ema.getDeclaredField("aA");
} else if(ucars.MCVersion.get(1) == 17) {
p = ema.getDeclaredField("ay");