diff --git a/level/block/block.go b/level/block/block.go index 23b1119..8cb03c1 100644 --- a/level/block/block.go +++ b/level/block/block.go @@ -44,7 +44,7 @@ func init() { ToStateID = make(map[Block]int, len(states)) StateList = make([]Block, 0, len(states)) for _, state := range states { - block := fromID[state.Name] + block := FromID[state.Name] if state.Properties.Type != nbt.TagEnd { err := state.Properties.Unmarshal(&block) if err != nil { @@ -59,8 +59,3 @@ func init() { } BitsPerBlock = bits.Len(uint(len(StateList))) } - -func DefaultBlock(id string) (b Block, ok bool) { - b, ok = fromID[id] - return -} diff --git a/level/block/blocks.go b/level/block/blocks.go index 77fe601..cdc84a5 100644 --- a/level/block/blocks.go +++ b/level/block/blocks.go @@ -3664,7 +3664,7 @@ func (RawGoldBlock) ID() string { return "minecraft:raw_gold_bloc func (PottedAzaleaBush) ID() string { return "minecraft:potted_azalea_bush" } func (PottedFloweringAzaleaBush) ID() string { return "minecraft:potted_flowering_azalea_bush" } -var fromID = map[string]Block{ +var FromID = map[string]Block{ "minecraft:air": Air{}, "minecraft:stone": Stone{}, "minecraft:granite": Granite{}, diff --git a/save/chunk.go b/save/chunk.go index 0101f4c..86cb10a 100644 --- a/save/chunk.go +++ b/save/chunk.go @@ -48,7 +48,7 @@ type BlockState struct { } func (s *BlockState) Block() block.Block { - b, ok := block.DefaultBlock(s.Name) + b, ok := block.FromID[s.Name] if !ok { return nil } diff --git a/server/playermove.go b/server/playermove.go deleted file mode 100644 index 2ab3992..0000000 --- a/server/playermove.go +++ /dev/null @@ -1,14 +0,0 @@ -package server - -type EntitySet struct { -} - -type entityPosition struct { - player *Player - x, y, z float64 - yaw, pitch float32 -} - -func NewEntitySet() *EntitySet { - return &EntitySet{} -}