reformatted all src files (#141)

This commit is contained in:
YoungOnion
2022-09-17 05:08:02 -06:00
committed by GitHub
parent 3328bfcda2
commit 9011273229
1056 changed files with 88127 additions and 110597 deletions
@@ -19,58 +19,48 @@
package appeng.client.render.model;
import java.util.Map;
import appeng.core.AppEng;
import com.google.common.collect.ImmutableMap;
import net.minecraft.client.resources.IResourceManager;
import net.minecraft.client.resources.IResourceManagerReloadListener;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.ICustomModelLoader;
import net.minecraftforge.client.model.IModel;
import appeng.core.AppEng;
import java.util.Map;
/**
* Manages built-in models.
*/
public class BuiltInModelLoader implements ICustomModelLoader
{
public class BuiltInModelLoader implements ICustomModelLoader {
private final Map<String, IModel> builtInModels;
private final Map<String, IModel> builtInModels;
public BuiltInModelLoader( Map<String, IModel> builtInModels )
{
this.builtInModels = ImmutableMap.copyOf( builtInModels );
}
public BuiltInModelLoader(Map<String, IModel> builtInModels) {
this.builtInModels = ImmutableMap.copyOf(builtInModels);
}
@Override
public boolean accepts( ResourceLocation modelLocation )
{
if( !modelLocation.getResourceDomain().equals( AppEng.MOD_ID ) )
{
return false;
}
@Override
public boolean accepts(ResourceLocation modelLocation) {
if (!modelLocation.getResourceDomain().equals(AppEng.MOD_ID)) {
return false;
}
return this.builtInModels.containsKey( modelLocation.getResourcePath() );
}
return this.builtInModels.containsKey(modelLocation.getResourcePath());
}
@Override
public IModel loadModel( ResourceLocation modelLocation ) throws Exception
{
return this.builtInModels.get( modelLocation.getResourcePath() );
}
@Override
public IModel loadModel(ResourceLocation modelLocation) throws Exception {
return this.builtInModels.get(modelLocation.getResourcePath());
}
@Override
public void onResourceManagerReload( IResourceManager resourceManager )
{
for( IModel model : this.builtInModels.values() )
{
if( model instanceof IResourceManagerReloadListener )
{
( (IResourceManagerReloadListener) model ).onResourceManagerReload( resourceManager );
}
}
}
@Override
public void onResourceManagerReload(IResourceManager resourceManager) {
for (IModel model : this.builtInModels.values()) {
if (model instanceof IResourceManagerReloadListener) {
((IResourceManagerReloadListener) model).onResourceManagerReload(resourceManager);
}
}
}
}