Skip to content

Commit

Permalink
add floater and make balloon flammable (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pecant-Pie authored Jan 14, 2024
1 parent a073a7f commit 9607294
Show file tree
Hide file tree
Showing 10 changed files with 67 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ import net.minecraft.world.item.BlockItem
import net.minecraft.world.item.CreativeModeTab
import net.minecraft.world.item.Item
import net.minecraft.world.level.Explosion
import net.minecraft.world.level.block.Block
import net.minecraft.world.level.block.Blocks
import net.minecraft.world.level.block.FireBlock
import net.minecraft.world.level.block.OreBlock
import net.minecraft.world.level.block.*
import net.minecraft.world.level.block.state.BlockBehaviour
import org.valkyrienskies.mod.common.hooks.VSGameEvents
import org.valkyrienskies.tournament.util.extension.explodeShip
Expand All @@ -32,6 +29,7 @@ object TournamentBlocks {
lateinit var BALLAST : RegistrySupplier<BallastBlock>
lateinit var POWERED_BALLOON : RegistrySupplier<BalloonBlock>
lateinit var BALLOON : RegistrySupplier<BalloonBlock>
lateinit var FLOATER : RegistrySupplier<Block>
lateinit var THRUSTER : RegistrySupplier<ThrusterBlock>
lateinit var THRUSTER_TINY : RegistrySupplier<ThrusterBlock>
lateinit var SPINNER : RegistrySupplier<SpinnerBlock>
Expand All @@ -53,6 +51,11 @@ object TournamentBlocks {
BALLAST = register("ballast", ::BallastBlock)
POWERED_BALLOON = register("balloon", ::PoweredBalloonBlock)
BALLOON = register("balloon_unpowered", ::BalloonBlock)
FLOATER = register("floater") { Block(
BlockBehaviour.Properties.of(Material.WOOD)
.sound(SoundType.WOOD)
.strength(1.0f, 2.0f)
)}
THRUSTER = register("thruster") {
ThrusterBlock(
{ 1.0 },
Expand Down Expand Up @@ -159,6 +162,8 @@ object TournamentBlocks {
fun makeFlammables() {
flammableBlock(SEAT.get(), 15, 25)
flammableBlock(POWERED_BALLOON.get(), 30, 60)
flammableBlock(BALLOON.get(), 30, 60)
flammableBlock(FLOATER.get(), 30, 60)
}

fun registerItems(items: DeferredRegister<Item>) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "vs_tournament:block/floater"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"block.vs_tournament.ballast": "Ballast",
"block.vs_tournament.balloon": "Powered Balloon",
"block.vs_tournament.balloon_unpowered": "Balloon",
"block.vs_tournament.floater": "Floater",
"block.vs_tournament.spinner": "Spinner",
"block.vs_tournament.thruster": "Thruster",
"block.vs_tournament.tiny_thruster": "Tiny Thruster",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "vs_tournament:block/floater"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"parent": "vs_tournament:block/floater"
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"replace": false,
"values": [
"vs_tournament:seat"
"vs_tournament:seat",
"vs_tournament:floater"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1.0,
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"name": "vs_tournament:floater"
}
]
}
]
}
20 changes: 20 additions & 0 deletions common/src/main/resources/data/vs_tournament/recipes/floater.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
" # ",
"#S#",
" # "
],
"key": {
"#": {
"tag": "minecraft:planks"
},
"S": {
"item": "minecraft:string"
}
},
"result": {
"item": "vs_tournament:floater",
"count": 4
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,9 @@
{
"block": "vs_tournament:sensor",
"mass": 200.0
},
{
"block": "vs_tournament:floater",
"mass": 200.0
}
]

0 comments on commit 9607294

Please sign in to comment.