Skip to content

Commit

Permalink
Fixed staticcheck and gofmt errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandertv committed Nov 22, 2024
1 parent cc071b6 commit 292b6e8
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion server/block/copper.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func (c Copper) BreakInfo() BreakInfo {
func (c Copper) Wax(cube.Pos, mgl64.Vec3) (world.Block, bool) {
before := c.Waxed
c.Waxed = true
return c, before != true
return c, !before
}

func (c Copper) CanOxidate() bool {
Expand Down
4 changes: 2 additions & 2 deletions server/block/copper_door.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,9 @@ func (d CopperDoor) EncodeItem() (name string, meta int16) {
func (d CopperDoor) EncodeBlock() (name string, properties map[string]any) {
direction := d.Facing
if d.Facing == cube.East {
d.Facing = cube.North
direction = cube.North
} else if d.Facing == cube.North {
d.Facing = cube.East
direction = cube.East
}

name = "copper_door"
Expand Down
42 changes: 21 additions & 21 deletions server/world/viewer.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,27 +79,27 @@ type NopViewer struct{}
// Compile time check to make sure NopViewer implements Viewer.
var _ Viewer = NopViewer{}

func (NopViewer) ViewEntity(Entity) {}
func (NopViewer) HideEntity(Entity) {}
func (NopViewer) ViewEntityGameMode(Entity) {}
func (NopViewer) ViewEntityMovement(Entity, mgl64.Vec3, cube.Rotation, bool) {}
func (NopViewer) ViewEntityVelocity(Entity, mgl64.Vec3) {}
func (NopViewer) ViewEntityTeleport(Entity, mgl64.Vec3) {}
func (NopViewer) ViewChunk(ChunkPos, Dimension, map[cube.Pos]Block, *chunk.Chunk) {}
func (NopViewer) ViewTime(int) {}
func (NopViewer) ViewEntityItems(Entity) {}
func (NopViewer) ViewEntityArmour(Entity) {}
func (NopViewer) ViewEntityAction(Entity, EntityAction) {}
func (NopViewer) ViewEntityState(Entity) {}
func (NopViewer) ViewEntityAnimation(Entity, string) {}
func (NopViewer) ViewParticle(mgl64.Vec3, Particle) {}
func (NopViewer) ViewSound(mgl64.Vec3, Sound) {}
func (NopViewer) ViewBlockUpdate(cube.Pos, Block, int) {}
func (NopViewer) ViewBlockAction(cube.Pos, BlockAction) {}
func (NopViewer) ViewEmote(Entity, uuid.UUID) {}
func (NopViewer) ViewSkin(Entity) {}
func (NopViewer) ViewWorldSpawn(cube.Pos) {}
func (NopViewer) ViewWeather(bool, bool) {}
func (NopViewer) ViewEntity(Entity) {}
func (NopViewer) HideEntity(Entity) {}
func (NopViewer) ViewEntityGameMode(Entity) {}
func (NopViewer) ViewEntityMovement(Entity, mgl64.Vec3, cube.Rotation, bool) {}
func (NopViewer) ViewEntityVelocity(Entity, mgl64.Vec3) {}
func (NopViewer) ViewEntityTeleport(Entity, mgl64.Vec3) {}
func (NopViewer) ViewChunk(ChunkPos, Dimension, map[cube.Pos]Block, *chunk.Chunk) {}
func (NopViewer) ViewTime(int) {}
func (NopViewer) ViewEntityItems(Entity) {}
func (NopViewer) ViewEntityArmour(Entity) {}
func (NopViewer) ViewEntityAction(Entity, EntityAction) {}
func (NopViewer) ViewEntityState(Entity) {}
func (NopViewer) ViewEntityAnimation(Entity, string) {}
func (NopViewer) ViewParticle(mgl64.Vec3, Particle) {}
func (NopViewer) ViewSound(mgl64.Vec3, Sound) {}
func (NopViewer) ViewBlockUpdate(cube.Pos, Block, int) {}
func (NopViewer) ViewBlockAction(cube.Pos, BlockAction) {}
func (NopViewer) ViewEmote(Entity, uuid.UUID) {}
func (NopViewer) ViewSkin(Entity) {}
func (NopViewer) ViewWorldSpawn(cube.Pos) {}
func (NopViewer) ViewWeather(bool, bool) {}
func (NopViewer) ViewBrewingUpdate(time.Duration, time.Duration, int32, int32, int32, int32) {}
func (NopViewer) ViewFurnaceUpdate(time.Duration, time.Duration, time.Duration, time.Duration, time.Duration, time.Duration) {
}

0 comments on commit 292b6e8

Please sign in to comment.