mirror of
https://github.com/chylex/Hardcore-Ender-Expansion-2.git
synced 2025-04-11 03:15:44 +02:00
Allow extending BlockSimple & minor tweak to ItemBlock registration and a comment
This commit is contained in:
parent
eeeb4ea50a
commit
acb3eb0b37
src/main/java/chylex/hee
@ -5,7 +5,7 @@ import net.minecraft.block.SoundType
|
||||
import net.minecraft.block.material.MapColor
|
||||
import net.minecraft.block.material.Material
|
||||
|
||||
class BlockSimple(builder: Builder) : Block(builder.material, builder.mapColor){
|
||||
open class BlockSimple(builder: Builder) : Block(builder.material, builder.mapColor){
|
||||
init{
|
||||
setHarvestTool(builder.harvestTool)
|
||||
setHardness(builder.harvestHardness)
|
||||
|
@ -138,7 +138,7 @@ object ModBlocks{
|
||||
}
|
||||
|
||||
private infix fun Block.with(itemBlock: ItemBlock): Block{
|
||||
temporaryItemBlocks.add(itemBlock.apply { this.registryName = this@with.registryName })
|
||||
temporaryItemBlocks.add(itemBlock.also { it.registryName = this.registryName })
|
||||
(itemBlock.creativeTab as OrderedCreativeTab?)?.registerOrder(itemBlock)
|
||||
return this
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ object ModItems{
|
||||
@JvmField val END_POWDER = Item().apply { setup("end_powder") }
|
||||
@JvmField val STARDUST = Item().apply { setup("stardust") }
|
||||
|
||||
// Items: Crafted resources
|
||||
// Items: Manufactured resources
|
||||
|
||||
@JvmField val ALTERATION_NEXUS = Item().apply { setup("alteration_nexus") }
|
||||
@JvmField val VOID_ESSENCE = Item().apply { setup("void_essence") }
|
||||
|
Loading…
Reference in New Issue
Block a user