Skip to content

Commit

Permalink
Update to 1.20
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakllp committed Jun 10, 2023
1 parent fcc2a49 commit f12fedf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -127,5 +127,5 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<version>1.19-R1.1.5</version>
<version>1.20-R1.1.5</version>
</project>
8 changes: 6 additions & 2 deletions src/main/java/com/useful/ucars/CartOrientationUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit f12fedf

Please sign in to comment.