Fixed crash caused by delayed block registration.
Added Callback section for the Model Registry event to the builder setup. Moved the State Mapper section to the Model Registry Callback section.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package appeng.bootstrap.components;
|
||||
|
||||
import appeng.bootstrap.IBootstrapComponent;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
|
||||
/**
|
||||
* @author GuntherDW
|
||||
*/
|
||||
|
||||
@FunctionalInterface
|
||||
public interface ModelRegComponent extends IBootstrapComponent {
|
||||
|
||||
void modelReg(Side side);
|
||||
|
||||
}
|
||||
@@ -31,7 +31,7 @@ import net.minecraftforge.fml.relauncher.Side;
|
||||
/**
|
||||
* Registers a custom state mapper for a given block.
|
||||
*/
|
||||
public class StateMapperComponent implements PreInitComponent
|
||||
public class StateMapperComponent implements ModelRegComponent
|
||||
{
|
||||
|
||||
private final Block block;
|
||||
@@ -45,7 +45,7 @@ public class StateMapperComponent implements PreInitComponent
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preInitialize( Side side )
|
||||
public void modelReg( Side side )
|
||||
{
|
||||
ModelLoader.setCustomStateMapper( block, stateMapper );
|
||||
if( stateMapper instanceof IResourceManagerReloadListener )
|
||||
|
||||
Reference in New Issue
Block a user