Skip to content

Commit

Permalink
Revert "block/ice.go: implement ice (#724)"
Browse files Browse the repository at this point in the history
Ice melting is currently in a severely broken state
  • Loading branch information
DaPigGuy committed Dec 31, 2022
1 parent 25114a9 commit 8f11188
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 105 deletions.
5 changes: 0 additions & 5 deletions server/block/hash.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

68 changes: 0 additions & 68 deletions server/block/ice.go

This file was deleted.

2 changes: 0 additions & 2 deletions server/block/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ func init() {
world.RegisterBlock(Grass{})
world.RegisterBlock(Gravel{})
world.RegisterBlock(Honeycomb{})
world.RegisterBlock(Ice{})
world.RegisterBlock(InvisibleBedrock{})
world.RegisterBlock(IronBars{})
world.RegisterBlock(Iron{})
Expand Down Expand Up @@ -256,7 +255,6 @@ func init() {
world.RegisterItem(Grindstone{})
world.RegisterItem(HayBale{})
world.RegisterItem(Honeycomb{})
world.RegisterItem(Ice{})
world.RegisterItem(InvisibleBedrock{})
world.RegisterItem(IronBars{})
world.RegisterItem(Iron{})
Expand Down
30 changes: 0 additions & 30 deletions server/block/water.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package block

import (
"github.com/df-mc/dragonfly/server/block/cube"
"github.com/df-mc/dragonfly/server/block/model"
"github.com/df-mc/dragonfly/server/event"
"github.com/df-mc/dragonfly/server/item"
"github.com/df-mc/dragonfly/server/item/potion"
Expand Down Expand Up @@ -113,35 +112,6 @@ func (w Water) ScheduledTick(pos cube.Pos, wo *world.World, _ *rand.Rand) {
tickLiquid(w, pos, wo)
}

// RandomTick ...
func (w Water) RandomTick(pos cube.Pos, wo *world.World, _ *rand.Rand) {
if w.Depth != 8 {
return
}
if wo.Temperature(pos) > 0.0 {
return
}
if wo.Light(pos) > 12 {
return
}
if _, ok := wo.Block(cube.Pos{pos[0], wo.HighestBlock(pos[0], pos[2]), pos[2]}).Model().(model.Solid); ok {
return
}
solidAdjacent := false
pos.Neighbours(func(neighbour cube.Pos) {
if solidAdjacent {
return
}
if neighbour[1] != pos[1] {
return
}
_, solidAdjacent = wo.Block(neighbour).Model().(model.Solid)
}, wo.Range())
if solidAdjacent {
wo.SetBlock(pos, Ice{}, nil)
}
}

// NeighbourUpdateTick ...
func (Water) NeighbourUpdateTick(pos, _ cube.Pos, wo *world.World) {
if wo.Dimension().WaterEvaporates() {
Expand Down

0 comments on commit 8f11188

Please sign in to comment.