src/main/java/org/cyclops/integrateddynamics/core/helper/PartHelpers.java
public static boolean writePartToNBT(BlockPos pos, NBTTagCompound partTag, Pair<EnumFacing, PartStateHolder<?, ?>> partData) {
        IPartType part = partData.getValue().getPart();
        IPartState partState = partData.getValue().getState();
        writePartTypeToNBT(partTag, partData.getKey(), part);
        try {
            part.toNBT(partTag, partState);
            return true;
        } catch (Exception e) {
            e.printStackTrace();
            IntegratedDynamics.clog(Level.ERROR,  String.format("The part %s at position %s was errored " +
                    "and is removed.", part.getName(), pos));
            return false;
        }
    }
/**
     * Write the given part data to nbt.
     * @param pos The position of the part, used for error reporting.
     * @param partTag The tag to write to.
     * @param partData The part data.
     * @return If the writing succeeded.
     */
Write the given part data to nbt.
@param pos The position of the part, used for error reporting.
@param partTag The tag to write to.
@param partData The part data.
@return If the writing succeeded.
Write the given part data to nbt . @param pos The position of the part used for error reporting . @param partTag The tag to write to . @param partData The part data . @return If the writing succeeded .
public static boolean writePartToNBT(BlockPos pos, NBTTagCompound partTag, Pair<EnumFacing, PartStateHolder<?, ?>> partData) {
        IPartType part = partData.getValue().getPart();
        IPartState partState = partData.getValue().getState();
        writePartTypeToNBT(partTag, partData.getKey(), part);
        try {
            part.toNBT(partTag, partState);
            return true;
        } catch (Exception e) {
            e.printStackTrace();
            IntegratedDynamics.clog(Level.ERROR,  String.format("The part %s at position %s was errored " +
                    "and is removed.", part.getName(), pos));
            return false;
        }
    }
public static boolean writePartToNBT ( BlockPos pos , NBTTagCompound partTag , Pair < EnumFacing , PartStateHolder < ? , ? > > partData ) { IPartType part = partData . getValue ( ) . getPart ( ) ; IPartState partState = partData . getValue ( ) . getState ( ) ; writePartTypeToNBT ( partTag , partData . getKey ( ) , part ) ; try { part . toNBT ( partTag , partState ) ; return true ; } catch ( Exception e ) { e . printStackTrace ( ) ; IntegratedDynamics . clog ( Level . ERROR , String . format ( "The part %s at position %s was errored " + "and is removed." , part . getName ( ) , pos ) ) ; return false ; } }
Write the given part data to nbt.
Write the given part data to nbt .