diff --git a/common/src/main/kotlin/quaedam/Projector.kt b/common/src/main/kotlin/quaedam/Projector.kt index c84a7b4..f62068c 100644 --- a/common/src/main/kotlin/quaedam/Projector.kt +++ b/common/src/main/kotlin/quaedam/Projector.kt @@ -33,7 +33,7 @@ object ProjectorBlock : Block(Properties.of() .lightLevel { 3 } .mapColor(MapColor.COLOR_BLACK) .randomTicks() - .destroyTime(4.0f) + .strength(4.0f) .requiresCorrectToolForDrops()) { override fun use( diff --git a/common/src/main/kotlin/quaedam/projection/ProjectionBlock.kt b/common/src/main/kotlin/quaedam/projection/ProjectionBlock.kt new file mode 100644 index 0000000..d1168ee --- /dev/null +++ b/common/src/main/kotlin/quaedam/projection/ProjectionBlock.kt @@ -0,0 +1,22 @@ +package quaedam.projection + +import net.minecraft.world.item.ItemStack +import net.minecraft.world.level.block.Block +import net.minecraft.world.level.block.state.BlockState +import net.minecraft.world.level.material.MapColor +import net.minecraft.world.level.storage.loot.LootParams + +abstract class ProjectionBlock(properties: Properties = createProperties()) : Block(properties) { + + companion object { + fun createProperties(): Properties = Properties.of() + .strength(3.5f) + .requiresCorrectToolForDrops() + .mapColor(MapColor.COLOR_GRAY) + + } + + @Suppress("OVERRIDE_DEPRECATION") + override fun getDrops(blockState: BlockState, builder: LootParams.Builder) = listOf(ItemStack(asItem())) + +} \ No newline at end of file diff --git a/common/src/main/kotlin/quaedam/projection/SkylightProjection.kt b/common/src/main/kotlin/quaedam/projection/SkylightProjection.kt new file mode 100644 index 0000000..baa52f3 --- /dev/null +++ b/common/src/main/kotlin/quaedam/projection/SkylightProjection.kt @@ -0,0 +1,33 @@ +package quaedam.projection + +import net.minecraft.core.BlockPos +import net.minecraft.world.InteractionHand +import net.minecraft.world.InteractionResult +import net.minecraft.world.entity.player.Player +import net.minecraft.world.item.BlockItem +import net.minecraft.world.item.Item +import net.minecraft.world.level.Level +import net.minecraft.world.level.block.Block +import net.minecraft.world.level.block.state.BlockState +import net.minecraft.world.level.material.MapColor +import net.minecraft.world.phys.BlockHitResult +import quaedam.Quaedam + +object SkylightProjection { + + const val ID = "skylight_projection" + + val block = Quaedam.blocks.register(ID) { SkylightProjectionBlock } + + val item = Quaedam.items.register(ID) { + BlockItem( + SkylightProjectionBlock, Item.Properties() + .`arch$tab`(Quaedam.creativeModeTab) + ) + }!! + +} + +object SkylightProjectionBlock : ProjectionBlock(createProperties().lightLevel { 3 }) { + +} diff --git a/common/src/main/resources/assets/quaedam/blockstates/skylight_projection.json b/common/src/main/resources/assets/quaedam/blockstates/skylight_projection.json new file mode 100644 index 0000000..703f59d --- /dev/null +++ b/common/src/main/resources/assets/quaedam/blockstates/skylight_projection.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "quaedam:block/skylight_projection" + } + } +} diff --git a/common/src/main/resources/assets/quaedam/models/block/projection.json b/common/src/main/resources/assets/quaedam/models/block/projection.json new file mode 100644 index 0000000..e6a2f08 --- /dev/null +++ b/common/src/main/resources/assets/quaedam/models/block/projection.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "quaedam:block/projection", + "up": "#ext" + } +} diff --git a/common/src/main/resources/assets/quaedam/models/block/skylight_project.json b/common/src/main/resources/assets/quaedam/models/block/skylight_project.json new file mode 100644 index 0000000..e81eda5 --- /dev/null +++ b/common/src/main/resources/assets/quaedam/models/block/skylight_project.json @@ -0,0 +1,6 @@ +{ + "parent": "quaedam:block/projection", + "textures": { + "ext": "quaedam:block/skylight_projection" + } +} diff --git a/common/src/main/resources/assets/quaedam/textures/block/projection.png b/common/src/main/resources/assets/quaedam/textures/block/projection.png new file mode 100644 index 0000000..c50ff57 Binary files /dev/null and b/common/src/main/resources/assets/quaedam/textures/block/projection.png differ diff --git a/common/src/main/resources/assets/quaedam/textures/block/skylight_projection.png b/common/src/main/resources/assets/quaedam/textures/block/skylight_projection.png new file mode 100644 index 0000000..093996d Binary files /dev/null and b/common/src/main/resources/assets/quaedam/textures/block/skylight_projection.png differ diff --git a/common/src/main/resources/assets/quaedam/loot_tables/blocks/projector.json b/common/src/main/resources/data/quaedam/loot_tables/blocks/projector.json similarity index 100% rename from common/src/main/resources/assets/quaedam/loot_tables/blocks/projector.json rename to common/src/main/resources/data/quaedam/loot_tables/blocks/projector.json