Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GoalSelector crash #21

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx48G
org.gradle.jvmargs=-Xmx2G
org.gradle.parallel=true

# Fabric Properties
Expand All @@ -9,7 +9,7 @@ yarn_mappings=1.20.1+build.1
loader_version=0.14.22

# Mod Properties
mod_version=1.2.1
mod_version=1.2.2
maven_group=net.ioixd
archives_base_name=cobblemounts

Expand Down
8 changes: 3 additions & 5 deletions src/main/java/net/ioixd/Cobblemounts.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
import net.fabricmc.fabric.api.event.player.UseEntityCallback;
import net.fabricmc.fabric.api.networking.v1.ServerPlayConnectionEvents;
import net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking;
import net.minecraft.item.Item;
import net.minecraft.entity.ai.goal.EatGrassGoal;
import net.minecraft.entity.ai.goal.WanderAroundGoal;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.text.Text;
import net.minecraft.util.ActionResult;
Expand Down Expand Up @@ -65,12 +66,9 @@ public void onInitialize() {
}

}
Item item = player.getMainHandStack().getItem();
if (!item.getTranslationKey().contains("item.cobblemon")) {
if (player.getMainHandStack().isEmpty()) {
player.startRiding(entity, false);
pkmnEntity.clearGoalsAndTasks();
}

}
}
}
Expand Down
Loading