1
0
mirror of https://github.com/GeyserMC/Rainbow.git synced 2025-12-19 14:59:16 +00:00

Re-use mapped geometry when the textures and geometry is the same, let GeometryRenderer return TextureHolder, fix client geometry rendering

This commit is contained in:
Eclipse
2025-10-18 11:02:51 +00:00
parent 975d0c3d0d
commit bf07311112
24 changed files with 451 additions and 164 deletions

View File

@@ -1,6 +1,7 @@
package org.geysermc.rainbow.datagen;
import com.google.common.hash.HashCode;
import com.google.common.hash.Hashing;
import com.mojang.serialization.Codec;
import net.fabricmc.fabric.api.client.datagen.v1.provider.FabricModelProvider;
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
@@ -125,7 +126,7 @@ public abstract class RainbowModelProvider extends FabricModelProvider {
public CompletableFuture<?> saveTexture(byte[] texture, Path path) {
return CompletableFuture.runAsync(() -> {
try {
output.writeIfNeeded(path, texture, HashCode.fromBytes(texture));
output.writeIfNeeded(path, texture, Hashing.sha1().hashBytes(texture));
} catch (IOException exception) {
LOGGER.error("Failed to save texture to {}", path, exception);
}

View File

@@ -2,7 +2,7 @@
"schemaVersion": 1,
"id": "rainbow-datagen",
"version": "${version}",
"name": "Rainbow",
"name": "Rainbow-datagen",
"description": "Rainbow's datagen module",
"authors": [
"GeyserMC contributors"