File tree Expand file tree Collapse file tree
src/main/java/me/tofaa/entitylib/npc Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,6 +26,14 @@ dependencies {
2626 implementation(project(" :platforms:movement" ))
2727}
2828
29+ tasks {
30+ compileJava {
31+ sourceCompatibility = " 21"
32+ targetCompatibility = " 21"
33+ options.release.set(21 )
34+ }
35+ }
36+
2937tasks {
3038 val version = " 1.21.3"
3139 val javaVersion = JavaLanguageVersion .of(21 )
Original file line number Diff line number Diff line change @@ -215,15 +215,15 @@ private static void processPathFollowing() {
215215 double newY = current .getY ();
216216
217217 if (npc .getOptions ().isClampToGround ()) {
218- var world = npc .getWorld ();
218+ World world = npc .getWorld ();
219219 if (world != null ) {
220220 int bx = (int ) Math .floor (newX );
221221 int bz = (int ) Math .floor (newZ );
222222 int feetY = (int ) Math .floor (current .getY ());
223223
224224 // Check if there's a solid block ahead at feet level (obstacle)
225- var blockAtFeet = world .getBlockAt (bx , feetY , bz );
226- var blockAboveFeet = world .getBlockAt (bx , feetY + 1 , bz );
225+ Block blockAtFeet = world .getBlockAt (bx , feetY , bz );
226+ Block blockAboveFeet = world .getBlockAt (bx , feetY + 1 , bz );
227227
228228 boolean obstacleAhead = !blockAtFeet .isPassable ()
229229 && blockAboveFeet .isPassable ();
You can’t perform that action at this time.
0 commit comments