github.com/df-mc/dragonfly@v0.9.13/server/block/iron_bars.go (about) 1 package block 2 3 import ( 4 "github.com/df-mc/dragonfly/server/block/cube" 5 "github.com/df-mc/dragonfly/server/world" 6 ) 7 8 // IronBars are blocks that serve a similar purpose to glass panes, but made of iron instead of glass. 9 type IronBars struct { 10 transparent 11 thin 12 sourceWaterDisplacer 13 } 14 15 // BreakInfo ... 16 func (i IronBars) BreakInfo() BreakInfo { 17 return newBreakInfo(5, pickaxeHarvestable, pickaxeEffective, oneOf(i)).withBlastResistance(30) 18 } 19 20 // SideClosed ... 21 func (i IronBars) SideClosed(cube.Pos, cube.Pos, *world.World) bool { 22 return false 23 } 24 25 // EncodeItem ... 26 func (IronBars) EncodeItem() (name string, meta int16) { 27 return "minecraft:iron_bars", 0 28 } 29 30 // EncodeBlock ... 31 func (IronBars) EncodeBlock() (string, map[string]any) { 32 return "minecraft:iron_bars", nil 33 }