Skip to content

Commit

Permalink
speed fix
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeTheTech committed Nov 15, 2023
1 parent cce1e0a commit 944b7d3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/java/lee/code/pets/pets/pet/animal/CamelPet.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import net.minecraft.network.chat.Component;
import net.minecraft.sounds.SoundSource;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.ai.attributes.Attribute;
import net.minecraft.world.entity.ai.attributes.Attributes;
import net.minecraft.world.entity.animal.camel.Camel;
import org.bukkit.Material;
import org.bukkit.craftbukkit.v1_20_R2.CraftWorld;
Expand All @@ -25,7 +27,7 @@ public CamelPet(Player player, String[] data) {
setCustomNameVisible(true);
setPersistenceRequired(true);
setCanPickUpLoot(false);
setMaxUpStep(1.0F);
setMaxUpStep(1.5F);
collides = false;
ageLocked = true;
setCustomName(Component.Serializer.fromJson(CoreUtil.serializeColorComponentJson(data[1])));
Expand All @@ -35,11 +37,12 @@ public CamelPet(Player player, String[] data) {
moveControl = new ControllerWASD(this, player.getUniqueId(), 0.4F);
targetSelector.getAvailableGoals().clear();
getBrain().removeAllBehaviors();
getAttribute(Attributes.MOVEMENT_SPEED).setBaseValue(0.2f);
}

@Override
protected void registerGoals() {
goalSelector.addGoal(0, new FollowOwnerGoal(this, 5));
goalSelector.addGoal(0, new FollowOwnerGoal(this, 3));
}

@Override
Expand Down

0 comments on commit 944b7d3

Please sign in to comment.