Portable gravitation stabilizer logic
This commit is contained in:
parent
99340baf30
commit
9bde1932a9
@ -9,6 +9,7 @@ import net.minecraft.network.protocol.PacketFlow
|
||||
import net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket
|
||||
import net.minecraft.server.level.ServerLevel
|
||||
import net.minecraft.world.entity.Entity
|
||||
import net.minecraft.world.entity.EquipmentSlot
|
||||
import net.minecraft.world.entity.LivingEntity
|
||||
import net.minecraft.world.entity.item.ItemEntity
|
||||
import net.minecraft.world.entity.player.Player
|
||||
@ -262,7 +263,7 @@ class BlackHoleBlockEntity(p_155229_: BlockPos, p_155230_: BlockState) : BlockEn
|
||||
for (living in level.getEntitiesOfClass(LivingEntity::class.java, affectedBoundsAABB)) {
|
||||
val distance = living.position().distanceTo(center)
|
||||
|
||||
if (living !is Player || !living.abilities.mayfly) {
|
||||
if (living !is Player || !living.abilities.mayfly && living.getItemBySlot(EquipmentSlot.CHEST).item != MItems.PORTABLE_GRAVITATION_STABILIZER) {
|
||||
setDeltaMovement(living, center, distance, living !is Player)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user