26 lines
828 B
Kotlin
26 lines
828 B
Kotlin
|
package net.shadowfacts.phycon.client
|
||
|
|
||
|
import net.fabricmc.fabric.api.client.model.ModelProviderContext
|
||
|
import net.fabricmc.fabric.api.client.model.ModelResourceProvider
|
||
|
import net.minecraft.client.render.model.UnbakedModel
|
||
|
import net.minecraft.resource.ResourceManager
|
||
|
import net.minecraft.util.Identifier
|
||
|
import net.shadowfacts.phycon.PhysicalConnectivity
|
||
|
import net.shadowfacts.phycon.client.model.InterfaceModel
|
||
|
|
||
|
/**
|
||
|
* @author shadowfacts
|
||
|
*/
|
||
|
class PhyModelProvider(resourceManager: ResourceManager) : ModelResourceProvider {
|
||
|
companion object {
|
||
|
val INTERFACE = Identifier(PhysicalConnectivity.MODID, "block/network_interface")
|
||
|
}
|
||
|
|
||
|
override fun loadModelResource(resourceId: Identifier, context: ModelProviderContext): UnbakedModel? {
|
||
|
return when (resourceId) {
|
||
|
INTERFACE -> InterfaceModel
|
||
|
else -> null
|
||
|
}
|
||
|
}
|
||
|
}
|