6b44ab5
Branches > main > 6b44ab5 > files
Registry updates and friends
Commit: 6b44ab5469d87e9a0b53974c8e2e22fa2fc24040
Parent: 1e5053c
4 changed files:
src/net/bowmap/network/handle.clj view file
@@ -59,12 +59,39 @@ ;; TODO also probably good to unbundle this :known-packs [{:namespace "minecraft" :id "core"- :version "1.12.11"}]})+ :version "26.2"}]}) (assoc client ::state/connection-state ::state/config)) (defmethod handler ::serverbound/known-packs [client a pk] (doseq [pk (registry/registry-packets)] (send a client/send-clientbound-packet pk))++ (send a client/send-clientbound-packet {::pk/id ::clientbound/update-tags+ :tagged-registries [{:registry "minecraft:block"+ :tags [{:tag-name "minecraft:infiniburn_overworld"+ :entries []}]}]})+ (send a client/send-clientbound-packet {::pk/id ::clientbound/update-tags+ :tagged-registries [{:registry "minecraft:damage_type"+ :tags [{:tag-name "minecraft:is_fire"+ :entries []}+ {:tag-name "minecraft:is_explosion"+ :entries []}+ {:tag-name "minecraft:bypasses_shield"+ :entries []}]}]})+ (send a client/send-clientbound-packet {::pk/id ::clientbound/update-tags+ :tagged-registries [{:registry "minecraft:banner_pattern"+ :tags [{:tag-name "minecraft:pattern_item/bordure_indented" :entries []}+ {:tag-name "minecraft:pattern_item/creeper" :entries []}+ {:tag-name "minecraft:pattern_item/field_masoned" :entries []}+ {:tag-name "minecraft:pattern_item/flow" :entries []}+ {:tag-name "minecraft:pattern_item/flower" :entries []}+ {:tag-name "minecraft:pattern_item/globe" :entries []}+ {:tag-name "minecraft:pattern_item/guster" :entries []}+ {:tag-name "minecraft:pattern_item/mojang" :entries []}+ {:tag-name "minecraft:pattern_item/piglin" :entries []}+ {:tag-name "minecraft:pattern_item/skull" :entries []}]}]})++ (send a client/send-clientbound-packet {::pk/id ::clientbound/finish-config}) client) @@ -112,6 +139,7 @@ :has-death-location? false :portal-cooldown 10 :sea-level 60+ :online-mode? false :enforce-secure-chat? true}) (send a client/send-clientbound-packetsrc/net/bowmap/network/packets/clientbound.clj view file
@@ -85,6 +85,7 @@ ::explosion ::unload-chunk ::game-event+ ::game-rule-values ::game-test-highlight-position ::open-horse-screen ::hurt-animation@@ -95,6 +96,7 @@ ::particle ::update-light ::login+ ::low-disk-space-warning ::map-data ::merchant-offers ::update-entity-position@@ -221,6 +223,7 @@ :death-location (context-optional-> position->) :portal-cooldown varint-> :sea-level varint->+ :online-mode? boolean-> :enforce-secure-chat? boolean->] ;; And others too but we don't talk about those ::game-event [:event (enum-> byte-> {3 :set-gamemode 13 :wait-for-chunks})@@ -243,7 +246,10 @@ [:relative-x :relative-y :relative-z :relative-yaw :relative-pitch :relative-velocity-x :relative-velocity-y :relative-velocity-z- :rotate-velocity])]})+ :rotate-velocity])]+ ::update-tags [:tagged-registries (list-> [:registry identifier->+ :tags (list-> [:tag-name identifier->+ :entries (list-> varint->)])])]}) (defn build-packet-id-index "Builds a map of connection states and message ids to packet ids.src/net/bowmap/network/packets/serverbound.clj view file
@@ -33,6 +33,7 @@ ::accept-code-of-conduct] ::state/play [::confirm-teleportation+ ::attack ::query-block-entity-tag ::bundle-item-selected ::change-difficulty@@ -88,6 +89,7 @@ ::program-command-block ::program-command-block-minecart ::set-creative-mode-slot+ ::set-game-rules ::program-jigsaw-block ::program-structure-block ::set-test-blocksrc/net/bowmap/network/registry.clj view file
@@ -1,14 +1,14 @@ (ns net.bowmap.network.registry (:require- [net.bowmap.network.chunk :as chunk]- [net.bowmap.network.packet :as pk]))+ [net.bowmap.network.chunk :as chunk])) ;; Some way to keep track of order of these things and make that clear... ;; Probably a map of id -> order? ;; So maybe this needs to be a macro or something idk (let [damage-types ["cactus" "campfire" "cramming" "dragon_breath" "drown" "dry_out" "ender_pearl" "fall" "out_of_world" "fly_into_wall" "freeze" "generic" "generic_kill" "hot_floor" "in_fire" "in_wall" "lava"- "lightning_bolt" "magic" "on_fire" "outside_border" "stalagmite" "starve" "sweet_berry_bush" "wither"]]+ "lightning_bolt" "magic" "on_fire" "outside_border" "stalagmite" "starve" "sweet_berry_bush" "wither"+ "spear"]] (def registries ["worldgen/biome" {"plains" {:has_precipitation false :temperature 1.0@@ -23,47 +23,100 @@ :message_id "onFire" :scaling "never"})) - "dimension_type" {"world" {:has_skylight 1- :has_ceiling 0- :ultrawarm 0- :natural 1+ ;"timeline" {"villager_schedule" {:clock "minecraft:overworld"+ ; :period_ticks 24000+ ; :tracks {"minecraft:gameplay/baby_villager_activity" {:keyframes [{:ticks 10 :value "minecraft:idle"}]}}}}+ ;+ ; "tags/timeline" {"universal" {:values ["minecraft:villager_schedule"]}+ ; "in_overworld" {:values ["#minecraft:universal"]}}++ ;"world_clock" {"overworld" {}}++ "trim_material" {"amethyst" {:asset_name "null"+ :description {:color "#000000" :translate "bowmap.null"}}+ "copper" {:asset_name "null"+ :description {:color "#000000" :translate "bowmap.null"}}+ "diamond" {:asset_name "null"+ :description {:color "#000000" :translate "bowmap.null"}}+ "emerald" {:asset_name "null"+ :description {:color "#000000" :translate "bowmap.null"}}+ "gold" {:asset_name "null"+ :description {:color "#000000" :translate "bowmap.null"}}+ "iron" {:asset_name "null"+ :description {:color "#000000" :translate "bowmap.null"}}+ "lapis" {:asset_name "null"+ :description {:color "#000000" :translate "bowmap.null"}}+ "netherite" {:asset_name "null"+ :description {:color "#000000" :translate "bowmap.null"}}+ "quartz" {:asset_name "null"+ :description {:color "#000000" :translate "bowmap.null"}}+ "redstone" {:asset_name "null"+ :description {:color "#000000" :translate "bowmap.null"}}+ "resin" {:asset_name "null"+ :description {:color "#000000" :translate "bowmap.null"}}}++ "dimension_type" {"world" {:ambient_light 0.0+ :attributes {:minecraft:audio/ambient_sounds {}+ :minecraft:audio/background_music {}+ :minecraft:gameplay/bed_rule+ {:can_set_spawn "always",+ :can_sleep "when_dark",+ :error_message {:translate "block.minecraft.bed.no_sleep"}}+ :minecraft:gameplay/nether_portal_spawns_piglin true+ :minecraft:gameplay/respawn_anchor_works false+ :minecraft:visual/ambient_light_color "#0a0a0a"+ :minecraft:visual/cloud_color "#ccffffff"+ :minecraft:visual/cloud_height 192.33+ :minecraft:visual/fog_color "#c0d8ff"+ :minecraft:visual/sky_color "#78a7ff"} :coordinate_scale 1.0- :bed_works 1- :respawn_anchor_works 1- :min_y 0+ :has_ceiling false+ :has_ender_dragon_fight false+ :has_skylight true :height chunk/world-height :logical_height chunk/world-height- :infiniburn "#"- :effects "minecraft:overworld"- :ambient_light 0.0- :piglin_safe 0- :has_raids 0- :monster_spawn_light_level 8- :monster_spawn_block_light_limit 8}}+ :infiniburn "#minecraft:infiniburn_overworld"+ :min_y 0+ :monster_spawn_block_light_limit 0+ :monster_spawn_light_level 0}} "cat_variant" {"cats" {:asset_id "cat"- :spawn_condition []}}+ :baby_asset_id "cat"+ :spawn_conditions []}} - "chicken_variant" {"chicken" {:asset_id "chicken"- :model "normal"