1.21.3 WIP
This commit is contained in:
@@ -1,21 +1,24 @@
|
||||
|
||||
package moe.nea.firmament.events
|
||||
|
||||
import java.util.function.Consumer
|
||||
import java.util.function.BiConsumer
|
||||
import net.minecraft.client.render.model.ReferencedModelsCollector
|
||||
import net.minecraft.client.util.ModelIdentifier
|
||||
import net.minecraft.util.Identifier
|
||||
|
||||
// TODO: Rename this event, since it is not really directly baking models anymore
|
||||
class BakeExtraModelsEvent(
|
||||
private val addItemModel: Consumer<ModelIdentifier>,
|
||||
private val addAnyModel: Consumer<ModelIdentifier>,
|
||||
private val addAnyModel: BiConsumer<ModelIdentifier, Identifier>,
|
||||
) : FirmamentEvent() {
|
||||
|
||||
fun addNonItemModel(modelIdentifier: ModelIdentifier) {
|
||||
this.addAnyModel.accept(modelIdentifier)
|
||||
}
|
||||
fun addNonItemModel(modelIdentifier: ModelIdentifier, identifier: Identifier) {
|
||||
this.addAnyModel.accept(modelIdentifier, identifier)
|
||||
}
|
||||
|
||||
fun addItemModel(modelIdentifier: ModelIdentifier) {
|
||||
this.addItemModel.accept(modelIdentifier)
|
||||
}
|
||||
fun addItemModel(modelIdentifier: ModelIdentifier) {
|
||||
addNonItemModel(
|
||||
modelIdentifier,
|
||||
modelIdentifier.id.withPrefixedPath(ReferencedModelsCollector.ITEM_DIRECTORY))
|
||||
}
|
||||
|
||||
companion object : FirmamentEventBus<BakeExtraModelsEvent>()
|
||||
companion object : FirmamentEventBus<BakeExtraModelsEvent>()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user