Skip to content

Commit 3f9fd9c

Browse files
Implement list of entities that are less affected by SCP-268
1 parent 9720fad commit 3f9fd9c

File tree

1 file changed

+10
-1
lines changed
  • src/main/java/dev/enderman/minecraft/plugins/scp/items

1 file changed

+10
-1
lines changed

src/main/java/dev/enderman/minecraft/plugins/scp/items/SCP268Item.kt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,15 @@ val unaffectedEntities = listOfNotNull(
1818
EntityType.ZOMBIE
1919
)
2020

21+
/**
22+
* Entities in this list would be able to see the player after they put on SCP-268, but only in the case that they were already attacking them.
23+
*
24+
* However, they won't be able to notice a player if they haven't noticed them already.
25+
*/
26+
val lessAffectedEntities = listOfNotNull(
27+
EntityType.SHULKER
28+
)
29+
2130
class SCP268Item(plugin: SCPPlugin) : TexturedItem(plugin, "scp_268", Material.LEATHER_HELMET) {
2231
@EventHandler
2332
private fun onEquip(event: PlayerArmorChangeEvent) {
@@ -44,7 +53,7 @@ class SCP268Item(plugin: SCPPlugin) : TexturedItem(plugin, "scp_268", Material.L
4453
for (entity in player.world.livingEntities) {
4554
if (entity !is Mob) continue
4655

47-
if (unaffectedEntities.contains(entity.type)) continue
56+
if (unaffectedEntities.contains(entity.type) || lessAffectedEntities.contains(entity.type)) continue
4857

4958
if (entity.target != player) continue
5059

0 commit comments

Comments
 (0)