Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
CreatureChat
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
Public
CreatureChat
Commits
6dbb44f1
Commit
6dbb44f1
authored
Jul 03, 2024
by
Jonathan Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Trigger End of Game by max friendship with EnderDragon! Updating change log
parent
ac6d193a
Pipeline
#12562
passed with stages
in 2 minutes 18 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
CHANGELOG.md
CHANGELOG.md
+12
-0
ChatDataManager.java
src/main/java/com/owlmaddie/chat/ChatDataManager.java
+7
-0
No files found.
CHANGELOG.md
View file @
6dbb44f1
...
...
@@ -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
...
...
src/main/java/com/owlmaddie/chat/ChatDataManager.java
View file @
6dbb44f1
...
...
@@ -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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment