use of net.minecraft.util.BlockRenderLayer in project MinecraftForge by MinecraftForge.
the class MultiLayerModel method process.
@Override
public MultiLayerModel process(ImmutableMap<String, String> customData) {
ImmutableMap.Builder<Optional<BlockRenderLayer>, ModelResourceLocation> builder = ImmutableMap.builder();
for (String key : customData.keySet()) {
if ("base".equals(key)) {
builder.put(Optional.<BlockRenderLayer>absent(), getLocation(customData.get(key)));
}
for (BlockRenderLayer layer : BlockRenderLayer.values()) {
if (layer.toString().equals(key)) {
builder.put(Optional.of(layer), getLocation(customData.get(key)));
}
}
}
ImmutableMap<Optional<BlockRenderLayer>, ModelResourceLocation> models = builder.build();
if (models.isEmpty())
return INSTANCE;
return new MultiLayerModel(models);
}
Aggregations