Class<?> pluggableClass = Class.forName(pluggableData.getString("pluggableClass"));
if (!IPipePluggable.class.isAssignableFrom(pluggableClass)) {
BCLog.logger.warn("Wrong pluggable class: " + pluggableClass);
continue;
}
IPipePluggable pluggable = (IPipePluggable) pluggableClass.newInstance();
pluggable.readFromNBT(pluggableData);
pluggables[i] = pluggable;
} catch (Exception e) {
BCLog.logger.warn("Failed to load side state");
e.printStackTrace();
}
}
// Migration code
for (int i = 0; i < ForgeDirection.VALID_DIRECTIONS.length; i++) {
IPipePluggable pluggable = null;
if (nbt.hasKey("facadeState[" + i + "]")) {
pluggable = new ItemFacade.FacadePluggable(FacadeState.readArray(nbt.getTagList("facadeState[" + i + "]", Constants.NBT.TAG_COMPOUND)));
} else {
// Migration support for 5.0.x and 6.0.x
if (nbt.hasKey("facadeBlocks[" + i + "]")) {