1
0
mirror of https://github.com/chylex/Hardcore-Ender-Expansion-2.git synced 2025-04-11 03:15:44 +02:00

Refactor Resource class

This commit is contained in:
chylex 2018-10-07 15:42:35 +02:00
parent b1a85adc48
commit 2f9b482d4a

View File

@ -2,12 +2,11 @@ package chylex.hee.system
import chylex.hee.HEE
import net.minecraft.util.ResourceLocation
object Resource{
inline fun Vanilla(path: String): ResourceLocation{
return ResourceLocation("minecraft", path)
}
sealed class Resource(private val domain: String){
object Vanilla : Resource("minecraft")
object Custom : Resource(HEE.ID)
inline fun Custom(path: String): ResourceLocation{
return ResourceLocation(HEE.ID, path)
operator fun invoke(path: String): ResourceLocation{
return ResourceLocation(domain, path)
}
}