Implemented the sky compass.

This commit is contained in:
Sebastian Hartte
2016-08-26 13:07:37 +02:00
parent d1ccb126b6
commit 576923a2f2
13 changed files with 803 additions and 6 deletions
@@ -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() );
}
}