Skip to content

Commit

Permalink
Fix #137 (rewrite/polymer) (#181)
Browse files Browse the repository at this point in the history
* fix #137 (init): speak distance, requires some testing

* fix: removed refmap field in common.mixins.json, fixed crash
- Replacement was not anywhere in build setup
- Loom automatically adds the right refmap anyway, no need to explicitly define it

* removed commented code (lol)
  • Loading branch information
MagicSweet-dev authored Mar 11, 2024
1 parent b4a92dc commit 47a9467
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -499,14 +499,14 @@ public void aiStep() {
public void tick() {
super.tick();

AABB box = this.getBoundingBox().inflate(4.0D);
AABB box = this.getBoundingBox().inflate(config.messages.speakDistance);
List<ServerPlayer> players = this.level().getEntitiesOfClass(ServerPlayer.class, box);

if (!this.npcData.messages.isEmpty()) {
for (ServerPlayer player : players) {
// Filter them here (not use a predicate above)
// as we need the original list below
if (((ITaterzenEditor) player).getEditorMode() == ITaterzenEditor.EditorMode.MESSAGES || this.distanceTo(player) > config.messages.speakDistance) {
if (((ITaterzenEditor) player).getEditorMode() == ITaterzenEditor.EditorMode.MESSAGES) {
continue;
}

Expand Down
3 changes: 1 addition & 2 deletions src/main/resources/taterzens.common.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,5 @@
"client": [],
"injectors": {
"defaultRequire": 1
},
"refmap": "${refmap}"
}
}

0 comments on commit 47a9467

Please sign in to comment.