Skip to content

Commit 61a2a97

Browse files
committed
修复Barrage 在 barrageIgnored = false的时候会直接调用hit的bug
1 parent caab840 commit 61a2a97

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

common/src/main/kotlin/cn/coostack/cooparticlesapi/barrages/AbstractBarrage.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,14 +144,17 @@ abstract class AbstractBarrage(
144144
val otherBarrages = BarrageManager.collectClipBarrages(world, hitBox.get().ofBox(loc))
145145
.filter(::filterHitBarrage)
146146
result.barrages.addAll(otherBarrages)
147-
hit = true
147+
if (otherBarrages.isNotEmpty()) {
148+
hit = true
149+
}
148150
}
149151

150152
if (hit) {
151153
hit(result)
152154
}
153155
}
154156

157+
155158
/**
156159
* 判定barrage已经攻击到实体或者触发方块/液体时执行
157160
*/

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Important Notes:
22
# Every field you add must be added to the root build.gradle expandProps map.
33
# Project
4-
version=2.3.4-SNAPSHOT
4+
version=2.3.5-SNAPSHOT
55
group=cn.coostack
66
artifact=cooparticlesapi
77
java_version=21

0 commit comments

Comments
 (0)