Commit 6dbb44f1 by Jonathan Thomas

Trigger End of Game by max friendship with EnderDragon! Updating change log

parent ac6d193a
Pipeline #12562 passed with stages
in 2 minutes 18 seconds
......@@ -4,6 +4,18 @@ All notable changes to **CreatureChat** are documented in this file. The format
[Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Added
- New **PROTECT** behavior: defend a player from attacks!
- **Native attack abilities** (when using the ATTACK or PROTECT behaviors) for hostile mob types
- **End of Game** triggered by max friendship with the **EnderDragon**!
### Changed
- Improved **FLEE** behavior, to make it more reliable and more random.
- Improved **FOLLOW** behavior, supporting teleporting entities (Enderman, Endermite, and Shulker)
- Refactored **ATTACK** behavior to allow more flexibility (in order to support PROTECT behavior)
## [1.0.6] - 2024-06-17
### Added
......
......@@ -14,6 +14,7 @@ import com.owlmaddie.network.ServerPackets;
import com.owlmaddie.utils.LivingEntityInterface;
import com.owlmaddie.utils.Randomizer;
import com.owlmaddie.utils.ServerEntityFinder;
import net.minecraft.entity.boss.dragon.EnderDragonEntity;
import net.minecraft.entity.mob.MobEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.server.MinecraftServer;
......@@ -311,6 +312,12 @@ public class ChatDataManager {
// Stop any attack/flee if friendship improves
EntityBehaviorManager.removeGoal(entity, FleePlayerGoal.class);
EntityBehaviorManager.removeGoal(entity, AttackPlayerGoal.class);
if (entity instanceof EnderDragonEntity && new_friendship == 3) {
// Trigger end of game (friendship always wins!)
EnderDragonEntity dragon = (EnderDragonEntity) entity;
dragon.getFight().dragonKilled(dragon);
}
}
this.friendship = new_friendship;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment