From 9e743563404ea6a7fa6d01a4fc100bb6806ca481 Mon Sep 17 00:00:00 2001 From: Bibi Reden Date: Sat, 20 Jul 2024 12:11:57 -0500 Subject: [PATCH] alpha.9 --- CHANGELOG.md | 7 ++----- gradle.properties | 2 +- .../data_attributes/api/factory/DefaultAttributeFactory.kt | 5 ++++- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 627c578..f3b9b70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,2 @@ -## Additions 💫 -- Added the `DefaultAttributeFactory`, which can be used in mods to add extra defaults to the config. - - Currently, it is limited to hard-code, -- Added `EntityAttributeSupplier` to the mod again. - - Its purpose is just to be a wrapper on lazily evaluated `EntityAttribute` values. \ No newline at end of file +## Changes ⚙️ +- Applied small fix to `DefaultAttributeFactory`. \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index eacd571..900e7e9 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ loom_version=1.7-SNAPSHOT minecraft_version=1.20.1 fabric_kotlin_version=1.11.0+kotlin.2.0.0 fabric_api_version=0.92.2+1.20.1 -mod_version=2.0.0-alpha.8+1.20.1 +mod_version=2.0.0-alpha.9+1.20.1 loader=fabric yarn_mappings=1.20.1+build.10 diff --git a/src/main/kotlin/com/bibireden/data_attributes/api/factory/DefaultAttributeFactory.kt b/src/main/kotlin/com/bibireden/data_attributes/api/factory/DefaultAttributeFactory.kt index 1a15ab5..f299740 100644 --- a/src/main/kotlin/com/bibireden/data_attributes/api/factory/DefaultAttributeFactory.kt +++ b/src/main/kotlin/com/bibireden/data_attributes/api/factory/DefaultAttributeFactory.kt @@ -32,7 +32,10 @@ object DefaultAttributeFactory { /** Registers default [EntityTypeData]'s to the config if they are not present currently within the config. */ fun registerEntityTypes(entityTypes: Map) { val current = DataAttributes.ENTITY_TYPES_CONFIG.entity_types.toMutableMap() - entityTypes.forEach { (id, types) -> current.computeIfAbsent(id) { types } } + entityTypes.forEach { (id, types) -> + current.computeIfAbsent(id) { types } + current[id]!!.data.toMutableMap().putAll(types.data) + } DataAttributes.ENTITY_TYPES_CONFIG.entity_types = current DataAttributes.ENTITY_TYPES_CONFIG.save() }