P2P tunnel frequency color indicators (#3610)
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
|
||||
package appeng.client.render.cablebus;
|
||||
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.function.Function;
|
||||
|
||||
import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.vertex.VertexFormat;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.model.IModel;
|
||||
import net.minecraftforge.common.model.IModelState;
|
||||
|
||||
import appeng.core.AppEng;
|
||||
|
||||
|
||||
public class P2PTunnelFrequencyModel implements IModel
|
||||
{
|
||||
private static final ResourceLocation TEXTURE = new ResourceLocation( AppEng.MOD_ID, "parts/p2p_tunnel_frequency" );
|
||||
|
||||
@Override
|
||||
public Collection<ResourceLocation> getTextures()
|
||||
{
|
||||
return Collections.singletonList( TEXTURE );
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBakedModel bake( IModelState state, VertexFormat format, Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter )
|
||||
{
|
||||
try
|
||||
{
|
||||
final TextureAtlasSprite texture = bakedTextureGetter.apply( TEXTURE );
|
||||
return new P2PTunnelFrequencyBakedModel( format, texture );
|
||||
}
|
||||
catch( Exception e )
|
||||
{
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user