diff --git a/build.gradle b/build.gradle index 447a256..373f2e4 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'fabric-loom' version '1.1-SNAPSHOT' + id 'fabric-loom' version '1.3.+' } sourceCompatibility = JavaVersion.VERSION_17 diff --git a/gradle.properties b/gradle.properties index 582e0c1..dc411f4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,11 +1,11 @@ org.gradle.jvmargs=-Xmx2G # Fabric Properties # Check these on https://modmuss50.me/fabric.html -minecraft_version=1.19.4 -yarn_mappings=1.19.4+build.1 -loader_version=0.14.17 +minecraft_version=1.20 +yarn_mappings=1.20+build.1 +loader_version=0.14.22 #Fabric api -fabric_version=0.76.0+1.19.4 +fabric_version=0.90.4+1.20.1 # Mod Properties version=1.4.0 maven_group=ru.maxvar diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 3796d3c..27313fb 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/java/ru/maxvar/mcf/easyfeed/EatTreatsGoal.java b/src/main/java/ru/maxvar/mcf/easyfeed/EatTreatsGoal.java index a6ee000..3595891 100644 --- a/src/main/java/ru/maxvar/mcf/easyfeed/EatTreatsGoal.java +++ b/src/main/java/ru/maxvar/mcf/easyfeed/EatTreatsGoal.java @@ -36,7 +36,7 @@ public boolean canStart() { private ItemEntity findClosestFood() { //find if any suitable food is around - List entities = animal.world.getEntitiesByClass( + List entities = animal.getWorld().getEntitiesByClass( ItemEntity.class, animal.getBoundingBox().expand(range), itemEntity -> animal.isBreedingItem(itemEntity.getStack())); ItemEntity food = null; @@ -59,7 +59,7 @@ public boolean shouldContinue() { @Override public void tick() { - if (targetFood != null && !animal.world.isClient && isEager(animal)) { + if (targetFood != null && !animal.getWorld().isClient && isEager(animal)) { if (!targetFood.getStack().isEmpty()) { //move animal animal.getLookControl().lookAt(targetFood, animal.getMaxLookYawChange(), animal.getMaxLookPitchChange()); diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index c9e94c1..1bc2402 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -25,7 +25,7 @@ "depends": { "fabricloader": ">=${loader_version}", "fabric": "*", - "minecraft": "${minecraft_version}", + "minecraft": ">=${minecraft_version}", "java": ">=17" }, "custom": {