From 0401572b269d50499a0ae091b9acd474647c2c3e Mon Sep 17 00:00:00 2001 From: raven Date: Wed, 25 Mar 2026 10:37:41 -0500 Subject: custom block definitions --- classic/ext_block_definitions.go | 84 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 classic/ext_block_definitions.go (limited to 'classic/ext_block_definitions.go') diff --git a/classic/ext_block_definitions.go b/classic/ext_block_definitions.go new file mode 100644 index 0000000..a4f996c --- /dev/null +++ b/classic/ext_block_definitions.go @@ -0,0 +1,84 @@ +package classic + +const ( + WalkThrough = iota + SwimThrough + Solid + PartiallySlippery + FullySlippery + Water + Lava + Rope +) + +const ( + NoSound = iota + WoodSound + GravelSound + GrassSound + StoneSound + MetalSound + GlassSound + WoolSound + SandSound + SnowSound +) + +const ( + Opaque = iota + TransparentGlass + TransparentLeaves + Translucent + Invisible +) + +type DefineBlock struct { + BlockId byte + Name String + Solidity byte + MovementSpeed byte + TopTextureId byte + SideTextureId byte + BottomTextureId byte + TransmitsLight byte + WalkSound byte + FullBright byte + Shape byte + BlockDraw byte + FogDensity byte + FogColor [3]byte +} +func (p *DefineBlock) PacketId() byte { + return 0x23 +} + +type RemoveBlockDefinition struct { + BlockId byte +} +func (p *RemoveBlockDefinition) PacketId() byte { + return 0x24 +} + +type DefineBlockExt struct { + BlockId byte + Name String + Solidity byte + MovementSpeed byte + TopTextureId byte + LeftTextureId byte + RightTextureId byte + FrontTextureId byte + BackTextureId byte + BottomTextureId byte + TransmitsLight byte + WalkSound byte + FullBright byte + Min [3]byte + Max [3]byte + BlockDraw byte + FogDensity byte + FogColor [3]byte +} +func (p *DefineBlockExt) PacketId() byte { + return 0x25 +} -- cgit v1.2.3