registry.clj
Branches > main > 6b44ab5 > files / src / net / bowmap / network / registry.clj
(ns net.bowmap.network.registry
(:require
[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"
"spear"]]
(def registries ["worldgen/biome" {"plains" {:has_precipitation false
:temperature 1.0
:temperature_modifier "none"
:downfall 1.0
:effects {:fog_color 880000
:water_color 880000 ;8364543
:water_fog_color 880000
:sky_color 880000}}}
"damage_type" (zipmap damage-types (repeat {:exhaustion 0x0
:message_id "onFire"
:scaling "never"}))
;"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
:has_ceiling false
:has_ender_dragon_fight false
:has_skylight true
:height chunk/world-height
:logical_height chunk/world-height
:infiniburn "#minecraft:infiniburn_overworld"
:min_y 0
:monster_spawn_block_light_limit 0
:monster_spawn_light_level 0}}
"cat_variant" {"cats" {:asset_id "cat"
:baby_asset_id "cat"
:spawn_conditions []}}
"chicken_variant" {"temperate" {:asset_id "chicken"
:baby_asset_id "chicken"
:model "normal"
:spawn_conditions []}
"cold" {:asset_id "chicken"
:baby_asset_id "chicken"
:model "normal"
:spawn_conditions []}
"warm" {:asset_id "chicken"
:baby_asset_id "chicken"
:model "normal"
:spawn_conditions []}}
"cow_variant" {"cow" {:asset_id "cow"
:baby_asset_id "cow"
:model "normal"
:spawn_conditions []}}
"frog_variant" {"frog" {:asset_id "frog"
:spawn_condition []}}
"pig_variant" {"pig" {:asset_id "pig"
:baby_asset_id "pig"
:model "normal"
:spawn_conditions []}}
"wolf_variant" {"wolf" {:assets {:angry "minecraft:angry"
:tame "minecraft:tame"
:wild "minecraft:wild"}
:baby_assets {:angry "minecraft:angry"
:tame "minecraft:tame"
:wild "minecraft:wild"}
:spawn_conditions []}}
"painting_variant" {"painting" {:asset_id "painting"
:height 1
:width 1
:title "Fred"
:author "Lucy"}}
"cat_sound_variant" {"cat" {:adult_sounds {:ambient_sound "minecraft:entity.cat.ambient"
:beg_for_food_sound "minecraft:entity.cat.ambient"
:death_sound "minecraft:entity.cat.ambient"
:eat_sound "minecraft:entity.cat.ambient"
:hiss_sound "minecraft:entity.cat.ambient"
:hurt_sound "minecraft:entity.cat.ambient"
:purr_sound "minecraft:entity.cat.ambient"
:purreow_sound "minecraft:entity.cat.ambient"
:stray_ambient_sound "minecraft:entity.cat.ambient"}
:baby_sounds {:ambient_sound "minecraft:entity.cat.ambient"
:beg_for_food_sound "minecraft:entity.cat.ambient"
:death_sound "minecraft:entity.cat.ambient"
:eat_sound "minecraft:entity.cat.ambient"
:hiss_sound "minecraft:entity.cat.ambient"
:hurt_sound "minecraft:entity.cat.ambient"
:purr_sound "minecraft:entity.cat.ambient"
:purreow_sound "minecraft:entity.cat.ambient"
:stray_ambient_sound "minecraft:entity.cat.ambient"}}}
"chicken_sound_variant" {"chicken" {:adult_sounds {:ambient_sound "minecraft:entity.chicken.ambient"
:death_sound "minecraft:entity.chicken.ambient"
:hurt_sound "minecraft:entity.chicken.ambient"
:step_sound "minecraft:entity.chicken.ambient"}
:baby_sounds {:ambient_sound "minecraft:entity.chicken.ambient"
:death_sound "minecraft:entity.chicken.ambient"
:hurt_sound "minecraft:entity.chicken.ambient"
:step_sound "minecraft:entity.chicken.ambient"}}}
"cow_sound_variant" {"cow" {:ambient_sound "minecraft:entity.cow.ambient"
:death_sound "minecraft:entity.cow.ambient"
:hurt_sound "minecraft:entity.cow.ambient"
:step_sound "minecraft:entity.cow.ambient"}}
"pig_sound_variant" {"pig" {:adult_sounds {:ambient_sound "minecraft:entity.pig.ambient"
:death_sound "minecraft:entity.pig.ambient"
:eat_sound "minecraft:entity.pig.ambient"
:hurt_sound "minecraft:entity.pig.ambient"
:step_sound "minecraft:entity.pig.ambient"}
:baby_sounds {:ambient_sound "minecraft:entity.pig.ambient"
:death_sound "minecraft:entity.pig.ambient"
:eat_sound "minecraft:entity.pig.ambient"
:hurt_sound "minecraft:entity.pig.ambient"
:step_sound "minecraft:entity.pig.ambient"}}}
"zombie_nautilus_variant" {"warm" {:asset_id "minecraft:entity/nautilus/zombie_nautilus"
:spawn_conditions []}}
"jukebox_song" {"5" {:comparator_output 1 :description {:translate "bowmap.null"} :length_in_seconds 1.0 :sound_event "minecraft:music_disc.5"}
"creator_music_box" {:comparator_output 1 :description {:translate "bowmap.null"} :length_in_seconds 1.0 :sound_event "minecraft:music_disc.5"}
"11" {:comparator_output 1 :description {:translate "bowmap.null"} :length_in_seconds 1.0 :sound_event "minecraft:music_disc.5"}
"13" {:comparator_output 1 :description {:translate "bowmap.null"} :length_in_seconds 1.0 :sound_event "minecraft:music_disc.5"}
"blocks" {:comparator_output 1 :description {:translate "bowmap.null"} :length_in_seconds 1.0 :sound_event "minecraft:music_disc.5"}
"bounce" {:comparator_output 1 :description {:translate "bowmap.null"} :length_in_seconds 1.0 :sound_event "minecraft:music_disc.5"}
"cat" {:comparator_output 1 :description {:translate "bowmap.null"} :length_in_seconds 1.0 :sound_event "minecraft:music_disc.5"}
"chirp" {:comparator_output 1 :description {:translate "bowmap.null"} :length_in_seconds 1.0 :sound_event "minecraft:music_disc.5"}
"creator" {:comparator_output 1 :description {:translate "bowmap.null"} :length_in_seconds 1.0 :sound_event "minecraft:music_disc.5"}
"far" {:comparator_output 1 :description {:translate "bowmap.null"} :length_in_seconds 1.0 :sound_event "minecraft:music_disc.5"}
"lava_chicken" {:comparator_output 1 :description {:translate "bowmap.null"} :length_in_seconds 1.0 :sound_event "minecraft:music_disc.5"}
"mall" {:comparator_output 1 :description {:translate "bowmap.null"} :length_in_seconds 1.0 :sound_event "minecraft:music_disc.5"}
"mellohi" {:comparator_output 1 :description {:translate "bowmap.null"} :length_in_seconds 1.0 :sound_event "minecraft:music_disc.5"}
"otherside" {:comparator_output 1 :description {:translate "bowmap.null"} :length_in_seconds 1.0 :sound_event "minecraft:music_disc.5"}
"pigstep" {:comparator_output 1 :description {:translate "bowmap.null"} :length_in_seconds 1.0 :sound_event "minecraft:music_disc.5"}
"precipice" {:comparator_output 1 :description {:translate "bowmap.null"} :length_in_seconds 1.0 :sound_event "minecraft:music_disc.5"}
"relic" {:comparator_output 1 :description {:translate "bowmap.null"} :length_in_seconds 1.0 :sound_event "minecraft:music_disc.5"}
"stal" {:comparator_output 1 :description {:translate "bowmap.null"} :length_in_seconds 1.0 :sound_event "minecraft:music_disc.5"}
"strad" {:comparator_output 1 :description {:translate "bowmap.null"} :length_in_seconds 1.0 :sound_event "minecraft:music_disc.5"}
"tears" {:comparator_output 1 :description {:translate "bowmap.null"} :length_in_seconds 1.0 :sound_event "minecraft:music_disc.5"}
"wait" {:comparator_output 1 :description {:translate "bowmap.null"} :length_in_seconds 1.0 :sound_event "minecraft:music_disc.5"}
"ward" {:comparator_output 1 :description {:translate "bowmap.null"} :length_in_seconds 1.0 :sound_event "minecraft:music_disc.5"}}
"instrument" {"ponder_goat_horn" {:description {:translate "bowmap.null"}
:range 1.0,
:sound_event "minecraft:block.note_block.harp"
:use_duration 1.0}}
"wolf_sound_variant" {"angry" {:adult_sounds {:ambient_sound "minecraft:entity.wolf.ambient"
:death_sound "minecraft:entity.wolf.ambient"
:growl_sound "minecraft:entity.wolf.ambient"
:hurt_sound "minecraft:entity.wolf.ambient"
:pant_sound "minecraft:entity.wolf.ambient"
:step_sound "minecraft:entity.wolf.ambient"
:whine_sound "minecraft:entity.wolf.ambient"}
:baby_sounds {:ambient_sound "minecraft:entity.wolf.ambient"
:death_sound "minecraft:entity.wolf.ambient"
:growl_sound "minecraft:entity.wolf.ambient"
:hurt_sound "minecraft:entity.wolf.ambient"
:pant_sound "minecraft:entity.wolf.ambient"
:step_sound "minecraft:entity.wolf.ambient"
:whine_sound "minecraft:entity.wolf.ambient"}}}]))
;; Make a map of ids -> order
; This probably has to be per-client since different clients could have different registries
#_(defn registry-id
"Function to get the ordered numerical id from a given registry id"
[id])