use of net.minecraft.client.resources.IResourcePack in project BetterRain by OreCruncher.
the class Footsteps method reloadVariator.
private void reloadVariator(final List<IResourcePack> repo) {
final IVariator var = new NormalVariator();
for (final IResourcePack pack : repo) {
InputStream stream = null;
try {
stream = this.dealer.openVariator(pack);
if (stream != null)
var.loadConfig(ConfigProperty.fromStream(stream));
} catch (final Exception e) {
ModLog.debug("Unable to load variator data from pack %s", pack.getPackName());
} finally {
if (stream != null)
try {
stream.close();
} catch (final IOException e) {
;
}
}
}
this.isolator.setVariator(var);
}
use of net.minecraft.client.resources.IResourcePack in project BetterRain by OreCruncher.
the class Footsteps method reloadPrimitiveMap.
private void reloadPrimitiveMap(final List<IResourcePack> repo) {
final IPrimitiveMap primitiveMap = new BasicPrimitiveMap();
for (final IResourcePack pack : repo) {
InputStream stream = null;
try {
stream = this.dealer.openPrimitiveMap(pack);
if (stream != null)
Register.setup(ConfigProperty.fromStream(stream), primitiveMap);
} catch (final IOException e) {
ModLog.debug("Unable to load primitive map data from pack %s", pack.getPackName());
} finally {
if (stream != null)
try {
stream.close();
} catch (final IOException e) {
;
}
}
}
this.isolator.setPrimitiveMap(primitiveMap);
}
Aggregations