package info.u_team.u_team_core.util;

import static net.minecraft.client.renderer.model.ModelBakery.STATE_CONTAINER_OVERRIDES;

import java.util.*;

import com.google.common.collect.*;

import net.minecraft.block.*;
import net.minecraft.state.StateContainer;
import net.minecraft.util.ResourceLocation;

public class ModelUtil {
	
	static {
		if (STATE_CONTAINER_OVERRIDES instanceof ImmutableMap) {
			final Map<ResourceLocation, StateContainer<Block, BlockState>> mutableMap = new HashMap<>();
			STATE_CONTAINER_OVERRIDES.forEach(mutableMap::put);
			STATE_CONTAINER_OVERRIDES = mutableMap;
		}
	}
	
	public static void addCustomStateContainer(ResourceLocation location, StateContainer<Block, BlockState> container) {
		STATE_CONTAINER_OVERRIDES.put(location, container);
	}
	
	public static class EmptyStateContainer extends StateContainer<Block, BlockState> {
		
		public EmptyStateContainer(Block block) {
			super(Block::getDefaultState, block, BlockState::new, new HashMap<>());
		}
		
		@Override
		public ImmutableList<BlockState> getValidStates() {
			return getOwner().getStateContainer().getValidStates();
		}
		
	}
	
}

@@ -98,33 +98,9 @@
 ery.
-STATE_CONTAINER_OVERRIDES
+*
 ;%0A%0Ai
@@ -186,16 +186,75 @@
 lock.*;%0A
+import net.minecraft.client.renderer.model.RenderMaterial;%0A
 import n
@@ -805,24 +805,131 @@
 iner);%0A%09%7D%0A%09%0A
+%09public static void addTexture(RenderMaterial material) %7B%0A%09%09LOCATIONS_BUILTIN_TEXTURES.add(material);%0A%09%7D%0A%09%0A
 %09public stat

Add method to add custom texture