aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/potatocrime/entity
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-04-02 02:38:25 +0200
committerLinnea Gräf <nea@nea.moe>2024-04-02 02:38:25 +0200
commit856d3242f34f7a787f02b086c0cb4b5b97eb34ca (patch)
treecca84191a5ba58090f88a4d3de6b83dcc991e589 /src/main/kotlin/moe/nea/potatocrime/entity
parentab30c1128b42eed24d0decf9ecf9e6a2c98a79e2 (diff)
downloadpotato-crimes-856d3242f34f7a787f02b086c0cb4b5b97eb34ca.tar.gz
potato-crimes-856d3242f34f7a787f02b086c0cb4b5b97eb34ca.tar.bz2
potato-crimes-856d3242f34f7a787f02b086c0cb4b5b97eb34ca.zip
Improve texture
Diffstat (limited to 'src/main/kotlin/moe/nea/potatocrime/entity')
-rw-r--r--src/main/kotlin/moe/nea/potatocrime/entity/PotatoGuard.kt8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/main/kotlin/moe/nea/potatocrime/entity/PotatoGuard.kt b/src/main/kotlin/moe/nea/potatocrime/entity/PotatoGuard.kt
index 33ea7d1..40e0519 100644
--- a/src/main/kotlin/moe/nea/potatocrime/entity/PotatoGuard.kt
+++ b/src/main/kotlin/moe/nea/potatocrime/entity/PotatoGuard.kt
@@ -1,6 +1,6 @@
package moe.nea.potatocrime.entity
-import moe.nea.potatocrime.registry.PotatoRegistry
+import moe.nea.potatocrime.PotatoCrime
import net.minecraft.entity.EntityType
import net.minecraft.entity.ai.goal.*
import net.minecraft.entity.attribute.DefaultAttributeContainer
@@ -8,6 +8,7 @@ import net.minecraft.entity.attribute.EntityAttributes
import net.minecraft.entity.mob.HostileEntity
import net.minecraft.entity.mob.PathAwareEntity
import net.minecraft.entity.player.PlayerEntity
+import net.minecraft.server.network.ServerPlayerEntity
import net.minecraft.world.World
class PotatoGuardEntity(entityType: EntityType<out PotatoGuardEntity>, world: World?) :
@@ -40,10 +41,7 @@ class PotatoGuardEntity(entityType: EntityType<out PotatoGuardEntity>, world: Wo
PlayerEntity::class.java,
true
) { player ->
- (player as PlayerEntity)
- .inventory
- .getMatchingStacks { it.isIn(PotatoRegistry.carrotIshItems) }
- .isNotEmpty()
+ PotatoCrime.hasContraband(player as ServerPlayerEntity)
}
)
}