Flywheel/src/main/java/com/jozufozu/flywheel/util/VirtualEmptyModelData.java
JozsefA f6937ffb0c Only a few moves left
- flywheel stuff only barely depends on create
 - start drafting what multiple backends could look like
2021-05-11 11:02:43 -07:00

30 lines
677 B
Java

package com.jozufozu.flywheel.util;
import net.minecraftforge.client.model.data.IModelData;
import net.minecraftforge.client.model.data.ModelProperty;
/**
* This model data instance is passed whenever a model is rendered without
* available in-world context. IBakedModel#getModelData can react accordingly
* and avoid looking for model data itself
**/
public enum VirtualEmptyModelData implements IModelData {
INSTANCE;
@Override
public boolean hasProperty(ModelProperty<?> prop) {
return false;
}
@Override
public <T> T getData(ModelProperty<T> prop) {
return null;
}
@Override
public <T> T setData(ModelProperty<T> prop, T data) {
return null;
}
}