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:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"schemaVersion": 1,
|
||||
"id": "rainbow-datagen",
|
||||
"version": "${version}",
|
||||
"name": "Rainbow",
|
||||
"name": "Rainbow-datagen",
|
||||
"description": "Rainbow's datagen module",
|
||||
"authors": [
|
||||
"GeyserMC contributors"
|
||||
|
||||
Reference in New Issue
Block a user