-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
268 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package block | ||
|
||
import "github.com/dynamitemc/dynamite/server/world/chunk" | ||
|
||
type AcaciaLog struct { | ||
Stripped bool | ||
Axis Axis | ||
} | ||
|
||
func (d AcaciaLog) EncodedName() string { | ||
if d.Stripped { | ||
return "minecraft:stripped_acacia_log" | ||
} | ||
return "minecraft:acacia_log" | ||
} | ||
|
||
func (g AcaciaLog) Properties() map[string]string { | ||
return map[string]string{ | ||
"axis": g.Axis, | ||
} | ||
} | ||
|
||
func (AcaciaLog) New(n string, p map[string]string) chunk.Block { | ||
return AcaciaLog{ | ||
Stripped: n == "minecraft:stripped_acacia_log", | ||
Axis: p["axis"], | ||
} | ||
} | ||
|
||
func (AcaciaLog) BreakInfo() BreakInfo { | ||
return BreakInfo{ | ||
Hardness: 2, | ||
} | ||
} |
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
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,34 @@ | ||
package block | ||
|
||
import "github.com/dynamitemc/dynamite/server/world/chunk" | ||
|
||
type BirchLog struct { | ||
Stripped bool | ||
Axis Axis | ||
} | ||
|
||
func (d BirchLog) EncodedName() string { | ||
if d.Stripped { | ||
return "minecraft:stripped_birch_log" | ||
} | ||
return "minecraft:birch_log" | ||
} | ||
|
||
func (g BirchLog) Properties() map[string]string { | ||
return map[string]string{ | ||
"axis": g.Axis, | ||
} | ||
} | ||
|
||
func (BirchLog) New(n string, p map[string]string) chunk.Block { | ||
return BirchLog{ | ||
Stripped: n == "minecraft:stripped_birch_log", | ||
Axis: p["axis"], | ||
} | ||
} | ||
|
||
func (BirchLog) BreakInfo() BreakInfo { | ||
return BreakInfo{ | ||
Hardness: 2, | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package block | ||
|
||
import "github.com/dynamitemc/dynamite/server/world/chunk" | ||
|
||
type CherryLog struct { | ||
Stripped bool | ||
Axis Axis | ||
} | ||
|
||
func (d CherryLog) EncodedName() string { | ||
if d.Stripped { | ||
return "minecraft:stripped_cherry_log" | ||
} | ||
return "minecraft:cherry_log" | ||
} | ||
|
||
func (g CherryLog) Properties() map[string]string { | ||
return map[string]string{ | ||
"axis": g.Axis, | ||
} | ||
} | ||
|
||
func (CherryLog) New(n string, p map[string]string) chunk.Block { | ||
return CherryLog{ | ||
Stripped: n == "minecraft:stripped_cherry_log", | ||
Axis: p["axis"], | ||
} | ||
} | ||
|
||
func (CherryLog) BreakInfo() BreakInfo { | ||
return BreakInfo{ | ||
Hardness: 2, | ||
} | ||
} |
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,44 @@ | ||
package block | ||
|
||
import ( | ||
"github.com/dynamitemc/dynamite/server/world/chunk" | ||
) | ||
|
||
type Axis = string | ||
|
||
const ( | ||
AxisX Axis = "x" | ||
AxisY Axis = "y" | ||
AxisZ Axis = "z" | ||
) | ||
|
||
type DarkOakLog struct { | ||
Stripped bool | ||
Axis Axis | ||
} | ||
|
||
func (d DarkOakLog) EncodedName() string { | ||
if d.Stripped { | ||
return "minecraft:stripped_dark_oak_log" | ||
} | ||
return "minecraft:dark_oak_log" | ||
} | ||
|
||
func (g DarkOakLog) Properties() map[string]string { | ||
return map[string]string{ | ||
"axis": g.Axis, | ||
} | ||
} | ||
|
||
func (DarkOakLog) New(n string, p map[string]string) chunk.Block { | ||
return DarkOakLog{ | ||
Stripped: n == "minecraft:stripped_dark_oak_log", | ||
Axis: p["axis"], | ||
} | ||
} | ||
|
||
func (DarkOakLog) BreakInfo() BreakInfo { | ||
return BreakInfo{ | ||
Hardness: 2, | ||
} | ||
} |
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
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,34 @@ | ||
package block | ||
|
||
import "github.com/dynamitemc/dynamite/server/world/chunk" | ||
|
||
type OakLog struct { | ||
Stripped bool | ||
Axis Axis | ||
} | ||
|
||
func (d OakLog) EncodedName() string { | ||
if d.Stripped { | ||
return "minecraft:stripped_oak_log" | ||
} | ||
return "minecraft:oak_log" | ||
} | ||
|
||
func (g OakLog) Properties() map[string]string { | ||
return map[string]string{ | ||
"axis": g.Axis, | ||
} | ||
} | ||
|
||
func (OakLog) New(n string, p map[string]string) chunk.Block { | ||
return OakLog{ | ||
Stripped: n == "minecraft:stripped_oak_log", | ||
Axis: p["axis"], | ||
} | ||
} | ||
|
||
func (OakLog) BreakInfo() BreakInfo { | ||
return BreakInfo{ | ||
Hardness: 2, | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package block | ||
|
||
import "github.com/dynamitemc/dynamite/server/world/chunk" | ||
|
||
type SpruceLog struct { | ||
Stripped bool | ||
Axis Axis | ||
} | ||
|
||
func (d SpruceLog) EncodedName() string { | ||
if d.Stripped { | ||
return "minecraft:stripped_spruce_log" | ||
} | ||
return "minecraft:spruce_log" | ||
} | ||
|
||
func (g SpruceLog) Properties() map[string]string { | ||
return map[string]string{ | ||
"axis": g.Axis, | ||
} | ||
} | ||
|
||
func (SpruceLog) New(n string, p map[string]string) chunk.Block { | ||
return SpruceLog{ | ||
Stripped: n == "minecraft:stripped_spruce_log", | ||
Axis: p["axis"], | ||
} | ||
} | ||
|
||
func (SpruceLog) BreakInfo() BreakInfo { | ||
return BreakInfo{ | ||
Hardness: 2, | ||
} | ||
} |
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
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
Oops, something went wrong.