-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implement netherrack, soul sand and soul soil
Now flying through the nether should be a lot faster
- Loading branch information
Showing
7 changed files
with
157 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
src/main/java/de/bixilon/minosoft/data/registries/blocks/types/building/nether/Netherrack.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Minosoft | ||
* Copyright (C) 2020-2024 Moritz Zwerger | ||
* | ||
* 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. | ||
* | ||
* 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. | ||
* | ||
* You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
* | ||
* This software is not affiliated with Mojang AB, the original developer of Minecraft. | ||
*/ | ||
|
||
package de.bixilon.minosoft.data.registries.blocks.types.building.nether | ||
|
||
import de.bixilon.minosoft.data.registries.blocks.factory.BlockFactory | ||
import de.bixilon.minosoft.data.registries.blocks.settings.BlockSettings | ||
import de.bixilon.minosoft.data.registries.blocks.types.building.RockBlock | ||
import de.bixilon.minosoft.data.registries.identified.Namespaces.minecraft | ||
import de.bixilon.minosoft.data.registries.identified.ResourceLocation | ||
import de.bixilon.minosoft.data.registries.registries.Registries | ||
|
||
open class Netherrack(identifier: ResourceLocation = Companion.identifier, settings: BlockSettings) : RockBlock(identifier, settings) { | ||
override val hardness get() = 0.4f | ||
|
||
companion object : BlockFactory<Netherrack> { | ||
override val identifier = minecraft("netherrack") | ||
|
||
override fun build(registries: Registries, settings: BlockSettings) = Netherrack(settings = settings) | ||
} | ||
} |
42 changes: 42 additions & 0 deletions
42
src/main/java/de/bixilon/minosoft/data/registries/blocks/types/building/nether/SoulSand.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* Minosoft | ||
* Copyright (C) 2020-2024 Moritz Zwerger | ||
* | ||
* 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. | ||
* | ||
* 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. | ||
* | ||
* You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
* | ||
* This software is not affiliated with Mojang AB, the original developer of Minecraft. | ||
*/ | ||
|
||
package de.bixilon.minosoft.data.registries.blocks.types.building.nether | ||
|
||
import de.bixilon.minosoft.data.registries.blocks.factory.BlockFactory | ||
import de.bixilon.minosoft.data.registries.blocks.settings.BlockSettings | ||
import de.bixilon.minosoft.data.registries.blocks.types.Block | ||
import de.bixilon.minosoft.data.registries.blocks.types.properties.item.BlockWithItem | ||
import de.bixilon.minosoft.data.registries.blocks.types.properties.physics.VelocityBlock | ||
import de.bixilon.minosoft.data.registries.blocks.types.properties.shape.special.FullOpaqueBlock | ||
import de.bixilon.minosoft.data.registries.identified.Namespaces.minecraft | ||
import de.bixilon.minosoft.data.registries.identified.ResourceLocation | ||
import de.bixilon.minosoft.data.registries.item.items.Item | ||
import de.bixilon.minosoft.data.registries.item.items.tool.shovel.ShovelRequirement | ||
import de.bixilon.minosoft.data.registries.registries.Registries | ||
import de.bixilon.minosoft.data.registries.shapes.voxel.VoxelShape | ||
|
||
open class SoulSand(identifier: ResourceLocation = Companion.identifier, settings: BlockSettings) : Block(identifier, settings), ShovelRequirement, FullOpaqueBlock, BlockWithItem<Item>, VelocityBlock { | ||
override val item: Item = this::item.inject(identifier) | ||
override val hardness get() = 0.5f | ||
override val velocity get() = 0.4f | ||
|
||
override val collisionShape get() = COLLISION_SHAPE | ||
|
||
companion object : BlockFactory<SoulSand> { | ||
override val identifier = minecraft("soul_sand") | ||
private val COLLISION_SHAPE = VoxelShape(0.0, 0.0, 0.0, 1.0, 0.875, 1.0) | ||
|
||
override fun build(registries: Registries, settings: BlockSettings) = SoulSand(settings = settings) | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
src/main/java/de/bixilon/minosoft/data/registries/blocks/types/building/nether/SoulSoil.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Minosoft | ||
* Copyright (C) 2020-2024 Moritz Zwerger | ||
* | ||
* 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. | ||
* | ||
* 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. | ||
* | ||
* You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
* | ||
* This software is not affiliated with Mojang AB, the original developer of Minecraft. | ||
*/ | ||
|
||
package de.bixilon.minosoft.data.registries.blocks.types.building.nether | ||
|
||
import de.bixilon.minosoft.data.registries.blocks.factory.BlockFactory | ||
import de.bixilon.minosoft.data.registries.blocks.settings.BlockSettings | ||
import de.bixilon.minosoft.data.registries.blocks.types.Block | ||
import de.bixilon.minosoft.data.registries.blocks.types.properties.item.BlockWithItem | ||
import de.bixilon.minosoft.data.registries.blocks.types.properties.shape.special.FullOpaqueBlock | ||
import de.bixilon.minosoft.data.registries.identified.Namespaces.minecraft | ||
import de.bixilon.minosoft.data.registries.identified.ResourceLocation | ||
import de.bixilon.minosoft.data.registries.item.items.Item | ||
import de.bixilon.minosoft.data.registries.item.items.tool.shovel.ShovelRequirement | ||
import de.bixilon.minosoft.data.registries.registries.Registries | ||
|
||
open class SoulSoil(identifier: ResourceLocation = Companion.identifier, settings: BlockSettings) : Block(identifier, settings), ShovelRequirement, FullOpaqueBlock, BlockWithItem<Item> { | ||
override val item: Item = this::item.inject(identifier) | ||
override val hardness get() = 0.5f | ||
|
||
companion object : BlockFactory<SoulSoil> { | ||
override val identifier = minecraft("soul_soil") | ||
|
||
override fun build(registries: Registries, settings: BlockSettings) = SoulSoil(settings = settings) | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
src/main/java/de/bixilon/minosoft/data/registries/blocks/types/building/stone/Bedrock.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Minosoft | ||
* Copyright (C) 2020-2024 Moritz Zwerger | ||
* | ||
* 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. | ||
* | ||
* 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. | ||
* | ||
* You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
* | ||
* This software is not affiliated with Mojang AB, the original developer of Minecraft. | ||
*/ | ||
|
||
package de.bixilon.minosoft.data.registries.blocks.types.building.stone | ||
|
||
import de.bixilon.minosoft.data.registries.blocks.factory.BlockFactory | ||
import de.bixilon.minosoft.data.registries.blocks.settings.BlockSettings | ||
import de.bixilon.minosoft.data.registries.blocks.types.Block | ||
import de.bixilon.minosoft.data.registries.blocks.types.properties.hardness.UnbreakableBlock | ||
import de.bixilon.minosoft.data.registries.blocks.types.properties.item.BlockWithItem | ||
import de.bixilon.minosoft.data.registries.blocks.types.properties.shape.special.FullOpaqueBlock | ||
import de.bixilon.minosoft.data.registries.identified.Namespaces.minecraft | ||
import de.bixilon.minosoft.data.registries.identified.ResourceLocation | ||
import de.bixilon.minosoft.data.registries.item.items.Item | ||
import de.bixilon.minosoft.data.registries.registries.Registries | ||
|
||
open class Bedrock(identifier: ResourceLocation = Companion.identifier, settings: BlockSettings) : Block(identifier, settings), FullOpaqueBlock, BlockWithItem<Item>, UnbreakableBlock { | ||
override val item: Item = this::item.inject(identifier) | ||
|
||
companion object : BlockFactory<Bedrock> { | ||
override val identifier = minecraft("bedrock") | ||
|
||
override fun build(registries: Registries, settings: BlockSettings) = Bedrock(settings = settings) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters