Make tritanium doors zombie proof
This commit is contained in:
parent
017802e90f
commit
cce73992e3
@ -1,8 +1,11 @@
|
||||
package ru.dbotthepony.mc.otm.registry
|
||||
|
||||
import net.minecraft.ChatFormatting
|
||||
import net.minecraft.core.BlockPos
|
||||
import net.minecraft.network.chat.Component
|
||||
import net.minecraft.util.valueproviders.UniformInt
|
||||
import net.minecraft.world.entity.Entity
|
||||
import net.minecraft.world.entity.monster.Zombie
|
||||
import net.minecraft.world.item.DyeColor
|
||||
import net.minecraft.world.item.ItemStack
|
||||
import net.minecraft.world.item.TooltipFlag
|
||||
@ -16,6 +19,7 @@ import net.minecraft.world.level.block.StairBlock
|
||||
import net.minecraft.world.level.block.TrapDoorBlock
|
||||
import net.minecraft.world.level.block.WallBlock
|
||||
import net.minecraft.world.level.block.state.BlockBehaviour
|
||||
import net.minecraft.world.level.block.state.BlockState
|
||||
import net.minecraft.world.level.material.Material
|
||||
import net.minecraft.world.level.material.MaterialColor
|
||||
import net.minecraftforge.eventbus.api.IEventBus
|
||||
@ -144,6 +148,15 @@ object MBlocks {
|
||||
p_49818_.add(TranslatableComponent("$descriptionId.description2").withStyle(ChatFormatting.DARK_GRAY))
|
||||
}
|
||||
}
|
||||
|
||||
override fun canEntityDestroy(
|
||||
state: BlockState,
|
||||
level: BlockGetter,
|
||||
pos: BlockPos,
|
||||
entity: Entity
|
||||
): Boolean {
|
||||
return entity !is Zombie && super.canEntityDestroy(state, level, pos, entity)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -163,6 +176,15 @@ object MBlocks {
|
||||
p_49818_.add(TranslatableComponent("$descriptionId.description2").withStyle(ChatFormatting.DARK_GRAY))
|
||||
}
|
||||
}
|
||||
|
||||
override fun canEntityDestroy(
|
||||
state: BlockState,
|
||||
level: BlockGetter,
|
||||
pos: BlockPos,
|
||||
entity: Entity
|
||||
): Boolean {
|
||||
return entity !is Zombie && super.canEntityDestroy(state, level, pos, entity)
|
||||
}
|
||||
} }
|
||||
|
||||
init {
|
||||
|
Loading…
Reference in New Issue
Block a user