Post merge fixes for 1.19.4
This commit is contained in:
parent
a68c08ecf8
commit
76c4c3e6a2
@ -12,16 +12,15 @@ import net.minecraft.world.level.BlockGetter
|
||||
import net.minecraft.world.level.block.DoorBlock
|
||||
import net.minecraft.world.level.block.state.BlockState
|
||||
import net.minecraft.world.level.block.state.properties.BlockSetType
|
||||
import net.minecraft.world.level.material.Material
|
||||
import net.minecraft.world.level.material.PushReaction
|
||||
import ru.dbotthepony.mc.otm.core.TranslatableComponent
|
||||
|
||||
class TritaniumDoorBlock(val color: DyeColor?) : DoorBlock(
|
||||
Properties.of()
|
||||
.mapColor(color ?: DyeColor.LIGHT_BLUE)
|
||||
Properties.of(Material.METAL, color ?: DyeColor.LIGHT_BLUE)
|
||||
.explosionResistance(80f)
|
||||
.noOcclusion()
|
||||
.destroyTime(3f)
|
||||
.pushReaction(PushReaction.DESTROY)
|
||||
.requiresCorrectToolForDrops(),
|
||||
BlockSetType.IRON
|
||||
) {
|
||||
@ -40,6 +39,10 @@ class TritaniumDoorBlock(val color: DyeColor?) : DoorBlock(
|
||||
}
|
||||
}
|
||||
|
||||
override fun getPistonPushReaction(p_52814_: BlockState): PushReaction {
|
||||
return PushReaction.DESTROY
|
||||
}
|
||||
|
||||
override fun canEntityDestroy(
|
||||
state: BlockState,
|
||||
level: BlockGetter,
|
||||
|
@ -13,11 +13,11 @@ import net.minecraft.world.level.BlockGetter
|
||||
import net.minecraft.world.level.block.TrapDoorBlock
|
||||
import net.minecraft.world.level.block.state.BlockState
|
||||
import net.minecraft.world.level.block.state.properties.BlockSetType
|
||||
import net.minecraft.world.level.material.Material
|
||||
import ru.dbotthepony.mc.otm.core.TranslatableComponent
|
||||
|
||||
class TritaniumTrapdoorBlock(val color: DyeColor?) : TrapDoorBlock(
|
||||
Properties.of()
|
||||
.mapColor(color ?: DyeColor.LIGHT_BLUE)
|
||||
Properties.of(Material.METAL, color ?: DyeColor.LIGHT_BLUE)
|
||||
.explosionResistance(80f)
|
||||
.noOcclusion().destroyTime(3f)
|
||||
.requiresCorrectToolForDrops()
|
||||
|
@ -9,7 +9,7 @@ import net.minecraft.world.level.block.entity.BlockEntity
|
||||
import net.minecraft.world.level.block.entity.BlockEntityTicker
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType
|
||||
import net.minecraft.world.level.block.state.BlockState
|
||||
import net.minecraft.world.level.material.MapColor
|
||||
import net.minecraft.world.level.material.Material
|
||||
import net.minecraft.world.level.material.PushReaction
|
||||
import net.minecraft.world.phys.shapes.CollisionContext
|
||||
import net.minecraft.world.phys.shapes.VoxelShape
|
||||
@ -20,7 +20,7 @@ import ru.dbotthepony.mc.otm.core.get
|
||||
import ru.dbotthepony.mc.otm.core.needsNoPowerDescription
|
||||
import ru.dbotthepony.mc.otm.shapes.BlockShapes
|
||||
|
||||
class CobblerBlock(val color: DyeColor?) : RotatableMatteryBlock(Properties.of().mapColor(color?.mapColor ?: MapColor.METAL).pushReaction(PushReaction.BLOCK).requiresCorrectToolForDrops().destroyTime(1.5f).explosionResistance(25.0f)), EntityBlock {
|
||||
class CobblerBlock(val color: DyeColor?) : RotatableMatteryBlock(Properties.of(Material.METAL, color ?: DyeColor.LIGHT_BLUE).requiresCorrectToolForDrops().destroyTime(1.5f).explosionResistance(25.0f)), EntityBlock {
|
||||
override fun newBlockEntity(pPos: BlockPos, pState: BlockState): BlockEntity {
|
||||
return CobblerBlockEntity(pPos, pState)
|
||||
}
|
||||
@ -41,6 +41,10 @@ class CobblerBlock(val color: DyeColor?) : RotatableMatteryBlock(Properties.of()
|
||||
needsNoPowerDescription()
|
||||
}
|
||||
|
||||
override fun getPistonPushReaction(p_60584_: BlockState): PushReaction {
|
||||
return PushReaction.BLOCK
|
||||
}
|
||||
|
||||
private val shapes = getShapeForEachState(rotationProperty) { BlockShapes.COBBLESTONE_GENERATOR.rotateFromNorth(it[rotationProperty]).computeShape() }
|
||||
|
||||
@Suppress("override_deprecation")
|
||||
|
@ -12,7 +12,7 @@ import net.minecraft.world.level.block.entity.BlockEntity
|
||||
import net.minecraft.world.level.block.entity.BlockEntityTicker
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType
|
||||
import net.minecraft.world.level.block.state.BlockState
|
||||
import net.minecraft.world.level.material.MapColor
|
||||
import net.minecraft.world.level.material.Material
|
||||
import net.minecraft.world.level.material.PushReaction
|
||||
import net.minecraft.world.phys.BlockHitResult
|
||||
import net.minecraft.world.phys.shapes.CollisionContext
|
||||
@ -25,7 +25,7 @@ import ru.dbotthepony.mc.otm.core.get
|
||||
import ru.dbotthepony.mc.otm.registry.MItems
|
||||
import ru.dbotthepony.mc.otm.shapes.BlockShapes
|
||||
|
||||
class EssenceStorageBlock(val color: DyeColor?) : RotatableMatteryBlock(Properties.of().mapColor(color?.mapColor ?: MapColor.METAL).pushReaction(PushReaction.BLOCK).requiresCorrectToolForDrops().destroyTime(1.5f).explosionResistance(60.0f)), EntityBlock {
|
||||
class EssenceStorageBlock(val color: DyeColor?) : RotatableMatteryBlock(Properties.of(Material.METAL, color ?: DyeColor.LIGHT_BLUE).requiresCorrectToolForDrops().destroyTime(1.5f).explosionResistance(60.0f)), EntityBlock {
|
||||
override fun newBlockEntity(pPos: BlockPos, pState: BlockState): BlockEntity {
|
||||
return EssenceStorageBlockEntity(pPos, pState)
|
||||
}
|
||||
@ -51,6 +51,10 @@ class EssenceStorageBlock(val color: DyeColor?) : RotatableMatteryBlock(Properti
|
||||
addSimpleDescription()
|
||||
}
|
||||
|
||||
override fun getPistonPushReaction(p_60584_: BlockState): PushReaction {
|
||||
return PushReaction.BLOCK
|
||||
}
|
||||
|
||||
private val shapes = getShapeForEachState(rotationProperty) { BlockShapes.ESSENCE_STORAGE.rotateFromNorth(it[rotationProperty]).computeShape() }
|
||||
|
||||
@Suppress("override_deprecation")
|
||||
|
@ -14,7 +14,7 @@ import net.minecraft.world.level.block.entity.BlockEntityTicker
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType
|
||||
import net.minecraft.world.level.block.state.BlockState
|
||||
import net.minecraft.world.level.block.state.StateDefinition
|
||||
import net.minecraft.world.level.material.MapColor
|
||||
import net.minecraft.world.level.material.Material
|
||||
import net.minecraft.world.level.material.PushReaction
|
||||
import net.minecraft.world.phys.shapes.CollisionContext
|
||||
import net.minecraft.world.phys.shapes.VoxelShape
|
||||
@ -26,7 +26,7 @@ import ru.dbotthepony.mc.otm.block.getShapeForEachState
|
||||
import ru.dbotthepony.mc.otm.core.get
|
||||
import ru.dbotthepony.mc.otm.shapes.BlockShapes
|
||||
|
||||
class PlatePressBlock(val color: DyeColor?, val isTwin: Boolean = false) : RotatableMatteryBlock(Properties.of().mapColor(color?.mapColor ?: MapColor.METAL).pushReaction(PushReaction.BLOCK).requiresCorrectToolForDrops().destroyTime(1.5f).explosionResistance(25.0f)), EntityBlock {
|
||||
class PlatePressBlock(val color: DyeColor?, val isTwin: Boolean = false) : RotatableMatteryBlock(Properties.of(Material.METAL, color ?: DyeColor.LIGHT_BLUE).requiresCorrectToolForDrops().destroyTime(1.5f).explosionResistance(25.0f)), EntityBlock {
|
||||
override fun newBlockEntity(p_153215_: BlockPos, p_153216_: BlockState): BlockEntity {
|
||||
return PlatePressBlockEntity(p_153215_, p_153216_, isTwin)
|
||||
}
|
||||
@ -47,6 +47,10 @@ class PlatePressBlock(val color: DyeColor?, val isTwin: Boolean = false) : Rotat
|
||||
builder.add(WorkerState.WORKER_STATE)
|
||||
}
|
||||
|
||||
override fun getPistonPushReaction(p_60584_: BlockState): PushReaction {
|
||||
return PushReaction.BLOCK
|
||||
}
|
||||
|
||||
override fun appendHoverText(
|
||||
itemStack: ItemStack,
|
||||
blockAccessor: BlockGetter?,
|
||||
|
@ -146,8 +146,7 @@ object MRegistry : IBlockItemRegistryAcceptor {
|
||||
}.also { decorativeBlocks.add(it) }
|
||||
|
||||
val COMPUTER_TERMINAL = DecorativeBlock.rotatable("computer_terminal", BlockShapes.COMPUTER_TERMINAL, BlockRotationFreedom.HORIZONTAL) {
|
||||
BlockBehaviour.Properties.of()
|
||||
.mapColor(it?.mapColor ?: MapColor.COLOR_LIGHT_BLUE)
|
||||
BlockBehaviour.Properties.of(Material.METAL, it ?: DyeColor.LIGHT_BLUE)
|
||||
.sound(SoundType.METAL)
|
||||
.explosionResistance(15f)
|
||||
.destroyTime(1.5f)
|
||||
|
Loading…
Reference in New Issue
Block a user