-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Entity register and more complex bedrock geometry render and bake.
- Loading branch information
Showing
48 changed files
with
1,857 additions
and
318 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
src/main/kotlin/net/easecation/bedrockloader/BedrockLoaderClient.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package net.easecation.bedrockloader | ||
|
||
import net.easecation.bedrockloader.render.BedrockModelProvider | ||
import net.fabricmc.api.ClientModInitializer | ||
import net.fabricmc.api.EnvType | ||
import net.fabricmc.api.Environment | ||
import net.fabricmc.fabric.api.client.model.ModelLoadingRegistry | ||
|
||
@Environment(EnvType.CLIENT) | ||
object BedrockLoaderClient : ClientModInitializer { | ||
|
||
override fun onInitializeClient() { | ||
ModelLoadingRegistry.INSTANCE.registerResourceProvider { rm -> BedrockModelProvider } | ||
} | ||
|
||
} |
2 changes: 0 additions & 2 deletions
2
src/main/kotlin/net/easecation/bedrockloader/BedrockResourceReloadListener.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
...otlin/net/easecation/bedrockloader/bedrock/definition/EntityRenderControllerDefinition.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
package net.easecation.bedrockloader.bedrock.definition | ||
|
||
import com.google.gson.annotations.SerializedName | ||
import net.minecraft.util.Identifier | ||
|
||
data class EntityRenderControllerDefinition( | ||
@SerializedName("format_version") val formatVersion: String, | ||
@SerializedName("render_controllers") val renderControllers: Map<String, RenderController> | ||
) { | ||
|
||
data class RenderController( | ||
val arrays: Arrays?, | ||
val color: Color?, | ||
val filter_lighting: Boolean?, | ||
val geometry: String, | ||
val ignore_lighting: Boolean?, | ||
val is_hurt_color: IsHurtColor?, | ||
val light_color_multiplier: Any?, | ||
val materials: List<Map<String, String>>, | ||
val on_fire_color: OnFireColor?, | ||
val overlay_color: OverlayColor?, | ||
val part_visibility: List<Map<String, Any>>?, | ||
val rebuild_animation_matrices: Boolean?, | ||
val textures: List<String>?, | ||
val uv_anim: UvAnim? | ||
) | ||
|
||
data class Arrays( | ||
val geometries: Map<String, List<String>>?, | ||
val materials: Map<String, List<String>>?, | ||
val textures: Map<String, List<String>>? | ||
) | ||
|
||
data class Color( | ||
val r: Any?, | ||
val g: Any?, | ||
val b: Any?, | ||
val a: Any? | ||
) | ||
|
||
data class IsHurtColor( | ||
val r: Any?, | ||
val g: Any?, | ||
val b: Any?, | ||
val a: Any? | ||
) | ||
|
||
data class OnFireColor( | ||
val r: Any?, | ||
val g: Any?, | ||
val b: Any?, | ||
val a: Any? | ||
) | ||
|
||
data class OverlayColor( | ||
val r: Any?, | ||
val g: Any?, | ||
val b: Any?, | ||
val a: Any? | ||
) | ||
|
||
data class UvAnim( | ||
val offset: List<Any>, | ||
val scale: List<Any> | ||
) | ||
|
||
} |
9 changes: 5 additions & 4 deletions
9
src/main/kotlin/net/easecation/bedrockloader/bedrock/definition/EntityResourceDefinition.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
src/main/kotlin/net/easecation/bedrockloader/bedrock/typealias.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package net.easecation.bedrockloader.bedrock | ||
|
||
import net.minecraft.util.Identifier | ||
|
||
typealias BedrockTexturePath = String // 不包含命名空间的路径(如textures/block/stone) | ||
typealias JavaTexturePath = Identifier // 包含命名空间,不包含textures的路径(如minecraft:block/stone) |
Oops, something went wrong.