Implemented the sky compass.
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package appeng.block.misc;
|
||||
|
||||
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
|
||||
import appeng.bootstrap.BlockRenderingCustomizer;
|
||||
import appeng.bootstrap.IBlockRendering;
|
||||
import appeng.bootstrap.IItemRendering;
|
||||
import appeng.client.render.model.SkyCompassModel;
|
||||
import appeng.client.render.tesr.SkyCompassTESR;
|
||||
|
||||
|
||||
public class SkyCompassRendering extends BlockRenderingCustomizer
|
||||
{
|
||||
|
||||
private static final ModelResourceLocation ITEM_MODEL = new ModelResourceLocation( "appliedenergistics2:sky_compass", "normal" );
|
||||
|
||||
@Override
|
||||
public void customize( IBlockRendering rendering, IItemRendering itemRendering )
|
||||
{
|
||||
rendering.tesr( new SkyCompassTESR() );
|
||||
// This disables the default smart-rotating model
|
||||
rendering.modelCustomizer( ( loc, model ) -> model );
|
||||
itemRendering.model( ITEM_MODEL );
|
||||
itemRendering.builtInModel( "models/block/builtin/sky_compass", new SkyCompassModel() );
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user