Skip to content

Commit

Permalink
✨ added stone block register and some properties
Browse files Browse the repository at this point in the history
  • Loading branch information
asoji committed Sep 25, 2024
1 parent ce1ffe2 commit a0fe09b
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
21 changes: 21 additions & 0 deletions src/main/kotlin/gay/asoji/innerpastels/blocks/Properties.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package gay.asoji.innerpastels.blocks

import net.minecraft.world.level.block.Block
import net.minecraft.world.level.block.Blocks
import net.minecraft.world.level.block.SoundType
import net.minecraft.world.level.block.state.BlockBehaviour
Expand Down Expand Up @@ -237,4 +238,24 @@ object Properties {
.sound(SoundType.STONE)
.requiresCorrectToolForDrops()
}

/**
* Default properties for Pastel Dirt
*/
fun pastelDirt(): BlockBehaviour.Properties {
return BlockBehaviour.Properties.of()
.strength(0.5F)
.sound(SoundType.GRAVEL)
}

/**
* Default properties for Pastel Grass
*/
fun pastelGrass(): BlockBehaviour.Properties {
return BlockBehaviour.Properties.of()
.randomTicks()
.strength(0.6F)
.sound(SoundType.GRASS)
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -307,4 +307,10 @@ fun MapColor.registerSandBlock(modID: String, name: String, colorRGBA: ColorRGBA
ColoredFallingBlock(colorRGBA, pastelSand().mapColor(this)).registerBlockWithItem(modID, name)

fun DyeColor.registerSandBlock(modID: String, name: String, colorRGBA: ColorRGBA) : Block =
ColoredFallingBlock(colorRGBA, pastelSand().mapColor(this)).registerBlockWithItem(modID, name)
ColoredFallingBlock(colorRGBA, pastelSand().mapColor(this)).registerBlockWithItem(modID, name)

fun MapColor.registerStoneBlock(modID: String, name: String): Block =
Block(pastelBlock().mapColor(this)).registerBlockWithItem(modID, name)

fun DyeColor.registerStoneBlock(modID: String, name: String): Block =
Block(pastelBlock().mapColor(this)).registerBlockWithItem(modID, name)

0 comments on commit a0fe09b

Please sign in to comment.