Java Code Examples for net.minecraftforge.common.DimensionManager#getProviderType()

The following examples show how to use net.minecraftforge.common.DimensionManager#getProviderType() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DimensionDumper.java    From NEI-Integration with MIT License 6 votes vote down vote up
@Override
public Iterable<String[]> dump(int mode) {
    List<String[]> list = new LinkedList<String[]>();
    
    List<Integer> ids = new ArrayList<Integer>();
    ids.addAll(Arrays.asList(DimensionManager.getStaticDimensionIDs()));
    Collections.sort(ids);
    
    for (int id : ids) {
        int providerId = DimensionManager.getProviderType(id);
        Map<Integer, Class> providers = ReflectionHelper.getPrivateValue(DimensionManager.class, null, "providers");
        Class providerClass = providers.get(providerId);
        list.add(new String[] { String.valueOf(id), String.valueOf(providerId), providerClass.getName() });
    }
    
    return list;
}