Move model loading to the correct event. Fixes #2991 (#2994)

* Use the correct event for loading models.
* Introduce IModelRegistry to wrap the ModelLoader
This commit is contained in:
fscan
2017-07-31 15:51:53 +02:00
committed by yueh
parent b13a338948
commit 5e001d86cb
21 changed files with 155 additions and 67 deletions
@@ -235,7 +235,7 @@ class BlockDefinitionBuilder implements IBlockBuilder
// Register all extra handlers
this.preInitCallbacks.forEach( consumer -> this.factory.addPreInit( side -> consumer.accept( block, item ) ) );
this.initCallbacks.forEach( consumer -> this.factory.addInit( side -> consumer.accept( block, item ) ) );
this.modelRegCallbacks.forEach( consumer -> this.factory.addModelReg( side -> consumer.accept( block, item ) ) );
this.modelRegCallbacks.forEach( consumer -> this.factory.addModelReg( ( side, reg ) -> consumer.accept( block, item ) ) );
this.postInitCallbacks.forEach( consumer -> this.factory.addPostInit( side -> consumer.accept( block, item ) ) );
if( this.tileEntityDefinition != null && block instanceof AEBaseTileBlock )