Major Refactoring of Bootstrap Code (#75)
- Refactored boostrap code: * Completely reworked item/block/tile registration. * Fixed server side startup. * Fixed server side startup. * More documentation. * More heavy cleanup * More cleanups. * Major refactoring of state mapping and fixes a lot of other issue related to item rendering. * Fixes sky chest item models (no item TESR). * Only use CachingRotatingBakedModel for tile entities automatically. Fix default rotation of quartz pillar for item model. * Used method reference instead of lambda for ItemMeshDefinition for multiparts. * Removed unnecessary IHasSpecialItemModel * Removed unused IconReg class. * Updated resource pack version.
This commit is contained in:
committed by
Sebastian Hartte
parent
66df324ef0
commit
6f2bbfab4c
@@ -0,0 +1,34 @@
|
||||
package appeng.bootstrap.components;
|
||||
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraftforge.fml.client.registry.ClientRegistry;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
|
||||
import appeng.tile.AEBaseTile;
|
||||
|
||||
|
||||
/**
|
||||
* Registers a TESR for a given tile entity class.
|
||||
*
|
||||
* @param <T>
|
||||
*/
|
||||
public class TesrComponent<T extends AEBaseTile> implements PreInitComponent
|
||||
{
|
||||
|
||||
private final Class<T> tileEntityClass;
|
||||
|
||||
private final TileEntitySpecialRenderer<? super T> tesr;
|
||||
|
||||
public TesrComponent( Class<T> tileEntityClass, TileEntitySpecialRenderer<? super T> tesr )
|
||||
{
|
||||
this.tileEntityClass = tileEntityClass;
|
||||
this.tesr = tesr;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preInitialize( Side side )
|
||||
{
|
||||
ClientRegistry.bindTileEntitySpecialRenderer( tileEntityClass, tesr );
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user