Skip to content

Commit

Permalink
Changed all unused parameter names to _.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandertv committed Nov 25, 2024
1 parent 8cb587d commit 4cf7559
Show file tree
Hide file tree
Showing 160 changed files with 253 additions and 254 deletions.
6 changes: 3 additions & 3 deletions server/block/anvil.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func (a Anvil) BreakInfo() BreakInfo {
}

// Activate ...
func (Anvil) Activate(pos cube.Pos, clickedFace cube.Face, tx *world.Tx, u item.User, ctx *item.UseContext) bool {
func (Anvil) Activate(pos cube.Pos, _ cube.Face, tx *world.Tx, u item.User, _ *item.UseContext) bool {
if opener, ok := u.(ContainerOpener); ok {
opener.OpenBlockContainer(pos, tx)
return true
Expand All @@ -40,7 +40,7 @@ func (Anvil) Activate(pos cube.Pos, clickedFace cube.Face, tx *world.Tx, u item.
}

// UseOnBlock ...
func (a Anvil) UseOnBlock(pos cube.Pos, face cube.Face, clickPos mgl64.Vec3, tx *world.Tx, user item.User, ctx *item.UseContext) (used bool) {
func (a Anvil) UseOnBlock(pos cube.Pos, face cube.Face, _ mgl64.Vec3, tx *world.Tx, user item.User, ctx *item.UseContext) (used bool) {
pos, _, used = firstReplaceable(tx, pos, face, a)
if !used {
return
Expand All @@ -51,7 +51,7 @@ func (a Anvil) UseOnBlock(pos cube.Pos, face cube.Face, clickPos mgl64.Vec3, tx
}

// NeighbourUpdateTick ...
func (a Anvil) NeighbourUpdateTick(pos, changedNeighbour cube.Pos, tx *world.Tx) {
func (a Anvil) NeighbourUpdateTick(pos, _ cube.Pos, tx *world.Tx) {
a.fall(a, pos, tx)
}

Expand Down
4 changes: 2 additions & 2 deletions server/block/banner.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func (Banner) FuelInfo() item.FuelInfo {
}

// UseOnBlock ...
func (b Banner) UseOnBlock(pos cube.Pos, face cube.Face, clickPos mgl64.Vec3, tx *world.Tx, user item.User, ctx *item.UseContext) (used bool) {
func (b Banner) UseOnBlock(pos cube.Pos, face cube.Face, _ mgl64.Vec3, tx *world.Tx, user item.User, ctx *item.UseContext) (used bool) {
pos, face, used = firstReplaceable(tx, pos, face, b)
if !used || face == cube.FaceDown {
return false
Expand All @@ -58,7 +58,7 @@ func (b Banner) UseOnBlock(pos cube.Pos, face cube.Face, clickPos mgl64.Vec3, tx
}

// NeighbourUpdateTick ...
func (b Banner) NeighbourUpdateTick(pos, changedNeighbour cube.Pos, tx *world.Tx) {
func (b Banner) NeighbourUpdateTick(pos, _ cube.Pos, tx *world.Tx) {
if b.Attach.hanging {
if _, ok := tx.Block(pos.Side(b.Attach.facing.Opposite().Face())).(Air); ok {
tx.SetBlock(pos, nil, nil)
Expand Down
4 changes: 2 additions & 2 deletions server/block/barrel.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func (b Barrel) RemoveViewer(v ContainerViewer, tx *world.Tx, pos cube.Pos) {
}

// Activate ...
func (b Barrel) Activate(pos cube.Pos, clickedFace cube.Face, tx *world.Tx, u item.User, ctx *item.UseContext) bool {
func (b Barrel) Activate(pos cube.Pos, _ cube.Face, tx *world.Tx, u item.User, _ *item.UseContext) bool {
if opener, ok := u.(ContainerOpener); ok {
opener.OpenBlockContainer(pos, tx)
return true
Expand All @@ -109,7 +109,7 @@ func (b Barrel) Activate(pos cube.Pos, clickedFace cube.Face, tx *world.Tx, u it
}

// UseOnBlock ...
func (b Barrel) UseOnBlock(pos cube.Pos, face cube.Face, clickPos mgl64.Vec3, tx *world.Tx, user item.User, ctx *item.UseContext) (used bool) {
func (b Barrel) UseOnBlock(pos cube.Pos, face cube.Face, _ mgl64.Vec3, tx *world.Tx, user item.User, ctx *item.UseContext) (used bool) {
pos, _, used = firstReplaceable(tx, pos, face, b)
if !used {
return
Expand Down
2 changes: 1 addition & 1 deletion server/block/basalt.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type Basalt struct {
}

// UseOnBlock ...
func (b Basalt) UseOnBlock(pos cube.Pos, face cube.Face, clickPos mgl64.Vec3, tx *world.Tx, user item.User, ctx *item.UseContext) (used bool) {
func (b Basalt) UseOnBlock(pos cube.Pos, face cube.Face, _ mgl64.Vec3, tx *world.Tx, user item.User, ctx *item.UseContext) (used bool) {
pos, face, used = firstReplaceable(tx, pos, face, b)
if !used {
return
Expand Down
2 changes: 1 addition & 1 deletion server/block/beacon.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func (b Beacon) BreakInfo() BreakInfo {
}

// Activate manages the opening of a beacon by activating it.
func (b Beacon) Activate(pos cube.Pos, clickedFace cube.Face, tx *world.Tx, u item.User, ctx *item.UseContext) bool {
func (b Beacon) Activate(pos cube.Pos, _ cube.Face, tx *world.Tx, u item.User, _ *item.UseContext) bool {
if opener, ok := u.(ContainerOpener); ok {
opener.OpenBlockContainer(pos, tx)
return true
Expand Down
2 changes: 1 addition & 1 deletion server/block/beetroot_seeds.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func (b BeetrootSeeds) BoneMeal(pos cube.Pos, tx *world.Tx) bool {
}

// UseOnBlock ...
func (b BeetrootSeeds) UseOnBlock(pos cube.Pos, face cube.Face, clickPos mgl64.Vec3, tx *world.Tx, user item.User, ctx *item.UseContext) bool {
func (b BeetrootSeeds) UseOnBlock(pos cube.Pos, face cube.Face, _ mgl64.Vec3, tx *world.Tx, user item.User, ctx *item.UseContext) bool {
pos, _, used := firstReplaceable(tx, pos, face, b)
if !used {
return false
Expand Down
6 changes: 3 additions & 3 deletions server/block/blast_furnace.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func NewBlastFurnace(face cube.Direction) BlastFurnace {
}

// Tick is called to check if the blast furnace should update and start or stop smelting.
func (b BlastFurnace) Tick(currentTick int64, pos cube.Pos, tx *world.Tx) {
func (b BlastFurnace) Tick(_ int64, pos cube.Pos, tx *world.Tx) {
if b.Lit && rand.Float64() <= 0.016 { // Every three or so seconds.
tx.PlaySound(pos.Vec3Centre(), sound.BlastFurnaceCrackle{})
}
Expand All @@ -60,7 +60,7 @@ func (b BlastFurnace) EncodeBlock() (name string, properties map[string]interfac
}

// UseOnBlock ...
func (b BlastFurnace) UseOnBlock(pos cube.Pos, face cube.Face, clickPos mgl64.Vec3, tx *world.Tx, user item.User, ctx *item.UseContext) bool {
func (b BlastFurnace) UseOnBlock(pos cube.Pos, face cube.Face, _ mgl64.Vec3, tx *world.Tx, user item.User, ctx *item.UseContext) bool {
pos, _, used := firstReplaceable(tx, pos, face, b)
if !used {
return false
Expand All @@ -81,7 +81,7 @@ func (b BlastFurnace) BreakInfo() BreakInfo {
}

// Activate ...
func (b BlastFurnace) Activate(pos cube.Pos, clickedFace cube.Face, tx *world.Tx, u item.User, ctx *item.UseContext) bool {
func (b BlastFurnace) Activate(pos cube.Pos, _ cube.Face, tx *world.Tx, u item.User, _ *item.UseContext) bool {
if opener, ok := u.(ContainerOpener); ok {
opener.OpenBlockContainer(pos, tx)
return true
Expand Down
2 changes: 1 addition & 1 deletion server/block/bone.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func (b Bone) Instrument() sound.Instrument {
}

// UseOnBlock handles the rotational placing of bone blocks.
func (b Bone) UseOnBlock(pos cube.Pos, face cube.Face, clickPos mgl64.Vec3, tx *world.Tx, user item.User, ctx *item.UseContext) (used bool) {
func (b Bone) UseOnBlock(pos cube.Pos, face cube.Face, _ mgl64.Vec3, tx *world.Tx, user item.User, ctx *item.UseContext) (used bool) {
pos, face, used = firstReplaceable(tx, pos, face, b)
if !used {
return
Expand Down
8 changes: 4 additions & 4 deletions server/block/cactus.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type Cactus struct {
}

// UseOnBlock handles making sure the neighbouring blocks are air.
func (c Cactus) UseOnBlock(pos cube.Pos, face cube.Face, clickPos mgl64.Vec3, tx *world.Tx, user item.User, ctx *item.UseContext) (used bool) {
func (c Cactus) UseOnBlock(pos cube.Pos, face cube.Face, _ mgl64.Vec3, tx *world.Tx, user item.User, ctx *item.UseContext) (used bool) {
pos, _, used = firstReplaceable(tx, pos, face, c)
if !used {
return false
Expand All @@ -33,7 +33,7 @@ func (c Cactus) UseOnBlock(pos cube.Pos, face cube.Face, clickPos mgl64.Vec3, tx
}

// NeighbourUpdateTick ...
func (c Cactus) NeighbourUpdateTick(pos, changedNeighbour cube.Pos, tx *world.Tx) {
func (c Cactus) NeighbourUpdateTick(pos, _ cube.Pos, tx *world.Tx) {
if !c.canGrowHere(pos, tx, true) {
tx.SetBlock(pos, nil, nil)
tx.AddParticle(pos.Vec3Centre(), particle.BlockBreak{Block: c})
Expand All @@ -42,7 +42,7 @@ func (c Cactus) NeighbourUpdateTick(pos, changedNeighbour cube.Pos, tx *world.Tx
}

// RandomTick ...
func (c Cactus) RandomTick(pos cube.Pos, tx *world.Tx, r *rand.Rand) {
func (c Cactus) RandomTick(pos cube.Pos, tx *world.Tx, _ *rand.Rand) {
if c.Age < 15 {
c.Age++
} else if c.Age == 15 {
Expand Down Expand Up @@ -75,7 +75,7 @@ func (c Cactus) canGrowHere(pos cube.Pos, tx *world.Tx, recursive bool) bool {
}

// EntityInside ...
func (c Cactus) EntityInside(pos cube.Pos, tx *world.Tx, e world.Entity) {
func (c Cactus) EntityInside(_ cube.Pos, _ *world.Tx, e world.Entity) {
if l, ok := e.(livingEntity); ok && !l.AttackImmune() {
l.Hurt(0.5, DamageSource{Block: c})
}
Expand Down
6 changes: 3 additions & 3 deletions server/block/cake.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func (c Cake) SideClosed(cube.Pos, cube.Pos, *world.Tx) bool {
}

// UseOnBlock ...
func (c Cake) UseOnBlock(pos cube.Pos, face cube.Face, clickPos mgl64.Vec3, tx *world.Tx, user item.User, ctx *item.UseContext) bool {
func (c Cake) UseOnBlock(pos cube.Pos, face cube.Face, _ mgl64.Vec3, tx *world.Tx, user item.User, ctx *item.UseContext) bool {
pos, _, used := firstReplaceable(tx, pos, face, c)
if !used {
return false
Expand All @@ -40,15 +40,15 @@ func (c Cake) UseOnBlock(pos cube.Pos, face cube.Face, clickPos mgl64.Vec3, tx *
}

// NeighbourUpdateTick ...
func (c Cake) NeighbourUpdateTick(pos, changedNeighbour cube.Pos, tx *world.Tx) {
func (c Cake) NeighbourUpdateTick(pos, _ cube.Pos, tx *world.Tx) {
if _, air := tx.Block(pos.Side(cube.FaceDown)).(Air); air {
tx.SetBlock(pos, nil, nil)
tx.AddParticle(pos.Vec3Centre(), particle.BlockBreak{Block: c})
}
}

// Activate ...
func (c Cake) Activate(pos cube.Pos, clickedFace cube.Face, tx *world.Tx, u item.User, ctx *item.UseContext) bool {
func (c Cake) Activate(pos cube.Pos, _ cube.Face, tx *world.Tx, u item.User, _ *item.UseContext) bool {
if i, ok := u.(interface {
Saturate(food int, saturation float64)
}); ok {
Expand Down
10 changes: 5 additions & 5 deletions server/block/campfire.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func (c Campfire) LightEmissionLevel() uint8 {
}

// Ignite ...
func (c Campfire) Ignite(pos cube.Pos, tx *world.Tx, igniter world.Entity) bool {
func (c Campfire) Ignite(pos cube.Pos, tx *world.Tx, _ world.Entity) bool {
tx.PlaySound(pos.Vec3(), sound.Ignite{})
if !c.Extinguished {
return false
Expand Down Expand Up @@ -116,7 +116,7 @@ func (c Campfire) extinguish(pos cube.Pos, tx *world.Tx) {
}

// Activate ...
func (c Campfire) Activate(pos cube.Pos, clickedFace cube.Face, tx *world.Tx, u item.User, ctx *item.UseContext) bool {
func (c Campfire) Activate(pos cube.Pos, _ cube.Face, tx *world.Tx, u item.User, ctx *item.UseContext) bool {
held, _ := u.HeldItems()
if held.Empty() {
return false
Expand Down Expand Up @@ -151,7 +151,7 @@ func (c Campfire) Activate(pos cube.Pos, clickedFace cube.Face, tx *world.Tx, u
}

// UseOnBlock ...
func (c Campfire) UseOnBlock(pos cube.Pos, face cube.Face, clickPos mgl64.Vec3, tx *world.Tx, user item.User, ctx *item.UseContext) (used bool) {
func (c Campfire) UseOnBlock(pos cube.Pos, face cube.Face, _ mgl64.Vec3, tx *world.Tx, user item.User, ctx *item.UseContext) (used bool) {
pos, _, used = firstReplaceable(tx, pos, face, c)
if !used {
return
Expand All @@ -165,7 +165,7 @@ func (c Campfire) UseOnBlock(pos cube.Pos, face cube.Face, clickPos mgl64.Vec3,
}

// Tick is called to cook the items within the campfire.
func (c Campfire) Tick(currentTick int64, pos cube.Pos, tx *world.Tx) {
func (c Campfire) Tick(_ int64, pos cube.Pos, tx *world.Tx) {
if c.Extinguished {
// Extinguished, do nothing.
return
Expand Down Expand Up @@ -197,7 +197,7 @@ func (c Campfire) Tick(currentTick int64, pos cube.Pos, tx *world.Tx) {
}

// NeighbourUpdateTick ...
func (c Campfire) NeighbourUpdateTick(pos, changedNeighbour cube.Pos, tx *world.Tx) {
func (c Campfire) NeighbourUpdateTick(pos, _ cube.Pos, tx *world.Tx) {
_, ok := tx.Liquid(pos)
liquid, okTwo := tx.Liquid(pos.Side(cube.FaceUp))
if (ok || (okTwo && liquid.LiquidType() == "water")) && !c.Extinguished {
Expand Down
4 changes: 2 additions & 2 deletions server/block/carpet.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ func (Carpet) HasLiquidDrops() bool {
}

// NeighbourUpdateTick ...
func (c Carpet) NeighbourUpdateTick(pos, changedNeighbour cube.Pos, tx *world.Tx) {
func (c Carpet) NeighbourUpdateTick(pos, _ cube.Pos, tx *world.Tx) {
if _, ok := tx.Block(pos.Side(cube.FaceDown)).(Air); ok {
tx.SetBlock(pos, nil, nil)
dropItem(tx, item.NewStack(c, 1), pos.Vec3Centre())
}
}

// UseOnBlock handles not placing carpets on top of air blocks.
func (c Carpet) UseOnBlock(pos cube.Pos, face cube.Face, clickPos mgl64.Vec3, tx *world.Tx, user item.User, ctx *item.UseContext) (used bool) {
func (c Carpet) UseOnBlock(pos cube.Pos, face cube.Face, _ mgl64.Vec3, tx *world.Tx, user item.User, ctx *item.UseContext) (used bool) {
pos, _, used = firstReplaceable(tx, pos, face, c)
if !used {
return
Expand Down
4 changes: 2 additions & 2 deletions server/block/carrot.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func (c Carrot) ConsumeDuration() time.Duration {
}

// Consume ...
func (c Carrot) Consume(tx *world.Tx, co item.Consumer) item.Stack {
func (c Carrot) Consume(_ *world.Tx, co item.Consumer) item.Stack {
co.Saturate(3, 3.6)
return item.Stack{}
}
Expand All @@ -48,7 +48,7 @@ func (c Carrot) BoneMeal(pos cube.Pos, tx *world.Tx) bool {
}

// UseOnBlock ...
func (c Carrot) UseOnBlock(pos cube.Pos, face cube.Face, clickPos mgl64.Vec3, tx *world.Tx, user item.User, ctx *item.UseContext) bool {
func (c Carrot) UseOnBlock(pos cube.Pos, face cube.Face, _ mgl64.Vec3, tx *world.Tx, user item.User, ctx *item.UseContext) bool {
pos, _, used := firstReplaceable(tx, pos, face, c)
if !used {
return false
Expand Down
2 changes: 1 addition & 1 deletion server/block/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func (Chain) SideClosed(cube.Pos, cube.Pos, *world.Tx) bool {
}

// UseOnBlock ...
func (c Chain) UseOnBlock(pos cube.Pos, face cube.Face, clickPos mgl64.Vec3, tx *world.Tx, user item.User, ctx *item.UseContext) (used bool) {
func (c Chain) UseOnBlock(pos cube.Pos, face cube.Face, _ mgl64.Vec3, tx *world.Tx, user item.User, ctx *item.UseContext) (used bool) {
pos, face, used = firstReplaceable(tx, pos, face, c)
if !used {
return
Expand Down
4 changes: 2 additions & 2 deletions server/block/chest.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func (c Chest) RemoveViewer(v ContainerViewer, tx *world.Tx, pos cube.Pos) {
}

// Activate ...
func (c Chest) Activate(pos cube.Pos, clickedFace cube.Face, tx *world.Tx, u item.User, ctx *item.UseContext) bool {
func (c Chest) Activate(pos cube.Pos, _ cube.Face, tx *world.Tx, u item.User, _ *item.UseContext) bool {
if opener, ok := u.(ContainerOpener); ok {
if c.paired {
if d, ok := tx.Block(c.pairPos(pos).Side(cube.FaceUp)).(LightDiffuser); !ok || d.LightDiffusionLevel() > 2 {
Expand All @@ -162,7 +162,7 @@ func (c Chest) Activate(pos cube.Pos, clickedFace cube.Face, tx *world.Tx, u ite
}

// UseOnBlock ...
func (c Chest) UseOnBlock(pos cube.Pos, face cube.Face, clickPos mgl64.Vec3, tx *world.Tx, user item.User, ctx *item.UseContext) (used bool) {
func (c Chest) UseOnBlock(pos cube.Pos, face cube.Face, _ mgl64.Vec3, tx *world.Tx, user item.User, ctx *item.UseContext) (used bool) {
pos, _, used = firstReplaceable(tx, pos, face, c)
if !used {
return
Expand Down
4 changes: 2 additions & 2 deletions server/block/cocoa_bean.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func (c CocoaBean) HasLiquidDrops() bool {
}

// NeighbourUpdateTick ...
func (c CocoaBean) NeighbourUpdateTick(pos, changedNeighbour cube.Pos, tx *world.Tx) {
func (c CocoaBean) NeighbourUpdateTick(pos, _ cube.Pos, tx *world.Tx) {
var woodType WoodType
switch b := tx.Block(pos.Side(c.Facing.Face())).(type) {
case Log:
Expand All @@ -49,7 +49,7 @@ func (c CocoaBean) NeighbourUpdateTick(pos, changedNeighbour cube.Pos, tx *world
}

// UseOnBlock ...
func (c CocoaBean) UseOnBlock(pos cube.Pos, face cube.Face, clickPos mgl64.Vec3, tx *world.Tx, user item.User, ctx *item.UseContext) bool {
func (c CocoaBean) UseOnBlock(pos cube.Pos, face cube.Face, _ mgl64.Vec3, tx *world.Tx, user item.User, ctx *item.UseContext) bool {
pos, _, used := firstReplaceable(tx, pos, face, c)
if !used {
return false
Expand Down
4 changes: 2 additions & 2 deletions server/block/composter.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func (c Composter) BreakInfo() BreakInfo {
}

// Activate ...
func (c Composter) Activate(pos cube.Pos, clickedFace cube.Face, tx *world.Tx, u item.User, ctx *item.UseContext) bool {
func (c Composter) Activate(pos cube.Pos, _ cube.Face, tx *world.Tx, u item.User, ctx *item.UseContext) bool {
if c.Level >= 7 {
if c.Level == 8 {
c.Level = 0
Expand Down Expand Up @@ -130,7 +130,7 @@ func (c Composter) fill(it item.Stack, pos cube.Pos, tx *world.Tx) bool {
}

// ScheduledTick ...
func (c Composter) ScheduledTick(pos cube.Pos, tx *world.Tx, r *rand.Rand) {
func (c Composter) ScheduledTick(pos cube.Pos, tx *world.Tx, _ *rand.Rand) {
if c.Level == 7 {
c.Level = 8
tx.SetBlock(pos, c, nil)
Expand Down
2 changes: 1 addition & 1 deletion server/block/concrete_powder.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func (c ConcretePowder) Solidifies(pos cube.Pos, tx *world.Tx) bool {
}

// NeighbourUpdateTick ...
func (c ConcretePowder) NeighbourUpdateTick(pos, changedNeighbour cube.Pos, tx *world.Tx) {
func (c ConcretePowder) NeighbourUpdateTick(pos, _ cube.Pos, tx *world.Tx) {
for i := cube.Face(0); i < 6; i++ {
if _, ok := tx.Block(pos.Side(i)).(Water); ok {
tx.SetBlock(pos, Concrete{Colour: c.Colour}, nil)
Expand Down
6 changes: 3 additions & 3 deletions server/block/coral.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type Coral struct {
}

// UseOnBlock ...
func (c Coral) UseOnBlock(pos cube.Pos, face cube.Face, clickPos mgl64.Vec3, tx *world.Tx, user item.User, ctx *item.UseContext) bool {
func (c Coral) UseOnBlock(pos cube.Pos, face cube.Face, _ mgl64.Vec3, tx *world.Tx, user item.User, ctx *item.UseContext) bool {
pos, _, used := firstReplaceable(tx, pos, face, c)
if !used {
return false
Expand Down Expand Up @@ -55,7 +55,7 @@ func (c Coral) SideClosed(cube.Pos, cube.Pos, *world.Tx) bool {
}

// NeighbourUpdateTick ...
func (c Coral) NeighbourUpdateTick(pos, changedNeighbour cube.Pos, tx *world.Tx) {
func (c Coral) NeighbourUpdateTick(pos, _ cube.Pos, tx *world.Tx) {
if !tx.Block(pos.Side(cube.FaceDown)).Model().FaceSolid(pos.Side(cube.FaceDown), cube.FaceUp, tx) {
tx.SetBlock(pos, nil, nil)
tx.AddParticle(pos.Vec3Centre(), particle.BlockBreak{Block: c})
Expand All @@ -68,7 +68,7 @@ func (c Coral) NeighbourUpdateTick(pos, changedNeighbour cube.Pos, tx *world.Tx)
}

// ScheduledTick ...
func (c Coral) ScheduledTick(pos cube.Pos, tx *world.Tx, r *rand.Rand) {
func (c Coral) ScheduledTick(pos cube.Pos, tx *world.Tx, _ *rand.Rand) {
if c.Dead {
return
}
Expand Down
4 changes: 2 additions & 2 deletions server/block/coral_block.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ type CoralBlock struct {
}

// NeighbourUpdateTick ...
func (c CoralBlock) NeighbourUpdateTick(pos, changedNeighbour cube.Pos, tx *world.Tx) {
func (c CoralBlock) NeighbourUpdateTick(pos, _ cube.Pos, tx *world.Tx) {
if c.Dead {
return
}
tx.ScheduleBlockUpdate(pos, time.Second*5/2)
}

// ScheduledTick ...
func (c CoralBlock) ScheduledTick(pos cube.Pos, tx *world.Tx, r *rand.Rand) {
func (c CoralBlock) ScheduledTick(pos cube.Pos, tx *world.Tx, _ *rand.Rand) {
if c.Dead {
return
}
Expand Down
2 changes: 1 addition & 1 deletion server/block/crafting_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func (CraftingTable) FuelInfo() item.FuelInfo {
}

// Activate ...
func (c CraftingTable) Activate(pos cube.Pos, clickedFace cube.Face, tx *world.Tx, u item.User, ctx *item.UseContext) bool {
func (c CraftingTable) Activate(pos cube.Pos, _ cube.Face, tx *world.Tx, u item.User, _ *item.UseContext) bool {
if opener, ok := u.(ContainerOpener); ok {
opener.OpenBlockContainer(pos, tx)
return true
Expand Down
Loading

0 comments on commit 4cf7559

Please sign in to comment.