Add bookshelves

This commit is contained in:
Electroblob77
2020-03-25 14:29:27 +00:00
parent d9c3d15b9b
commit 004c4c09e3
89 changed files with 1572 additions and 314 deletions
@@ -0,0 +1,28 @@
package electroblob.wizardry.client.model;
import electroblob.wizardry.Wizardry;
import net.minecraft.client.resources.IResourceManager;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.ICustomModelLoader;
import net.minecraftforge.client.model.IModel;
public class ModelLoaderBookshelf implements ICustomModelLoader {
private static final String SMART_MODEL_PREFIX = "models/block/smart_model/";
@Override
public void onResourceManagerReload(IResourceManager resourceManager){
// Do nothing
}
@Override
public boolean accepts(ResourceLocation modelLocation){
return modelLocation.getNamespace().equals(Wizardry.MODID) && modelLocation.getPath().startsWith(SMART_MODEL_PREFIX);
}
@Override
public IModel loadModel(ResourceLocation modelLocation){
return new ModelBookshelf(modelLocation.getPath().substring(SMART_MODEL_PREFIX.length()));
}
}