From 46b021e1ef83167d84ef00978a61e7536d329668 Mon Sep 17 00:00:00 2001 From: Tnze Date: Thu, 10 Mar 2022 12:29:03 +0800 Subject: [PATCH] update to 1.18.2 & fix bug in snbt encoding --- README.md | 2 +- bot/basic/info.go | 11 +- bot/mcbot.go | 28 +- level/block/{testdata => }/blocks.nbt | Bin level/block/generator/main.go | 2 +- nbt/snbt.go | 2 +- nbt/snbt_encode_test.go | 3 + net/conn.go | 4 +- server/Dimension.snbt | 30 +- server/DimensionCodec.snbt | 2094 +------------------------ server/chat.go | 10 +- server/command/component.go | 4 +- server/dimension.go | 4 +- server/gameplay.go | 8 +- server/keepalive.go | 4 +- server/player.go | 5 +- server/playerlist.go | 2 +- server/server.go | 4 +- 18 files changed, 70 insertions(+), 2147 deletions(-) rename level/block/{testdata => }/blocks.nbt (100%) create mode 100644 nbt/snbt_encode_test.go diff --git a/README.md b/README.md index 4af34d3..52eb40f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Go-MC -![Version](https://img.shields.io/badge/Minecraft-1.18-blue.svg) +![Version](https://img.shields.io/badge/Minecraft-1.18.2-blue.svg) [![Go Reference](https://pkg.go.dev/badge/github.com/Tnze/go-mc.svg)](https://pkg.go.dev/github.com/Tnze/go-mc) [![Go Report Card](https://goreportcard.com/badge/github.com/Tnze/go-mc)](https://goreportcard.com/report/github.com/Tnze/go-mc) [![Build Status](https://travis-ci.org/Tnze/go-mc.svg?branch=master)](https://travis-ci.org/Tnze/go-mc) diff --git a/bot/basic/info.go b/bot/basic/info.go index b549157..25eb066 100644 --- a/bot/basic/info.go +++ b/bot/basic/info.go @@ -10,11 +10,8 @@ import ( // WorldInfo content player info in server. type WorldInfo struct { - DimensionCodec struct { - DimensionType interface{} `nbt:"minecraft:dimension_type"` - WorldgenBiome interface{} `nbt:"minecraft:worldgen/biome"` - } - Dimension interface{} + DimensionCodec nbt.StringifiedMessage + Dimension nbt.StringifiedMessage WorldNames []string // Identifiers for all worlds on the server. WorldName string // Name of the world being spawned into. HashedSeed int64 // First 8 bytes of the SHA-256 hash of the world's seed. Used client side for biome noise @@ -49,8 +46,8 @@ func (p *Player) handleLoginPacket(packet pk.Packet) error { (*pk.Byte)(&p.PrevGamemode), &WorldCount, pk.Ary{Len: &WorldCount, Ary: &WorldNames}, - pk.NBT(new(nbt.RawMessage)), - pk.NBT(new(nbt.RawMessage)), + pk.NBT(&p.WorldInfo.DimensionCodec), + pk.NBT(&p.WorldInfo.Dimension), (*pk.Identifier)(&p.WorldName), (*pk.Long)(&p.HashedSeed), (*pk.VarInt)(&p.MaxPlayers), diff --git a/bot/mcbot.go b/bot/mcbot.go index 8315dfc..bd57aef 100644 --- a/bot/mcbot.go +++ b/bot/mcbot.go @@ -6,6 +6,7 @@ package bot import ( "context" + "errors" "net" "strconv" @@ -16,7 +17,7 @@ import ( ) // ProtocolVersion is the protocol version number of minecraft net protocol -const ProtocolVersion = 757 +const ProtocolVersion = 758 const DefaultPort = mcnet.DefaultPort // JoinServer connect a Minecraft server for playing the game. @@ -27,20 +28,31 @@ func (c *Client) JoinServer(addr string) (err error) { // JoinServerWithDialer is similar to JoinServer but using a Dialer. func (c *Client) JoinServerWithDialer(d *net.Dialer, addr string) (err error) { - return c.join(context.Background(), &mcnet.Dialer{Dialer: d}, addr) + var dialer *mcnet.Dialer + if d != nil { + dialer = &mcnet.Dialer{Dialer: *d} + } + return c.join(context.Background(), dialer, addr) } func (c *Client) join(ctx context.Context, d *mcnet.Dialer, addr string) error { const Handshake = 0x00 - // Split Host and Port host, portStr, err := net.SplitHostPort(addr) + var port uint64 if err != nil { - return LoginErr{"split address", err} - } - port, err := strconv.ParseUint(portStr, 0, 16) - if err != nil { - return LoginErr{"parse port", err} + var addrErr *net.AddrError + const missingPort = "missing port in address" + if errors.As(err, &addrErr) && addrErr.Err == missingPort { + port = 25565 + } else { + return LoginErr{"split address", err} + } + } else { + port, err = strconv.ParseUint(portStr, 0, 16) + if err != nil { + return LoginErr{"parse port", err} + } } // Dial connection diff --git a/level/block/testdata/blocks.nbt b/level/block/blocks.nbt similarity index 100% rename from level/block/testdata/blocks.nbt rename to level/block/blocks.nbt diff --git a/level/block/generator/main.go b/level/block/generator/main.go index 857fc81..757c0ec 100644 --- a/level/block/generator/main.go +++ b/level/block/generator/main.go @@ -39,7 +39,7 @@ func main() { func readBlockStates(states *[]State) { // open block_states data file - f, err := os.Open("testdata/blocks.nbt") + f, err := os.Open("blocks.nbt") if err != nil { log.Panic(err) } diff --git a/nbt/snbt.go b/nbt/snbt.go index 3080778..0ed787e 100644 --- a/nbt/snbt.go +++ b/nbt/snbt.go @@ -94,7 +94,7 @@ func (m *StringifiedMessage) encode(d *Decoder, sb *strings.Builder, tagType byt return err case TagInt: i, err := d.readInt32() - sb.WriteString(strconv.FormatInt(int64(i), 10) + "I") + sb.WriteString(strconv.FormatInt(int64(i), 10)) return err case TagFloat: i, err := d.readInt32() diff --git a/nbt/snbt_encode_test.go b/nbt/snbt_encode_test.go new file mode 100644 index 0000000..9235409 --- /dev/null +++ b/nbt/snbt_encode_test.go @@ -0,0 +1,3 @@ +package nbt + +//TODO: Test SNBT encode diff --git a/net/conn.go b/net/conn.go index 88e05d1..3e99c40 100644 --- a/net/conn.go +++ b/net/conn.go @@ -63,11 +63,11 @@ func DialMCTimeout(addr string, timeout time.Duration) (*Conn, error) { } type Dialer struct { - *net.Dialer + net.Dialer } func (d *Dialer) resolver() *net.Resolver { - if d.Resolver != nil { + if d != nil && d.Resolver != nil { return d.Resolver } return net.DefaultResolver diff --git a/server/Dimension.snbt b/server/Dimension.snbt index 2b9092d..86fe858 100644 --- a/server/Dimension.snbt +++ b/server/Dimension.snbt @@ -1,17 +1,17 @@ { - piglin_safe: 0b, - natural: 1b, - ambient_light: 0.0f, - infiniburn: "minecraft:infiniburn_overworld", - respawn_anchor_works: 0b, - has_skylight: 1b, - bed_works: 1b, - effects: "minecraft:overworld", - has_raids: 1b, - min_y: 0, - height: 256, - logical_height: 256, - coordinate_scale: 1.0d, - ultrawarm: 0b, - has_ceiling: 0b + piglin_safe:0B, + natural:1B, + ambient_light:0.0000000000F, + infiniburn:"#minecraft:infiniburn_overworld", + respawn_anchor_works:0B, + has_skylight:1B, + bed_works:1B, + effects:"minecraft:overworld", + has_raids:1B, + logical_height:384, + coordinate_scale:1.0000000000D, + min_y:-64, + has_ceiling:0B, + ultrawarm:0B, + height:384 } \ No newline at end of file diff --git a/server/DimensionCodec.snbt b/server/DimensionCodec.snbt index 69072ab..59e3b9a 100644 --- a/server/DimensionCodec.snbt +++ b/server/DimensionCodec.snbt @@ -1,2093 +1 @@ -{ - "minecraft:dimension_type": { - type: "minecraft:dimension_type", - value: [ - { - name: "minecraft:overworld", - id: 0, - element: { - piglin_safe: 0b, - natural: 1b, - ambient_light: 0.0f, - infiniburn: "minecraft:infiniburn_overworld", - respawn_anchor_works: 0b, - has_skylight: 1b, - bed_works: 1b, - effects: "minecraft:overworld", - has_raids: 1b, - min_y: 0, - height: 256, - logical_height: 256, - coordinate_scale: 1.0d, - ultrawarm: 0b, - has_ceiling: 0b - } - }, - { - name: "minecraft:overworld_caves", - id: 1, - element: { - piglin_safe: 0b, - natural: 1b, - ambient_light: 0.0f, - infiniburn: "minecraft:infiniburn_overworld", - respawn_anchor_works: 0b, - has_skylight: 1b, - bed_works: 1b, - effects: "minecraft:overworld", - has_raids: 1b, - min_y: 0, - height: 256, - logical_height: 256, - coordinate_scale: 1.0d, - ultrawarm: 0b, - has_ceiling: 1b - } - }, - { - name: "minecraft:the_nether", - id: 2, - element: { - piglin_safe: 1b, - natural: 0b, - ambient_light: 0.1f, - infiniburn: "minecraft:infiniburn_nether", - respawn_anchor_works: 1b, - has_skylight: 0b, - bed_works: 0b, - effects: "minecraft:the_nether", - fixed_time: 18000L, - has_raids: 0b, - min_y: 0, - height: 256, - logical_height: 128, - coordinate_scale: 8.0d, - ultrawarm: 1b, - has_ceiling: 1b - } - }, - { - name: "minecraft:the_end", - id: 3, - element: { - piglin_safe: 0b, - natural: 0b, - ambient_light: 0.0f, - infiniburn: "minecraft:infiniburn_end", - respawn_anchor_works: 0b, - has_skylight: 0b, - bed_works: 0b, - effects: "minecraft:the_end", - fixed_time: 6000L, - has_raids: 1b, - min_y: 0, - height: 256, - logical_height: 256, - coordinate_scale: 1.0d, - ultrawarm: 0b, - has_ceiling: 0b - } - } - ] - }, - "minecraft:worldgen/biome": { - type: "minecraft:worldgen/biome", - value: [ - { - name: "minecraft:ocean", - id: 0, - element: { - precipitation: "rain", - effects: { - sky_color: 8103167, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: -1.0f, - temperature: 0.5f, - scale: 0.1f, - downfall: 0.5f, - category: "ocean" - } - }, - { - name: "minecraft:plains", - id: 1, - element: { - precipitation: "rain", - effects: { - sky_color: 7907327, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.125f, - temperature: 0.8f, - scale: 0.05f, - downfall: 0.4f, - category: "plains" - } - }, - { - name: "minecraft:desert", - id: 2, - element: { - precipitation: "none", - effects: { - sky_color: 7254527, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.125f, - temperature: 2.0f, - scale: 0.05f, - downfall: 0.0f, - category: "desert" - } - }, - { - name: "minecraft:mountains", - id: 3, - element: { - precipitation: "rain", - effects: { - sky_color: 8233727, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 1.0f, - temperature: 0.2f, - scale: 0.5f, - downfall: 0.3f, - category: "extreme_hills" - } - }, - { - name: "minecraft:forest", - id: 4, - element: { - precipitation: "rain", - effects: { - sky_color: 7972607, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.1f, - temperature: 0.7f, - scale: 0.2f, - downfall: 0.8f, - category: "forest" - } - }, - { - name: "minecraft:taiga", - id: 5, - element: { - precipitation: "rain", - effects: { - sky_color: 8233983, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.2f, - temperature: 0.25f, - scale: 0.2f, - downfall: 0.8f, - category: "taiga" - } - }, - { - name: "minecraft:swamp", - id: 6, - element: { - precipitation: "rain", - effects: { - grass_color_modifier: "swamp", - sky_color: 7907327, - foliage_color: 6975545, - water_fog_color: 2302743, - fog_color: 12638463, - water_color: 6388580, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: -0.2f, - temperature: 0.8f, - scale: 0.1f, - downfall: 0.9f, - category: "swamp" - } - }, - { - name: "minecraft:river", - id: 7, - element: { - precipitation: "rain", - effects: { - sky_color: 8103167, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: -0.5f, - temperature: 0.5f, - scale: 0.0f, - downfall: 0.5f, - category: "river" - } - }, - { - name: "minecraft:nether_wastes", - id: 8, - element: { - precipitation: "none", - effects: { - music: { - replace_current_music: 0b, - max_delay: 24000, - sound: "minecraft:music.nether.nether_wastes", - min_delay: 12000 - }, - sky_color: 7254527, - ambient_sound: "minecraft:ambient.nether_wastes.loop", - additions_sound: { - sound: "minecraft:ambient.nether_wastes.additions", - tick_chance: 0.0111d - }, - water_fog_color: 329011, - fog_color: 3344392, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.nether_wastes.mood", - block_search_extent: 8 - } - }, - depth: 0.1f, - temperature: 2.0f, - scale: 0.2f, - downfall: 0.0f, - category: "nether" - } - }, - { - name: "minecraft:the_end", - id: 9, - element: { - precipitation: "none", - effects: { - sky_color: 0, - water_fog_color: 329011, - fog_color: 10518688, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.1f, - temperature: 0.5f, - scale: 0.2f, - downfall: 0.5f, - category: "the_end" - } - }, - { - name: "minecraft:frozen_ocean", - id: 10, - element: { - precipitation: "snow", - effects: { - sky_color: 8364543, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 3750089, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: -1.0f, - temperature: 0.0f, - scale: 0.1f, - downfall: 0.5f, - category: "ocean", - temperature_modifier: "frozen" - } - }, - { - name: "minecraft:frozen_river", - id: 11, - element: { - precipitation: "snow", - effects: { - sky_color: 8364543, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 3750089, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: -0.5f, - temperature: 0.0f, - scale: 0.0f, - downfall: 0.5f, - category: "river" - } - }, - { - name: "minecraft:snowy_tundra", - id: 12, - element: { - precipitation: "snow", - effects: { - sky_color: 8364543, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.125f, - temperature: 0.0f, - scale: 0.05f, - downfall: 0.5f, - category: "icy" - } - }, - { - name: "minecraft:snowy_mountains", - id: 13, - element: { - precipitation: "snow", - effects: { - sky_color: 8364543, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.45f, - temperature: 0.0f, - scale: 0.3f, - downfall: 0.5f, - category: "icy" - } - }, - { - name: "minecraft:mushroom_fields", - id: 14, - element: { - precipitation: "rain", - effects: { - sky_color: 7842047, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.2f, - temperature: 0.9f, - scale: 0.3f, - downfall: 1.0f, - category: "mushroom" - } - }, - { - name: "minecraft:mushroom_field_shore", - id: 15, - element: { - precipitation: "rain", - effects: { - sky_color: 7842047, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.0f, - temperature: 0.9f, - scale: 0.025f, - downfall: 1.0f, - category: "mushroom" - } - }, - { - name: "minecraft:beach", - id: 16, - element: { - precipitation: "rain", - effects: { - sky_color: 7907327, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.0f, - temperature: 0.8f, - scale: 0.025f, - downfall: 0.4f, - category: "beach" - } - }, - { - name: "minecraft:desert_hills", - id: 17, - element: { - precipitation: "none", - effects: { - sky_color: 7254527, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.45f, - temperature: 2.0f, - scale: 0.3f, - downfall: 0.0f, - category: "desert" - } - }, - { - name: "minecraft:wooded_hills", - id: 18, - element: { - precipitation: "rain", - effects: { - sky_color: 7972607, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.45f, - temperature: 0.7f, - scale: 0.3f, - downfall: 0.8f, - category: "forest" - } - }, - { - name: "minecraft:taiga_hills", - id: 19, - element: { - precipitation: "rain", - effects: { - sky_color: 8233983, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.45f, - temperature: 0.25f, - scale: 0.3f, - downfall: 0.8f, - category: "taiga" - } - }, - { - name: "minecraft:mountain_edge", - id: 20, - element: { - precipitation: "rain", - effects: { - sky_color: 8233727, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.8f, - temperature: 0.2f, - scale: 0.3f, - downfall: 0.3f, - category: "extreme_hills" - } - }, - { - name: "minecraft:jungle", - id: 21, - element: { - precipitation: "rain", - effects: { - sky_color: 7842047, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.1f, - temperature: 0.95f, - scale: 0.2f, - downfall: 0.9f, - category: "jungle" - } - }, - { - name: "minecraft:jungle_hills", - id: 22, - element: { - precipitation: "rain", - effects: { - sky_color: 7842047, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.45f, - temperature: 0.95f, - scale: 0.3f, - downfall: 0.9f, - category: "jungle" - } - }, - { - name: "minecraft:jungle_edge", - id: 23, - element: { - precipitation: "rain", - effects: { - sky_color: 7842047, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.1f, - temperature: 0.95f, - scale: 0.2f, - downfall: 0.8f, - category: "jungle" - } - }, - { - name: "minecraft:deep_ocean", - id: 24, - element: { - precipitation: "rain", - effects: { - sky_color: 8103167, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: -1.8f, - temperature: 0.5f, - scale: 0.1f, - downfall: 0.5f, - category: "ocean" - } - }, - { - name: "minecraft:stone_shore", - id: 25, - element: { - precipitation: "rain", - effects: { - sky_color: 8233727, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.1f, - temperature: 0.2f, - scale: 0.8f, - downfall: 0.3f, - category: "none" - } - }, - { - name: "minecraft:snowy_beach", - id: 26, - element: { - precipitation: "snow", - effects: { - sky_color: 8364543, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4020182, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.0f, - temperature: 0.05f, - scale: 0.025f, - downfall: 0.3f, - category: "beach" - } - }, - { - name: "minecraft:birch_forest", - id: 27, - element: { - precipitation: "rain", - effects: { - sky_color: 8037887, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.1f, - temperature: 0.6f, - scale: 0.2f, - downfall: 0.6f, - category: "forest" - } - }, - { - name: "minecraft:birch_forest_hills", - id: 28, - element: { - precipitation: "rain", - effects: { - sky_color: 8037887, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.45f, - temperature: 0.6f, - scale: 0.3f, - downfall: 0.6f, - category: "forest" - } - }, - { - name: "minecraft:dark_forest", - id: 29, - element: { - precipitation: "rain", - effects: { - grass_color_modifier: "dark_forest", - sky_color: 7972607, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.1f, - temperature: 0.7f, - scale: 0.2f, - downfall: 0.8f, - category: "forest" - } - }, - { - name: "minecraft:snowy_taiga", - id: 30, - element: { - precipitation: "snow", - effects: { - sky_color: 8625919, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4020182, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.2f, - temperature: -0.5f, - scale: 0.2f, - downfall: 0.4f, - category: "taiga" - } - }, - { - name: "minecraft:snowy_taiga_hills", - id: 31, - element: { - precipitation: "snow", - effects: { - sky_color: 8625919, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4020182, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.45f, - temperature: -0.5f, - scale: 0.3f, - downfall: 0.4f, - category: "taiga" - } - }, - { - name: "minecraft:giant_tree_taiga", - id: 32, - element: { - precipitation: "rain", - effects: { - sky_color: 8168447, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.2f, - temperature: 0.3f, - scale: 0.2f, - downfall: 0.8f, - category: "taiga" - } - }, - { - name: "minecraft:giant_tree_taiga_hills", - id: 33, - element: { - precipitation: "rain", - effects: { - sky_color: 8168447, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.45f, - temperature: 0.3f, - scale: 0.3f, - downfall: 0.8f, - category: "taiga" - } - }, - { - name: "minecraft:wooded_mountains", - id: 34, - element: { - precipitation: "rain", - effects: { - sky_color: 8233727, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 1.0f, - temperature: 0.2f, - scale: 0.5f, - downfall: 0.3f, - category: "extreme_hills" - } - }, - { - name: "minecraft:savanna", - id: 35, - element: { - precipitation: "none", - effects: { - sky_color: 7711487, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.125f, - temperature: 1.2f, - scale: 0.05f, - downfall: 0.0f, - category: "savanna" - } - }, - { - name: "minecraft:savanna_plateau", - id: 36, - element: { - precipitation: "none", - effects: { - sky_color: 7776511, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 1.5f, - temperature: 1.0f, - scale: 0.025f, - downfall: 0.0f, - category: "savanna" - } - }, - { - name: "minecraft:badlands", - id: 37, - element: { - precipitation: "none", - effects: { - sky_color: 7254527, - grass_color: 9470285, - foliage_color: 10387789, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.1f, - temperature: 2.0f, - scale: 0.2f, - downfall: 0.0f, - category: "mesa" - } - }, - { - name: "minecraft:wooded_badlands_plateau", - id: 38, - element: { - precipitation: "none", - effects: { - sky_color: 7254527, - grass_color: 9470285, - foliage_color: 10387789, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 1.5f, - temperature: 2.0f, - scale: 0.025f, - downfall: 0.0f, - category: "mesa" - } - }, - { - name: "minecraft:badlands_plateau", - id: 39, - element: { - precipitation: "none", - effects: { - sky_color: 7254527, - grass_color: 9470285, - foliage_color: 10387789, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 1.5f, - temperature: 2.0f, - scale: 0.025f, - downfall: 0.0f, - category: "mesa" - } - }, - { - name: "minecraft:small_end_islands", - id: 40, - element: { - precipitation: "none", - effects: { - sky_color: 0, - water_fog_color: 329011, - fog_color: 10518688, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.1f, - temperature: 0.5f, - scale: 0.2f, - downfall: 0.5f, - category: "the_end" - } - }, - { - name: "minecraft:end_midlands", - id: 41, - element: { - precipitation: "none", - effects: { - sky_color: 0, - water_fog_color: 329011, - fog_color: 10518688, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.1f, - temperature: 0.5f, - scale: 0.2f, - downfall: 0.5f, - category: "the_end" - } - }, - { - name: "minecraft:end_highlands", - id: 42, - element: { - precipitation: "none", - effects: { - sky_color: 0, - water_fog_color: 329011, - fog_color: 10518688, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.1f, - temperature: 0.5f, - scale: 0.2f, - downfall: 0.5f, - category: "the_end" - } - }, - { - name: "minecraft:end_barrens", - id: 43, - element: { - precipitation: "none", - effects: { - sky_color: 0, - water_fog_color: 329011, - fog_color: 10518688, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.1f, - temperature: 0.5f, - scale: 0.2f, - downfall: 0.5f, - category: "the_end" - } - }, - { - name: "minecraft:warm_ocean", - id: 44, - element: { - precipitation: "rain", - effects: { - sky_color: 8103167, - water_fog_color: 270131, - fog_color: 12638463, - water_color: 4445678, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: -1.0f, - temperature: 0.5f, - scale: 0.1f, - downfall: 0.5f, - category: "ocean" - } - }, - { - name: "minecraft:lukewarm_ocean", - id: 45, - element: { - precipitation: "rain", - effects: { - sky_color: 8103167, - water_fog_color: 267827, - fog_color: 12638463, - water_color: 4566514, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: -1.0f, - temperature: 0.5f, - scale: 0.1f, - downfall: 0.5f, - category: "ocean" - } - }, - { - name: "minecraft:cold_ocean", - id: 46, - element: { - precipitation: "rain", - effects: { - sky_color: 8103167, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4020182, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: -1.0f, - temperature: 0.5f, - scale: 0.1f, - downfall: 0.5f, - category: "ocean" - } - }, - { - name: "minecraft:deep_warm_ocean", - id: 47, - element: { - precipitation: "rain", - effects: { - sky_color: 8103167, - water_fog_color: 270131, - fog_color: 12638463, - water_color: 4445678, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: -1.8f, - temperature: 0.5f, - scale: 0.1f, - downfall: 0.5f, - category: "ocean" - } - }, - { - name: "minecraft:deep_lukewarm_ocean", - id: 48, - element: { - precipitation: "rain", - effects: { - sky_color: 8103167, - water_fog_color: 267827, - fog_color: 12638463, - water_color: 4566514, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: -1.8f, - temperature: 0.5f, - scale: 0.1f, - downfall: 0.5f, - category: "ocean" - } - }, - { - name: "minecraft:deep_cold_ocean", - id: 49, - element: { - precipitation: "rain", - effects: { - sky_color: 8103167, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4020182, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: -1.8f, - temperature: 0.5f, - scale: 0.1f, - downfall: 0.5f, - category: "ocean" - } - }, - { - name: "minecraft:deep_frozen_ocean", - id: 50, - element: { - precipitation: "rain", - effects: { - sky_color: 8103167, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 3750089, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: -1.8f, - temperature: 0.5f, - scale: 0.1f, - downfall: 0.5f, - category: "ocean", - temperature_modifier: "frozen" - } - }, - { - name: "minecraft:the_void", - id: 127, - element: { - precipitation: "none", - effects: { - sky_color: 8103167, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.1f, - temperature: 0.5f, - scale: 0.2f, - downfall: 0.5f, - category: "none" - } - }, - { - name: "minecraft:sunflower_plains", - id: 129, - element: { - precipitation: "rain", - effects: { - sky_color: 7907327, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.125f, - temperature: 0.8f, - scale: 0.05f, - downfall: 0.4f, - category: "plains" - } - }, - { - name: "minecraft:desert_lakes", - id: 130, - element: { - precipitation: "none", - effects: { - sky_color: 7254527, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.225f, - temperature: 2.0f, - scale: 0.25f, - downfall: 0.0f, - category: "desert" - } - }, - { - name: "minecraft:gravelly_mountains", - id: 131, - element: { - precipitation: "rain", - effects: { - sky_color: 8233727, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 1.0f, - temperature: 0.2f, - scale: 0.5f, - downfall: 0.3f, - category: "extreme_hills" - } - }, - { - name: "minecraft:flower_forest", - id: 132, - element: { - precipitation: "rain", - effects: { - sky_color: 7972607, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.1f, - temperature: 0.7f, - scale: 0.4f, - downfall: 0.8f, - category: "forest" - } - }, - { - name: "minecraft:taiga_mountains", - id: 133, - element: { - precipitation: "rain", - effects: { - sky_color: 8233983, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.3f, - temperature: 0.25f, - scale: 0.4f, - downfall: 0.8f, - category: "taiga" - } - }, - { - name: "minecraft:swamp_hills", - id: 134, - element: { - precipitation: "rain", - effects: { - grass_color_modifier: "swamp", - sky_color: 7907327, - foliage_color: 6975545, - water_fog_color: 2302743, - fog_color: 12638463, - water_color: 6388580, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: -0.1f, - temperature: 0.8f, - scale: 0.3f, - downfall: 0.9f, - category: "swamp" - } - }, - { - name: "minecraft:ice_spikes", - id: 140, - element: { - precipitation: "snow", - effects: { - sky_color: 8364543, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.425f, - temperature: 0.0f, - scale: 0.45000002f, - downfall: 0.5f, - category: "icy" - } - }, - { - name: "minecraft:modified_jungle", - id: 149, - element: { - precipitation: "rain", - effects: { - sky_color: 7842047, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.2f, - temperature: 0.95f, - scale: 0.4f, - downfall: 0.9f, - category: "jungle" - } - }, - { - name: "minecraft:modified_jungle_edge", - id: 151, - element: { - precipitation: "rain", - effects: { - sky_color: 7842047, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.2f, - temperature: 0.95f, - scale: 0.4f, - downfall: 0.8f, - category: "jungle" - } - }, - { - name: "minecraft:tall_birch_forest", - id: 155, - element: { - precipitation: "rain", - effects: { - sky_color: 8037887, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.2f, - temperature: 0.6f, - scale: 0.4f, - downfall: 0.6f, - category: "forest" - } - }, - { - name: "minecraft:tall_birch_hills", - id: 156, - element: { - precipitation: "rain", - effects: { - sky_color: 8037887, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.55f, - temperature: 0.6f, - scale: 0.5f, - downfall: 0.6f, - category: "forest" - } - }, - { - name: "minecraft:dark_forest_hills", - id: 157, - element: { - precipitation: "rain", - effects: { - grass_color_modifier: "dark_forest", - sky_color: 7972607, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.2f, - temperature: 0.7f, - scale: 0.4f, - downfall: 0.8f, - category: "forest" - } - }, - { - name: "minecraft:snowy_taiga_mountains", - id: 158, - element: { - precipitation: "snow", - effects: { - sky_color: 8625919, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4020182, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.3f, - temperature: -0.5f, - scale: 0.4f, - downfall: 0.4f, - category: "taiga" - } - }, - { - name: "minecraft:giant_spruce_taiga", - id: 160, - element: { - precipitation: "rain", - effects: { - sky_color: 8233983, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.2f, - temperature: 0.25f, - scale: 0.2f, - downfall: 0.8f, - category: "taiga" - } - }, - { - name: "minecraft:giant_spruce_taiga_hills", - id: 161, - element: { - precipitation: "rain", - effects: { - sky_color: 8233983, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.2f, - temperature: 0.25f, - scale: 0.2f, - downfall: 0.8f, - category: "taiga" - } - }, - { - name: "minecraft:modified_gravelly_mountains", - id: 162, - element: { - precipitation: "rain", - effects: { - sky_color: 8233727, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 1.0f, - temperature: 0.2f, - scale: 0.5f, - downfall: 0.3f, - category: "extreme_hills" - } - }, - { - name: "minecraft:shattered_savanna", - id: 163, - element: { - precipitation: "none", - effects: { - sky_color: 7776767, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.3625f, - temperature: 1.1f, - scale: 1.225f, - downfall: 0.0f, - category: "savanna" - } - }, - { - name: "minecraft:shattered_savanna_plateau", - id: 164, - element: { - precipitation: "none", - effects: { - sky_color: 7776511, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 1.05f, - temperature: 1.0f, - scale: 1.2125001f, - downfall: 0.0f, - category: "savanna" - } - }, - { - name: "minecraft:eroded_badlands", - id: 165, - element: { - precipitation: "none", - effects: { - sky_color: 7254527, - grass_color: 9470285, - foliage_color: 10387789, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.1f, - temperature: 2.0f, - scale: 0.2f, - downfall: 0.0f, - category: "mesa" - } - }, - { - name: "minecraft:modified_wooded_badlands_plateau", - id: 166, - element: { - precipitation: "none", - effects: { - sky_color: 7254527, - grass_color: 9470285, - foliage_color: 10387789, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.45f, - temperature: 2.0f, - scale: 0.3f, - downfall: 0.0f, - category: "mesa" - } - }, - { - name: "minecraft:modified_badlands_plateau", - id: 167, - element: { - precipitation: "none", - effects: { - sky_color: 7254527, - grass_color: 9470285, - foliage_color: 10387789, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.45f, - temperature: 2.0f, - scale: 0.3f, - downfall: 0.0f, - category: "mesa" - } - }, - { - name: "minecraft:bamboo_jungle", - id: 168, - element: { - precipitation: "rain", - effects: { - sky_color: 7842047, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.1f, - temperature: 0.95f, - scale: 0.2f, - downfall: 0.9f, - category: "jungle" - } - }, - { - name: "minecraft:bamboo_jungle_hills", - id: 169, - element: { - precipitation: "rain", - effects: { - sky_color: 7842047, - water_fog_color: 329011, - fog_color: 12638463, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.cave", - block_search_extent: 8 - } - }, - depth: 0.45f, - temperature: 0.95f, - scale: 0.3f, - downfall: 0.9f, - category: "jungle" - } - }, - { - name: "minecraft:soul_sand_valley", - id: 170, - element: { - precipitation: "none", - effects: { - music: { - replace_current_music: 0b, - max_delay: 24000, - sound: "minecraft:music.nether.soul_sand_valley", - min_delay: 12000 - }, - sky_color: 7254527, - ambient_sound: "minecraft:ambient.soul_sand_valley.loop", - additions_sound: { - sound: "minecraft:ambient.soul_sand_valley.additions", - tick_chance: 0.0111d - }, - particle: { - probability: 0.00625f, - options: { - type: "minecraft:ash" - } - }, - water_fog_color: 329011, - fog_color: 1787717, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.soul_sand_valley.mood", - block_search_extent: 8 - } - }, - depth: 0.1f, - temperature: 2.0f, - scale: 0.2f, - downfall: 0.0f, - category: "nether" - } - }, - { - name: "minecraft:crimson_forest", - id: 171, - element: { - precipitation: "none", - effects: { - music: { - replace_current_music: 0b, - max_delay: 24000, - sound: "minecraft:music.nether.crimson_forest", - min_delay: 12000 - }, - sky_color: 7254527, - ambient_sound: "minecraft:ambient.crimson_forest.loop", - additions_sound: { - sound: "minecraft:ambient.crimson_forest.additions", - tick_chance: 0.0111d - }, - particle: { - probability: 0.025f, - options: { - type: "minecraft:crimson_spore" - } - }, - water_fog_color: 329011, - fog_color: 3343107, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.crimson_forest.mood", - block_search_extent: 8 - } - }, - depth: 0.1f, - temperature: 2.0f, - scale: 0.2f, - downfall: 0.0f, - category: "nether" - } - }, - { - name: "minecraft:warped_forest", - id: 172, - element: { - precipitation: "none", - effects: { - music: { - replace_current_music: 0b, - max_delay: 24000, - sound: "minecraft:music.nether.warped_forest", - min_delay: 12000 - }, - sky_color: 7254527, - ambient_sound: "minecraft:ambient.warped_forest.loop", - additions_sound: { - sound: "minecraft:ambient.warped_forest.additions", - tick_chance: 0.0111d - }, - particle: { - probability: 0.01428f, - options: { - type: "minecraft:warped_spore" - } - }, - water_fog_color: 329011, - fog_color: 1705242, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.warped_forest.mood", - block_search_extent: 8 - } - }, - depth: 0.1f, - temperature: 2.0f, - scale: 0.2f, - downfall: 0.0f, - category: "nether" - } - }, - { - name: "minecraft:basalt_deltas", - id: 173, - element: { - precipitation: "none", - effects: { - music: { - replace_current_music: 0b, - max_delay: 24000, - sound: "minecraft:music.nether.basalt_deltas", - min_delay: 12000 - }, - sky_color: 7254527, - ambient_sound: "minecraft:ambient.basalt_deltas.loop", - additions_sound: { - sound: "minecraft:ambient.basalt_deltas.additions", - tick_chance: 0.0111d - }, - particle: { - probability: 0.118093334f, - options: { - type: "minecraft:white_ash" - } - }, - water_fog_color: 4341314, - fog_color: 6840176, - water_color: 4159204, - mood_sound: { - tick_delay: 6000, - offset: 2.0d, - sound: "minecraft:ambient.basalt_deltas.mood", - block_search_extent: 8 - } - }, - depth: 0.1f, - temperature: 2.0f, - scale: 0.2f, - downfall: 0.0f, - category: "nether" - } - } - ] - } -} \ No newline at end of file +{"minecraft:dimension_type":{type:"minecraft:dimension_type",value:[{name:"minecraft:overworld",id:0,element:{piglin_safe:0B,natural:1B,ambient_light:0.0000000000F,infiniburn:"#minecraft:infiniburn_overworld",respawn_anchor_works:0B,has_skylight:1B,bed_works:1B,effects:"minecraft:overworld",has_raids:1B,logical_height:384,coordinate_scale:1.0000000000D,min_y:-64,has_ceiling:0B,ultrawarm:0B,height:384}},{name:"minecraft:overworld_caves",id:1,element:{piglin_safe:0B,natural:1B,ambient_light:0.0000000000F,infiniburn:"#minecraft:infiniburn_overworld",respawn_anchor_works:0B,has_skylight:1B,bed_works:1B,effects:"minecraft:overworld",has_raids:1B,logical_height:384,coordinate_scale:1.0000000000D,min_y:-64,has_ceiling:1B,ultrawarm:0B,height:384}},{name:"minecraft:the_nether",id:2,element:{piglin_safe:1B,natural:0B,ambient_light:0.1000000015F,infiniburn:"#minecraft:infiniburn_nether",respawn_anchor_works:1B,has_skylight:0B,bed_works:0B,effects:"minecraft:the_nether",fixed_time:18000L,has_raids:0B,logical_height:128,coordinate_scale:8.0000000000D,min_y:0,has_ceiling:1B,ultrawarm:1B,height:256}},{name:"minecraft:the_end",id:3,element:{piglin_safe:0B,natural:0B,ambient_light:0.0000000000F,infiniburn:"#minecraft:infiniburn_end",respawn_anchor_works:0B,has_skylight:0B,bed_works:0B,effects:"minecraft:the_end",fixed_time:6000L,has_raids:1B,logical_height:256,coordinate_scale:1.0000000000D,min_y:0,has_ceiling:0B,ultrawarm:0B,height:256}}]},"minecraft:worldgen/biome":{type:"minecraft:worldgen/biome",value:[{name:"minecraft:the_void",id:0,element:{precipitation:none,effects:{sky_color:8103167,water_fog_color:329011,fog_color:12638463,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:0.5000000000F,downfall:0.5000000000F,category:none}},{name:"minecraft:plains",id:1,element:{precipitation:rain,effects:{sky_color:7907327,water_fog_color:329011,fog_color:12638463,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:0.8000000119F,downfall:0.4000000060F,category:plains}},{name:"minecraft:sunflower_plains",id:2,element:{precipitation:rain,effects:{sky_color:7907327,water_fog_color:329011,fog_color:12638463,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:0.8000000119F,downfall:0.4000000060F,category:plains}},{name:"minecraft:snowy_plains",id:3,element:{precipitation:snow,effects:{sky_color:8364543,water_fog_color:329011,fog_color:12638463,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:0.0000000000F,downfall:0.5000000000F,category:icy}},{name:"minecraft:ice_spikes",id:4,element:{precipitation:snow,effects:{sky_color:8364543,water_fog_color:329011,fog_color:12638463,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:0.0000000000F,downfall:0.5000000000F,category:icy}},{name:"minecraft:desert",id:5,element:{precipitation:none,effects:{sky_color:7254527,water_fog_color:329011,fog_color:12638463,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:2.0000000000F,downfall:0.0000000000F,category:desert}},{name:"minecraft:swamp",id:6,element:{precipitation:rain,effects:{grass_color_modifier:swamp,sky_color:7907327,foliage_color:6975545,water_fog_color:2302743,fog_color:12638463,water_color:6388580,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:0.8000000119F,downfall:0.8999999762F,category:swamp}},{name:"minecraft:forest",id:7,element:{precipitation:rain,effects:{sky_color:7972607,water_fog_color:329011,fog_color:12638463,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:0.6999999881F,downfall:0.8000000119F,category:forest}},{name:"minecraft:flower_forest",id:8,element:{precipitation:rain,effects:{sky_color:7972607,water_fog_color:329011,fog_color:12638463,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:0.6999999881F,downfall:0.8000000119F,category:forest}},{name:"minecraft:birch_forest",id:9,element:{precipitation:rain,effects:{sky_color:8037887,water_fog_color:329011,fog_color:12638463,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:0.6000000238F,downfall:0.6000000238F,category:forest}},{name:"minecraft:dark_forest",id:10,element:{precipitation:rain,effects:{grass_color_modifier:dark_forest,sky_color:7972607,water_fog_color:329011,fog_color:12638463,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:0.6999999881F,downfall:0.8000000119F,category:forest}},{name:"minecraft:old_growth_birch_forest",id:11,element:{precipitation:rain,effects:{sky_color:8037887,water_fog_color:329011,fog_color:12638463,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:0.6000000238F,downfall:0.6000000238F,category:forest}},{name:"minecraft:old_growth_pine_taiga",id:12,element:{precipitation:rain,effects:{sky_color:8168447,water_fog_color:329011,fog_color:12638463,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:0.3000000119F,downfall:0.8000000119F,category:taiga}},{name:"minecraft:old_growth_spruce_taiga",id:13,element:{precipitation:rain,effects:{sky_color:8233983,water_fog_color:329011,fog_color:12638463,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:0.2500000000F,downfall:0.8000000119F,category:taiga}},{name:"minecraft:taiga",id:14,element:{precipitation:rain,effects:{sky_color:8233983,water_fog_color:329011,fog_color:12638463,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:0.2500000000F,downfall:0.8000000119F,category:taiga}},{name:"minecraft:snowy_taiga",id:15,element:{precipitation:snow,effects:{sky_color:8625919,water_fog_color:329011,fog_color:12638463,water_color:4020182,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:-0.5000000000F,downfall:0.4000000060F,category:taiga}},{name:"minecraft:savanna",id:16,element:{precipitation:none,effects:{sky_color:7254527,water_fog_color:329011,fog_color:12638463,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:2.0000000000F,downfall:0.0000000000F,category:savanna}},{name:"minecraft:savanna_plateau",id:17,element:{precipitation:none,effects:{sky_color:7254527,water_fog_color:329011,fog_color:12638463,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:2.0000000000F,downfall:0.0000000000F,category:savanna}},{name:"minecraft:windswept_hills",id:18,element:{precipitation:rain,effects:{sky_color:8233727,water_fog_color:329011,fog_color:12638463,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:0.2000000030F,downfall:0.3000000119F,category:extreme_hills}},{name:"minecraft:windswept_gravelly_hills",id:19,element:{precipitation:rain,effects:{sky_color:8233727,water_fog_color:329011,fog_color:12638463,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:0.2000000030F,downfall:0.3000000119F,category:extreme_hills}},{name:"minecraft:windswept_forest",id:20,element:{precipitation:rain,effects:{sky_color:8233727,water_fog_color:329011,fog_color:12638463,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:0.2000000030F,downfall:0.3000000119F,category:extreme_hills}},{name:"minecraft:windswept_savanna",id:21,element:{precipitation:none,effects:{sky_color:7254527,water_fog_color:329011,fog_color:12638463,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:2.0000000000F,downfall:0.0000000000F,category:savanna}},{name:"minecraft:jungle",id:22,element:{precipitation:rain,effects:{sky_color:7842047,water_fog_color:329011,fog_color:12638463,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:0.9499999881F,downfall:0.8999999762F,category:jungle}},{name:"minecraft:sparse_jungle",id:23,element:{precipitation:rain,effects:{sky_color:7842047,water_fog_color:329011,fog_color:12638463,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:0.9499999881F,downfall:0.8000000119F,category:jungle}},{name:"minecraft:bamboo_jungle",id:24,element:{precipitation:rain,effects:{sky_color:7842047,water_fog_color:329011,fog_color:12638463,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:0.9499999881F,downfall:0.8999999762F,category:jungle}},{name:"minecraft:badlands",id:25,element:{precipitation:none,effects:{sky_color:7254527,grass_color:9470285,foliage_color:10387789,water_fog_color:329011,fog_color:12638463,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:2.0000000000F,downfall:0.0000000000F,category:mesa}},{name:"minecraft:eroded_badlands",id:26,element:{precipitation:none,effects:{sky_color:7254527,grass_color:9470285,foliage_color:10387789,water_fog_color:329011,fog_color:12638463,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:2.0000000000F,downfall:0.0000000000F,category:mesa}},{name:"minecraft:wooded_badlands",id:27,element:{precipitation:none,effects:{sky_color:7254527,grass_color:9470285,foliage_color:10387789,water_fog_color:329011,fog_color:12638463,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:2.0000000000F,downfall:0.0000000000F,category:mesa}},{name:"minecraft:meadow",id:28,element:{precipitation:rain,effects:{music:{replace_current_music:0B,max_delay:24000,sound:"minecraft:music.overworld.meadow",min_delay:12000},sky_color:8103167,water_fog_color:329011,fog_color:12638463,water_color:937679,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:0.5000000000F,downfall:0.8000000119F,category:mountain}},{name:"minecraft:grove",id:29,element:{precipitation:snow,effects:{music:{replace_current_music:0B,max_delay:24000,sound:"minecraft:music.overworld.grove",min_delay:12000},sky_color:8495359,water_fog_color:329011,fog_color:12638463,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:-0.2000000030F,downfall:0.8000000119F,category:forest}},{name:"minecraft:snowy_slopes",id:30,element:{precipitation:snow,effects:{music:{replace_current_music:0B,max_delay:24000,sound:"minecraft:music.overworld.snowy_slopes",min_delay:12000},sky_color:8560639,water_fog_color:329011,fog_color:12638463,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:-0.3000000119F,downfall:0.8999999762F,category:mountain}},{name:"minecraft:frozen_peaks",id:31,element:{precipitation:snow,effects:{music:{replace_current_music:0B,max_delay:24000,sound:"minecraft:music.overworld.frozen_peaks",min_delay:12000},sky_color:8756735,water_fog_color:329011,fog_color:12638463,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:-0.6999999881F,downfall:0.8999999762F,category:mountain}},{name:"minecraft:jagged_peaks",id:32,element:{precipitation:snow,effects:{music:{replace_current_music:0B,max_delay:24000,sound:"minecraft:music.overworld.jagged_peaks",min_delay:12000},sky_color:8756735,water_fog_color:329011,fog_color:12638463,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:-0.6999999881F,downfall:0.8999999762F,category:mountain}},{name:"minecraft:stony_peaks",id:33,element:{precipitation:rain,effects:{music:{replace_current_music:0B,max_delay:24000,sound:"minecraft:music.overworld.stony_peaks",min_delay:12000},sky_color:7776511,water_fog_color:329011,fog_color:12638463,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:1.0000000000F,downfall:0.3000000119F,category:mountain}},{name:"minecraft:river",id:34,element:{precipitation:rain,effects:{sky_color:8103167,water_fog_color:329011,fog_color:12638463,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:0.5000000000F,downfall:0.5000000000F,category:river}},{name:"minecraft:frozen_river",id:35,element:{precipitation:snow,effects:{sky_color:8364543,water_fog_color:329011,fog_color:12638463,water_color:3750089,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:0.0000000000F,downfall:0.5000000000F,category:river}},{name:"minecraft:beach",id:36,element:{precipitation:rain,effects:{sky_color:7907327,water_fog_color:329011,fog_color:12638463,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:0.8000000119F,downfall:0.4000000060F,category:beach}},{name:"minecraft:snowy_beach",id:37,element:{precipitation:snow,effects:{sky_color:8364543,water_fog_color:329011,fog_color:12638463,water_color:4020182,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:0.0500000007F,downfall:0.3000000119F,category:beach}},{name:"minecraft:stony_shore",id:38,element:{precipitation:rain,effects:{sky_color:8233727,water_fog_color:329011,fog_color:12638463,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:0.2000000030F,downfall:0.3000000119F,category:beach}},{name:"minecraft:warm_ocean",id:39,element:{precipitation:rain,effects:{sky_color:8103167,water_fog_color:270131,fog_color:12638463,water_color:4445678,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:0.5000000000F,downfall:0.5000000000F,category:ocean}},{name:"minecraft:lukewarm_ocean",id:40,element:{precipitation:rain,effects:{sky_color:8103167,water_fog_color:267827,fog_color:12638463,water_color:4566514,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:0.5000000000F,downfall:0.5000000000F,category:ocean}},{name:"minecraft:deep_lukewarm_ocean",id:41,element:{precipitation:rain,effects:{sky_color:8103167,water_fog_color:267827,fog_color:12638463,water_color:4566514,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:0.5000000000F,downfall:0.5000000000F,category:ocean}},{name:"minecraft:ocean",id:42,element:{precipitation:rain,effects:{sky_color:8103167,water_fog_color:329011,fog_color:12638463,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:0.5000000000F,downfall:0.5000000000F,category:ocean}},{name:"minecraft:deep_ocean",id:43,element:{precipitation:rain,effects:{sky_color:8103167,water_fog_color:329011,fog_color:12638463,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:0.5000000000F,downfall:0.5000000000F,category:ocean}},{name:"minecraft:cold_ocean",id:44,element:{precipitation:rain,effects:{sky_color:8103167,water_fog_color:329011,fog_color:12638463,water_color:4020182,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:0.5000000000F,downfall:0.5000000000F,category:ocean}},{name:"minecraft:deep_cold_ocean",id:45,element:{precipitation:rain,effects:{sky_color:8103167,water_fog_color:329011,fog_color:12638463,water_color:4020182,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:0.5000000000F,downfall:0.5000000000F,category:ocean}},{name:"minecraft:frozen_ocean",id:46,element:{precipitation:snow,effects:{sky_color:8364543,water_fog_color:329011,fog_color:12638463,water_color:3750089,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:0.0000000000F,downfall:0.5000000000F,category:ocean,temperature_modifier:frozen}},{name:"minecraft:deep_frozen_ocean",id:47,element:{precipitation:rain,effects:{sky_color:8103167,water_fog_color:329011,fog_color:12638463,water_color:3750089,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:0.5000000000F,downfall:0.5000000000F,category:ocean,temperature_modifier:frozen}},{name:"minecraft:mushroom_fields",id:48,element:{precipitation:rain,effects:{sky_color:7842047,water_fog_color:329011,fog_color:12638463,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:0.8999999762F,downfall:1.0000000000F,category:mushroom}},{name:"minecraft:dripstone_caves",id:49,element:{precipitation:rain,effects:{music:{replace_current_music:0B,max_delay:24000,sound:"minecraft:music.overworld.dripstone_caves",min_delay:12000},sky_color:7907327,water_fog_color:329011,fog_color:12638463,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:0.8000000119F,downfall:0.4000000060F,category:underground}},{name:"minecraft:lush_caves",id:50,element:{precipitation:rain,effects:{music:{replace_current_music:0B,max_delay:24000,sound:"minecraft:music.overworld.lush_caves",min_delay:12000},sky_color:8103167,water_fog_color:329011,fog_color:12638463,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:0.5000000000F,downfall:0.5000000000F,category:underground}},{name:"minecraft:nether_wastes",id:51,element:{precipitation:none,effects:{music:{replace_current_music:0B,max_delay:24000,sound:"minecraft:music.nether.nether_wastes",min_delay:12000},sky_color:7254527,ambient_sound:"minecraft:ambient.nether_wastes.loop",additions_sound:{sound:"minecraft:ambient.nether_wastes.additions",tick_chance:0.0111000000D},water_fog_color:329011,fog_color:3344392,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.nether_wastes.mood",block_search_extent:8}},temperature:2.0000000000F,downfall:0.0000000000F,category:nether}},{name:"minecraft:warped_forest",id:52,element:{precipitation:none,effects:{music:{replace_current_music:0B,max_delay:24000,sound:"minecraft:music.nether.warped_forest",min_delay:12000},sky_color:7254527,ambient_sound:"minecraft:ambient.warped_forest.loop",additions_sound:{sound:"minecraft:ambient.warped_forest.additions",tick_chance:0.0111000000D},particle:{probability:0.0142799998F,options:{type:"minecraft:warped_spore"}},water_fog_color:329011,fog_color:1705242,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.warped_forest.mood",block_search_extent:8}},temperature:2.0000000000F,downfall:0.0000000000F,category:nether}},{name:"minecraft:crimson_forest",id:53,element:{precipitation:none,effects:{music:{replace_current_music:0B,max_delay:24000,sound:"minecraft:music.nether.crimson_forest",min_delay:12000},sky_color:7254527,ambient_sound:"minecraft:ambient.crimson_forest.loop",additions_sound:{sound:"minecraft:ambient.crimson_forest.additions",tick_chance:0.0111000000D},particle:{probability:0.0250000004F,options:{type:"minecraft:crimson_spore"}},water_fog_color:329011,fog_color:3343107,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.crimson_forest.mood",block_search_extent:8}},temperature:2.0000000000F,downfall:0.0000000000F,category:nether}},{name:"minecraft:soul_sand_valley",id:54,element:{precipitation:none,effects:{music:{replace_current_music:0B,max_delay:24000,sound:"minecraft:music.nether.soul_sand_valley",min_delay:12000},sky_color:7254527,ambient_sound:"minecraft:ambient.soul_sand_valley.loop",additions_sound:{sound:"minecraft:ambient.soul_sand_valley.additions",tick_chance:0.0111000000D},particle:{probability:0.0062500001F,options:{type:"minecraft:ash"}},water_fog_color:329011,fog_color:1787717,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.soul_sand_valley.mood",block_search_extent:8}},temperature:2.0000000000F,downfall:0.0000000000F,category:nether}},{name:"minecraft:basalt_deltas",id:55,element:{precipitation:none,effects:{music:{replace_current_music:0B,max_delay:24000,sound:"minecraft:music.nether.basalt_deltas",min_delay:12000},sky_color:7254527,ambient_sound:"minecraft:ambient.basalt_deltas.loop",additions_sound:{sound:"minecraft:ambient.basalt_deltas.additions",tick_chance:0.0111000000D},particle:{probability:0.1180933341F,options:{type:"minecraft:white_ash"}},water_fog_color:329011,fog_color:6840176,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.basalt_deltas.mood",block_search_extent:8}},temperature:2.0000000000F,downfall:0.0000000000F,category:nether}},{name:"minecraft:the_end",id:56,element:{precipitation:none,effects:{sky_color:0,water_fog_color:329011,fog_color:10518688,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:0.5000000000F,downfall:0.5000000000F,category:the_end}},{name:"minecraft:end_highlands",id:57,element:{precipitation:none,effects:{sky_color:0,water_fog_color:329011,fog_color:10518688,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:0.5000000000F,downfall:0.5000000000F,category:the_end}},{name:"minecraft:end_midlands",id:58,element:{precipitation:none,effects:{sky_color:0,water_fog_color:329011,fog_color:10518688,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:0.5000000000F,downfall:0.5000000000F,category:the_end}},{name:"minecraft:small_end_islands",id:59,element:{precipitation:none,effects:{sky_color:0,water_fog_color:329011,fog_color:10518688,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:0.5000000000F,downfall:0.5000000000F,category:the_end}},{name:"minecraft:end_barrens",id:60,element:{precipitation:none,effects:{sky_color:0,water_fog_color:329011,fog_color:10518688,water_color:4159204,mood_sound:{tick_delay:6000,offset:2.0000000000D,sound:"minecraft:ambient.cave",block_search_extent:8}},temperature:0.5000000000F,downfall:0.5000000000F,category:the_end}}]}} \ No newline at end of file diff --git a/server/chat.go b/server/chat.go index 329448a..b3463bd 100644 --- a/server/chat.go +++ b/server/chat.go @@ -35,7 +35,7 @@ func NewGlobalChat() *GlobalChat { func (g *GlobalChat) Init(game *Game) { game.AddHandler(&PacketHandler{ ID: packetid.ServerboundChat, - F: func(player *Player, packet Packet757) error { + F: func(player *Player, packet Packet758) error { var msg pk.String if err := pk.Packet(packet).Scan(&msg); err != nil { return err @@ -59,14 +59,14 @@ func (g *GlobalChat) Run(ctx context.Context) { case <-ctx.Done(): return case item := <-g.msg: - g.broadcast(Packet757(pk.Marshal( + g.broadcast(Packet758(pk.Marshal( packetid.ClientboundChat, item.toMessage(), pk.Byte(chatPosChat), pk.UUID(item.p.UUID), ))) case p := <-g.join: - g.broadcast(Packet757(pk.Marshal( + g.broadcast(Packet758(pk.Marshal( packetid.ClientboundChat, chat.TranslateMsg("multiplayer.player.joined", chat.Text(p.Name)).SetColor(chat.Yellow), pk.Byte(chatPosSystem), @@ -74,7 +74,7 @@ func (g *GlobalChat) Run(ctx context.Context) { ))) g.players[p.UUID] = p case p := <-g.quit: - g.broadcast(Packet757(pk.Marshal( + g.broadcast(Packet758(pk.Marshal( packetid.ClientboundChat, chat.TranslateMsg("multiplayer.player.left", chat.Text(p.Name)).SetColor(chat.Yellow), pk.Byte(chatPosSystem), @@ -85,7 +85,7 @@ func (g *GlobalChat) Run(ctx context.Context) { } } -func (g *GlobalChat) broadcast(packet Packet757) { +func (g *GlobalChat) broadcast(packet Packet758) { for _, p := range g.players { p.WritePacket(packet) } diff --git a/server/command/component.go b/server/command/component.go index bd811e1..8bf2297 100644 --- a/server/command/component.go +++ b/server/command/component.go @@ -13,7 +13,7 @@ import ( func (g *Graph) Init(game *server.Game) { game.AddHandler(&server.PacketHandler{ ID: packetid.ServerboundChat, - F: func(player *server.Player, packet server.Packet757) error { + F: func(player *server.Player, packet server.Packet758) error { var msg pk.String if err := pk.Packet(packet).Scan(&msg); err != nil { return err @@ -35,7 +35,7 @@ func (g *Graph) Run(ctx context.Context) {} // AddPlayer implement server.Component for Graph func (g *Graph) AddPlayer(p *server.Player) { - p.WritePacket(server.Packet757(pk.Marshal( + p.WritePacket(server.Packet758(pk.Marshal( packetid.ClientboundCommands, g, ))) } diff --git a/server/dimension.go b/server/dimension.go index c539693..0a7707b 100644 --- a/server/dimension.go +++ b/server/dimension.go @@ -50,10 +50,10 @@ func (s *SimpleDim) PlayerJoin(p *Player) { ) column.Unlock() - p.WritePacket(Packet757(packet)) + p.WritePacket(Packet758(packet)) } - p.WritePacket(Packet757(pk.Marshal( + p.WritePacket(Packet758(pk.Marshal( packetid.ClientboundPlayerPosition, pk.Double(0), pk.Double(143), pk.Double(0), pk.Float(0), pk.Float(0), diff --git a/server/gameplay.go b/server/gameplay.go index aa1103b..10c3778 100644 --- a/server/gameplay.go +++ b/server/gameplay.go @@ -42,7 +42,7 @@ type PacketHandler struct { F packetHandlerFunc } -type packetHandlerFunc func(player *Player, packet Packet757) error +type packetHandlerFunc func(player *Player, packet Packet758) error //go:embed DimensionCodec.snbt var dimensionCodecSNBT string @@ -95,7 +95,9 @@ func (g *Game) AcceptPlayer(name string, id uuid.UUID, protocol int32, conn *net pk.Boolean(false), // Is hardcore pk.Byte(p.Gamemode), // Gamemode pk.Byte(-1), // Prev Gamemode - pk.Array([]pk.Identifier{pk.Identifier(dimInfo.Name)}), + pk.Array([]pk.Identifier{ + pk.Identifier(dimInfo.Name), + }), pk.NBT(nbt.StringifiedMessage(dimensionCodecSNBT)), pk.NBT(nbt.StringifiedMessage(dimensionSNBT)), pk.Identifier(dimInfo.Name), // World Name @@ -145,7 +147,7 @@ func (g *Game) AcceptPlayer(name string, id uuid.UUID, protocol int32, conn *net return } for _, ph := range g.handlers[packet.ID] { - if err := ph.F(p, Packet757(packet)); err != nil { + if err := ph.F(p, Packet758(packet)); err != nil { return } if err := p.GetErr(); err != nil { diff --git a/server/keepalive.go b/server/keepalive.go index a34787b..f560b1f 100644 --- a/server/keepalive.go +++ b/server/keepalive.go @@ -60,7 +60,7 @@ func (k *KeepAlive) AddPlayerDelayUpdateHandler(f func(p *Player, delay time.Dur func (k *KeepAlive) Init(g *Game) { g.AddHandler(&PacketHandler{ ID: packetid.ServerboundKeepAlive, - F: func(player *Player, packet Packet757) error { + F: func(player *Player, packet Packet758) error { var KeepAliveID pk.Long if err := pk.Packet(packet).Scan(&KeepAliveID); err != nil { return err @@ -121,7 +121,7 @@ func (k *KeepAlive) pingPlayer(now time.Time) { if elem := k.pingList.Front(); elem != nil { p := k.pingList.Remove(elem).(keepAliveItem).player // Send Clientbound KeepAlive packet. - p.WritePacket(Packet757(pk.Marshal( + p.WritePacket(Packet758(pk.Marshal( packetid.ClientboundKeepAlive, pk.Long(k.keepAliveID), ))) diff --git a/server/player.go b/server/player.go index 9fbb418..9cae52f 100644 --- a/server/player.go +++ b/server/player.go @@ -22,12 +22,13 @@ type Player struct { errChan chan error } -// Packet757 is a packet in protocol 757. +// Packet758 is a packet in protocol 757. // We are using type system to force programmers to update packets. +type Packet758 pk.Packet type Packet757 pk.Packet // WritePacket to player client. The type of parameter will update per version. -func (p *Player) WritePacket(packet Packet757) { +func (p *Player) WritePacket(packet Packet758) { p.packetQueue.Push(pk.Packet(packet)) } diff --git a/server/playerlist.go b/server/playerlist.go index 42231a6..c70bdee 100644 --- a/server/playerlist.go +++ b/server/playerlist.go @@ -42,7 +42,7 @@ func (p *PlayerList) AddPlayer(player *Player) { defer p.playersLock.Unlock() if len(p.players) >= p.maxPlayer { - player.WritePacket(Packet757(pk.Marshal( + player.WritePacket(Packet758(pk.Marshal( packetid.ClientboundDisconnect, chat.TranslateMsg("multiplayer.disconnect.server_full"), ))) diff --git a/server/server.go b/server/server.go index 52cd67f..1162b83 100644 --- a/server/server.go +++ b/server/server.go @@ -30,8 +30,8 @@ import ( "github.com/Tnze/go-mc/net" ) -const ProtocolName = "1.18.1" -const ProtocolVersion = 757 +const ProtocolName = "1.18.2" +const ProtocolVersion = 758 type Server struct { ListPingHandler