Skip to content

Commit a98db03

Browse files
committed
glowstone
Now the nether is lit up more...
1 parent fe74ff0 commit a98db03

File tree

2 files changed

+48
-1
lines changed

2 files changed

+48
-1
lines changed

src/main/java/de/bixilon/minosoft/data/registries/blocks/factory/BlockFactories.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import de.bixilon.minosoft.data.registries.blocks.types.building.dirt.GrassBlock
2929
import de.bixilon.minosoft.data.registries.blocks.types.building.door.DoorBlock
3030
import de.bixilon.minosoft.data.registries.blocks.types.building.end.EndStoneBrick
3131
import de.bixilon.minosoft.data.registries.blocks.types.building.end.Purpur
32+
import de.bixilon.minosoft.data.registries.blocks.types.building.nether.Glowstone
3233
import de.bixilon.minosoft.data.registries.blocks.types.building.nether.Netherrack
3334
import de.bixilon.minosoft.data.registries.blocks.types.building.nether.SoulSand
3435
import de.bixilon.minosoft.data.registries.blocks.types.building.nether.SoulSoil
@@ -164,7 +165,7 @@ object BlockFactories : DefaultFactory<BlockFactory<*>>(
164165
WoodenChestBlock.Chest, WoodenChestBlock.TrappedChest, EnderChestBlock,
165166
ShulkerBoxBlock, ShulkerBoxBlock.White, ShulkerBoxBlock.Orange, ShulkerBoxBlock.Magenta, ShulkerBoxBlock.LightBlue, ShulkerBoxBlock.Yellow, ShulkerBoxBlock.Lime, ShulkerBoxBlock.Pink, ShulkerBoxBlock.Gray, ShulkerBoxBlock.LightGray, ShulkerBoxBlock.Cyan, ShulkerBoxBlock.Purple, ShulkerBoxBlock.Blue, ShulkerBoxBlock.Brown, ShulkerBoxBlock.Green, ShulkerBoxBlock.Green, ShulkerBoxBlock.Red, ShulkerBoxBlock.Black,
166167

167-
Netherrack, SoulSand, SoulSoil,
168+
Glowstone, Netherrack, SoulSand, SoulSoil,
168169

169170
RedstoneTorchBlock.Standing, RedstoneTorchBlock.Wall,
170171
TorchBlock.NormalTorchBlock.Standing, TorchBlock.NormalTorchBlock.Wall,
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* Minosoft
3+
* Copyright (C) 2020-2025 Moritz Zwerger
4+
*
5+
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
6+
*
7+
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
8+
*
9+
* You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
10+
*
11+
* This software is not affiliated with Mojang AB, the original developer of Minecraft.
12+
*/
13+
14+
package de.bixilon.minosoft.data.registries.blocks.types.building.nether
15+
16+
import de.bixilon.kutil.cast.CastUtil.unsafeCast
17+
import de.bixilon.minosoft.data.registries.blocks.factory.BlockFactory
18+
import de.bixilon.minosoft.data.registries.blocks.settings.BlockSettings
19+
import de.bixilon.minosoft.data.registries.blocks.state.BlockState
20+
import de.bixilon.minosoft.data.registries.blocks.state.builder.BlockStateBuilder
21+
import de.bixilon.minosoft.data.registries.blocks.types.Block
22+
import de.bixilon.minosoft.data.registries.blocks.types.building.RockBlock
23+
import de.bixilon.minosoft.data.registries.blocks.types.properties.FullBlock
24+
import de.bixilon.minosoft.data.registries.blocks.types.properties.item.BlockWithItem
25+
import de.bixilon.minosoft.data.registries.identified.Namespaces.minecraft
26+
import de.bixilon.minosoft.data.registries.identified.ResourceLocation
27+
import de.bixilon.minosoft.data.registries.item.items.Item
28+
import de.bixilon.minosoft.data.registries.item.items.tool.pickaxe.PickaxeRequirement
29+
import de.bixilon.minosoft.data.registries.registries.Registries
30+
import de.bixilon.minosoft.data.world.chunk.light.types.LightLevel
31+
import de.bixilon.minosoft.protocol.versions.Version
32+
33+
open class Glowstone(identifier: ResourceLocation = Companion.identifier, settings: BlockSettings) : Block(identifier, settings), PickaxeRequirement, FullBlock, BlockWithItem<Item> {
34+
override val item: Item = this::item.inject(identifier)
35+
override val hardness get() = 0.3f
36+
37+
override fun buildState(version: Version, settings: BlockStateBuilder): BlockState {
38+
return settings.build(this, luminance = LightLevel.MAX_LEVEL)
39+
}
40+
41+
companion object : BlockFactory<Glowstone> {
42+
override val identifier = minecraft("glowstone")
43+
44+
override fun build(registries: Registries, settings: BlockSettings) = Glowstone(settings = settings)
45+
}
46+
}

0 commit comments

Comments
 (0)