2016-06-23 03:49:47 +00:00
|
|
|
/*
|
|
|
|
* Minecraft Forge
|
2019-02-10 22:57:03 +00:00
|
|
|
* Copyright (c) 2016-2019.
|
2016-06-23 03:49:47 +00:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation version 2.1
|
|
|
|
* of the License.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*/
|
|
|
|
|
2014-11-27 03:56:35 +00:00
|
|
|
package net.minecraftforge.client.event;
|
|
|
|
|
2016-03-01 12:58:03 +00:00
|
|
|
import net.minecraft.client.renderer.block.model.IBakedModel;
|
|
|
|
import net.minecraft.client.renderer.block.model.ModelManager;
|
|
|
|
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
|
|
|
import net.minecraft.util.registry.IRegistry;
|
2015-02-04 06:45:23 +00:00
|
|
|
import net.minecraftforge.client.model.ModelLoader;
|
2018-06-11 01:12:46 +00:00
|
|
|
import net.minecraftforge.eventbus.api.Event;
|
2014-11-27 03:56:35 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Fired when the ModelManager is notified of the resource manager reloading.
|
|
|
|
* Called after model registry is setup, but before it's passed to BlockModelShapes.
|
|
|
|
*/
|
2016-03-05 23:51:39 +00:00
|
|
|
// TODO: try to merge with ICustomModelLoader
|
2018-06-11 01:12:46 +00:00
|
|
|
public class ModelBakeEvent extends net.minecraftforge.eventbus.api.Event
|
2014-11-27 03:56:35 +00:00
|
|
|
{
|
2016-03-05 23:51:39 +00:00
|
|
|
private final ModelManager modelManager;
|
|
|
|
private final IRegistry<ModelResourceLocation, IBakedModel> modelRegistry;
|
|
|
|
private final ModelLoader modelLoader;
|
2015-02-04 07:05:07 +00:00
|
|
|
|
2015-11-27 03:38:21 +00:00
|
|
|
public ModelBakeEvent(ModelManager modelManager, IRegistry<ModelResourceLocation, IBakedModel> modelRegistry, ModelLoader modelLoader)
|
2014-11-27 03:56:35 +00:00
|
|
|
{
|
|
|
|
this.modelManager = modelManager;
|
|
|
|
this.modelRegistry = modelRegistry;
|
2015-02-04 06:45:23 +00:00
|
|
|
this.modelLoader = modelLoader;
|
2014-11-27 03:56:35 +00:00
|
|
|
}
|
2016-03-05 23:51:39 +00:00
|
|
|
|
|
|
|
public ModelManager getModelManager()
|
|
|
|
{
|
|
|
|
return modelManager;
|
|
|
|
}
|
|
|
|
|
|
|
|
public IRegistry<ModelResourceLocation, IBakedModel> getModelRegistry()
|
|
|
|
{
|
|
|
|
return modelRegistry;
|
|
|
|
}
|
|
|
|
|
|
|
|
public ModelLoader getModelLoader()
|
|
|
|
{
|
|
|
|
return modelLoader;
|
|
|
|
}
|
2014-11-27 03:56:35 +00:00
|
|
|
}
|