improved caching to use less per-model space and changed cache class for retextured elements

This commit is contained in:
2024-04-16 00:10:53 +02:00
parent c3e0ab16b7
commit 6318fdece0
29 changed files with 141 additions and 184 deletions

View File

@@ -2,6 +2,7 @@ package fr.adrien1106.reframed.client.model;
import net.minecraft.block.BlockState;
import net.minecraft.client.render.model.UnbakedModel;
import net.minecraft.state.property.Property;
import net.minecraft.util.Identifier;
import java.util.Collection;
@@ -15,9 +16,13 @@ public abstract class UnbakedRetexturedModel implements UnbakedModel {
protected int theme_index = 1;
protected BlockState item_state;
protected final boolean ao = true;
protected final int state_count;
protected final Property<?>[] properties;
public UnbakedRetexturedModel(Identifier parent) {
public UnbakedRetexturedModel(Identifier parent, int state_count, Property<?>... properties) {
this.parent = parent;
this.state_count = state_count;
this.properties = properties;
}
public UnbakedRetexturedModel setThemeIndex(int theme_index) {